From a Kaplan–Meier Curve to an RMST Estimate
The restricted mean survival time (RMST) through a fixed horizon \(\tau\) is the area under the survival function from time zero to \(\tau\). For one group, its Kaplan–Meier estimate is obtained by integrating the group’s Kaplan–Meier (KM) curve over that interval. The calculation is geometric once the curve’s survival levels are known: each constant segment contributes a rectangle.
This is a plug-in estimate: estimate the survival curve using the group’s observed event and censoring data, then integrate the estimated curve. The horizon \(\tau\) is treated as specified for this calculation. The result is in the same time units as the survival times and \(\tau\).
The expectation identity gives the quantity a direct interpretation: it is the expected event-free time accrued up to \(\tau\), counting any time beyond \(\tau\) as \(\tau\). It does not require estimating the survival curve after \(\tau\). The introductory material on restricted mean survival time as an estimand establishes why this finite-horizon quantity can be useful; here the focus is how to compute its Kaplan–Meier estimate.
Model, Data, and Kaplan–Meier Steps
Suppose the data consist of independent subjects in one group. For subject \(i\), let \(T_i\) be the event time and \(C_i\) the censoring time. The observed time is \(X_i=\min(T_i,C_i)\), and an event indicator records whether the event was observed at \(X_i\). A subject censored at time \(X_i\) is known to have remained event-free up to that time, but their later event time is unknown.
For the ordinary, unadjusted KM curve to estimate the group’s survival function, subjects’ event times should be independent and censoring should be independent of event time within the group. In particular, censoring must not selectively remove subjects with shorter or longer unobserved event times in a way that changes the risk sets’ event experience. The event and censoring times must be recorded consistently, and the group should have adequate follow-up through the chosen horizon. If censoring depends on observed covariates, unconditional independence may fail; a simple unadjusted KM curve may then not estimate the desired marginal survival curve.
Between event times, \(\widehat{S}(t)\) is constant. At an event time it drops by the factor \(1-d_j/Y_j\); a censoring time alone does not make it drop. To obtain the area, list the event times strictly between zero and \(\tau\), and use the survival level just after each boundary as the height on the next interval. The event at zero needs special attention: the height from zero onward is then the post-event level at zero, not automatically one.
Why the Rectangle Formula Works
The KM curve is a right-continuous step function. On each interval \([r_j,r_{j+1})\), it equals \(\widehat{S}(r_j)\), so the integral over that interval is its height times its width. Adding the interval integrals gives the total area. More formally, additivity of integration over adjacent intervals yields
The value assigned at an interval’s right endpoint does not affect its area, since a single time point has zero length. This is why an event at \(\tau\) is excluded from the list of boundaries used for positive-width intervals, while an event at zero must be reflected in the survival height immediately after zero.
Worked Example: Integrating Three Kaplan–Meier Drops
Consider hypothetical follow-up in one group of 10 subjects, with horizon \(\tau=7\) years. There are two events at year 2, two censorings at year 3, one event at year 4, one censoring at year 5, and one event at year 6. Assume the remaining subjects are followed at least through year 7. There are no events at time zero.
At year 2, all 10 subjects are at risk, so the KM factor is \(1-2/10=0.8\). After the two censorings at year 3, six subjects remain at risk just before year 4. The factor at year 4 is \(1-1/6=5/6\), giving survival \(0.8(5/6)=2/3\). Just before year 6, four subjects remain at risk, so its factor is \(1-1/4=3/4\), giving survival \((2/3)(3/4)=1/2\).
The survival levels over the intervals are 1 from year 0 to 2, 0.8 from 2 to 4, \(2/3\) from 4 to 6, and 0.5 from 6 to 7. Therefore,
The estimated restricted mean event-free time through seven years is 5.433 years for this hypothetical group. The censorings at years 3 and 5 affect which subjects are at risk at later event times, but they contribute no downward KM jumps themselves.
Worked Example: An Event at Time Zero
Suppose five hypothetical subjects are followed, one has an observed event at time zero, and the other four remain at risk until year 3. At year 3, two of those four have events. There are no other events before the horizon \(\tau=5\), and follow-up supports the curve through year 5.
At time zero, \(Y=5\) and \(d=1\), so the survival level just after the event is \(1-1/5=4/5=0.8\). At year 3, the factor is \(1-2/4=1/2\), so the post-event level becomes \(0.8(1/2)=0.4\). The curve is therefore at 0.8 on \([0,3)\) and 0.4 on \([3,5)\).
The area from time zero to year 3 uses 0.8, not 1, because the event at zero has already caused the KM curve to drop. Treating the curve as equal to one throughout that first interval would overstate the estimate by \(0.2(3)=0.6\) years.
Worked Example: Censoring Changes a Later Risk Set
In a hypothetical group of eight subjects, two events occur at year 1. Two more subjects are censored at year 2, and one event occurs at year 3. Let \(\tau=4\) years, and suppose the three subjects still at risk after the year-3 event have follow-up beyond year 4.
At year 1, the risk set is eight and the event count is two, so \(\widehat{S}(1)=1-2/8=0.75\). The two censorings at year 2 do not change survival, but they reduce the risk set from six to four. Thus at year 3 the event factor is \(1-1/4=0.75\), and the new survival level is \(0.75(0.75)=0.5625\).
The curve is 1 on \([0,1)\), 0.75 on \([1,3)\), and 0.5625 on \([3,4)\). Hence
The calculation illustrates why censoring must be accounted for when constructing each later risk set, even though censoring does not itself reduce the KM curve.
Diagnostics, Alternatives, and Limitations
Before reporting an area, verify the risk sets and curve steps against the observed data. For each event time, check that \(Y_j\) includes subjects at risk immediately before that time, including subjects censored at that same time under the stated tie convention. Confirm that each event factor is \(1-d_j/Y_j\), and that the resulting KM levels never increase. Then check the interval widths: they should be nonnegative, should sum to \(\tau\), and should use the post-event level at each left boundary.
- Check time zero and the horizon. Include an event-time-zero drop in \(\widehat{S}(0)\). Do not assign positive area to an event at exactly \(\tau\).
- Check support through \(\tau\). If follow-up ends well before \(\tau\), or the risk set becomes empty before \(\tau\), the remaining area is not supported by observed follow-up. A flat software-drawn tail does not by itself establish survival through the horizon.
- Check censoring plausibility. If censoring is related to unobserved event risk, the ordinary KM curve may be biased. The rectangle arithmetic can be correct while the estimate is not valid for the target survival function.
- Check sparse risk sets. A late KM drop based on very few subjects can make the estimated curve unstable. Report the risk-set context and avoid treating a numerically calculable tail as well determined.
The KM approach is nonparametric in the sense that it estimates survival through observed event-time jumps without specifying a parametric survival distribution. A parametric survival model offers a smooth fitted curve and may support extrapolation beyond observed follow-up, but relies on its distributional assumptions; its integrated fitted curve is not the same calculation as the KM step-function area. The ordinary arithmetic mean of observed times \(X_i\) is not an appropriate substitute when follow-up is censored, because a censored observation is not the subject’s event time. A median also answers a different question and, if the KM curve does not fall to 0.5, may not be estimable from the observed follow-up.
The RMST estimate depends on the chosen horizon and on information available up to that horizon. It is not an estimate of unrestricted mean survival unless additional assumptions justify extending the curve indefinitely. Nor does the area calculation quantify sampling uncertainty; that requires a variance or other inferential procedure beyond this tutorial’s calculation.
Common Mistake
A second frequent error is to multiply by a censoring factor as though censoring were an event. Censoring removes a subject from later risk sets, but only the event counts \(d_j\) produce KM survival factors. For the area, censoring matters through the levels at later event times, not through an extra drop at the censoring time.
Check Your Understanding
Work each problem using the step-function area, and then compare your results with the solutions.
- A group has no events at zero. Its KM curve is 1 until year 2, 0.7 from year 2 to year 5, and 0.4 from year 5 to horizon \(\tau=6\). Find the estimated RMST through six years.
- At time zero, one of four subjects has an event. There are no later events before \(\tau=3\). Assuming the curve is supported through year 3, find the KM-based RMST.
- At year 4, \(Y=10\) and \(d=3\). The survival estimate just before year 4 is 0.8. What is the post-event level, and how much area does this level contribute from year 4 to year 6 if there are no events in that interval?
- Explain why two censorings at year 2 can change a KM-based RMST calculation even though neither censoring causes a KM drop.
Solutions. (1) The areas are \(1(2)+0.7(5-2)+0.4(6-5)=2+2.1+0.4=4.5\) years. (2) The post-zero level is \(1-1/4=0.75\), constant through year 3, so the area is \(0.75(3)=2.25\) years. (3) The event factor is \(1-3/10=0.7\), so the post-event level is \(0.8(0.7)=0.56\); its area from year 4 to 6 is \(0.56(2)=1.12\) years. (4) The censored subjects leave the risk set, so a later event count is divided by a smaller \(Y_j\). That can change the later KM factor and curve level, and therefore the area, although censoring itself produces no drop.