Why Use a Confidence Interval for Kaplan-Meier Survival?
A Kaplan-Meier estimate, \(\hat S(t)\), summarizes estimated survival through time \(t\). It is a point estimate, so it does not show how much uncertainty is associated with that estimate. A confidence interval adds an uncertainty range, using the observed failures and risk sets to estimate the variability of \(\hat S(t)\).
For survival estimates, the interval’s construction matters. A simple normal interval can extend below 0 or above 1, even though a survival probability must lie between those values. A log-log transformation provides a commonly used pointwise interval that respects the range. The calculations below use the Greenwood variance estimate and the estimated standard error on the transformed scale.
Greenwood’s Standard Error and the Log-Log Scale
Suppose there are independent subjects with right-censored observations, and censoring is independent of failure time in the sense required for Kaplan-Meier estimation. At the \(j\)th distinct failure time up to \(t\), let \(n_j\) be the number at risk immediately before that time and \(d_j\) the number of failures at that time. The Kaplan-Meier estimate is the product of the conditional survival estimates at the failure times.
A direct normal interval based on this standard error is \(\hat S(t)\pm z_{1-\alpha/2}\hat S(t)\sqrt{\hat G(t)}\). It is easy to calculate, but it does not enforce the probability bounds. Instead, the log-log method works with \(\theta(t)=\log[-\log S(t)]\). For \(0<S(t)<1\), this transformation is defined and its inverse is \(S(t)=\exp[-\exp\{\theta(t)\}]\).
The interval endpoints, in increasing order, are
Here \(z_{1-\alpha/2}\) is the corresponding standard normal quantile; for example, it is approximately \(1.96\) for a 95% interval and \(1.645\) for a 90% interval. Use the estimated survival at the specified time, not a nearby value read from the curve.
Why the Log-Log Standard Error Has This Form
The formula follows from the delta method applied to the Greenwood variance estimate. Define \(g(s)=\log[-\log(s)]\) for \(0<s<1\). Differentiating gives
The delta method estimates the variance of a transformed statistic by multiplying its original variance by the square of the derivative. Substituting Greenwood’s estimated variance therefore gives
Taking the square root yields the stated transformed standard error. An approximate normal interval on the transformed scale is \(\hat\theta(t)\pm z_{1-\alpha/2}\widehat{\operatorname{SE}}\{\hat\theta(t)\}\). Since \(g'(s)<0\) on \(0<s<1\), the inverse transformation is decreasing: the larger transformed endpoint maps to the smaller survival endpoint. That is why the plus sign in the transformed upper endpoint gives \(L(t)\), not \(U(t)\).
Use the Kaplan-Meier estimate at \(t\) and add the Greenwood contributions for all failure times through \(t\).
Find \(\hat\theta(t)=\log[-\log\{\hat S(t)\}]\) and \(\sqrt{\hat G(t)}/|\log\{\hat S(t)\}|\).
Calculate both transformed endpoints, apply \(s=\exp[-\exp(\theta)]\), and reverse their order.
Worked Examples
Worked Example: A Tied Failure Time and a 95% Interval
In a hypothetical study, 10 subjects are at risk immediately before a failure time. Two failures occur together, and the time of interest is immediately after those failures. There are no earlier failures. Construct a 95% log-log interval for survival at that time, using \(z_{0.975}=1.96\).
Method and estimate. The Kaplan-Meier factor at this tied failure time is \((n-d)/n=(10-2)/10=8/10=0.8\). Thus, \(\hat S(t)=0.8\).
Greenwood sum and transformed standard error. There is one failure-time contribution: \(\hat G(t)=2/[10(10-2)]=2/80=0.025\). Therefore, \(\sqrt{\hat G(t)}=\sqrt{0.025}=0.158114\). Also, \(\log(0.8)=-0.223144\), so \(\hat\theta(t)=\log(0.223144)=-1.49994\). The transformed standard error is \(0.158114/0.223144=0.70856\).
Transformed interval. The margin is \(1.96(0.70856)=1.38878\). The transformed endpoints are \(-1.49994-1.38878=-2.88872\) and \(-1.49994+1.38878=-0.11116\).
Invert and order. The larger transformed endpoint gives the lower survival endpoint: \(L(t)=\exp[-\exp(-0.11116)]\approx0.4088\). The other endpoint is \(U(t)=\exp[-\exp(-2.88872)]\approx0.9460\). The 95% pointwise interval is \((0.4088,0.9460)\), rounded to four decimal places. The values are ordered and both lie between 0 and 1.
Common mistake avoided: Treating the two tied failures as two sequential events with different risk sets would use the wrong Greenwood contributions. Both failures share the same risk set \(n=10\).
Worked Example: Five Failures and a 95% Interval
In a hypothetical uncensored cohort, five successive distinct failure times each have one failure. The risk sets just before those failures are 25, 24, 23, 22, and 21. Construct a 95% log-log interval immediately after the fifth failure, using \(z_{0.975}=1.96\).
Method and estimate. The successive Kaplan-Meier factors are \(24/25\), \(23/24\), \(22/23\), \(21/22\), and \(20/21\). They telescope, giving \(\hat S(t)=20/25=0.8\).
Greenwood sum. For a single failure at risk set \(n\), the contribution is \(1/[n(n-1)]=1/(n-1)-1/n\). Thus, \[ \hat G(t)=\left(\frac1{24}-\frac1{25}\right) +\left(\frac1{23}-\frac1{24}\right) +\left(\frac1{22}-\frac1{23}\right) +\left(\frac1{21}-\frac1{22}\right) +\left(\frac1{20}-\frac1{21}\right) =\frac1{20}-\frac1{25}=0.01. \]
Transformed quantities. As in the preceding calculation for \(\hat S(t)=0.8\), \(\hat\theta(t)=\log(0.223144)=-1.49994\). Now \(\sqrt{\hat G(t)}=0.1\), so the transformed standard error is \(0.1/0.223144=0.44814\). The 95% margin is \(1.96(0.44814)=0.87836\).
Endpoints. The transformed endpoints are \(-1.49994-0.87836=-2.37830\) and \(-1.49994+0.87836=-0.62158\). Inverting in reverse order gives \(L(t)=\exp[-\exp(-0.62158)]\approx0.5844\) and \(U(t)=\exp[-\exp(-2.37830)]\approx0.9116\). The interval is approximately \((0.5844,0.9116)\), rounded to four decimal places.
Common mistake avoided: Using only the final risk set to calculate Greenwood’s sum would omit four failure contributions. The sum includes every failure time up to \(t\).
Worked Example: Censoring Between Failure Times
In a hypothetical study, 12 subjects are at risk at the first failure time, when two fail. Two of the remaining subjects are then censored before the next failure time, when one of the eight remaining subjects fails. Construct a 90% log-log interval immediately after the second failure time, using \(z_{0.95}=1.645\).
Method and risk sets. The first Kaplan-Meier factor is \((12-2)/12=10/12\). After those failures, 10 subjects remain; two are censored, leaving 8 at risk for the next failure. The second factor is \((8-1)/8=7/8\). Consequently, \(\hat S(t)=(10/12)(7/8)=70/96=35/48\approx0.729167\).
Greenwood sum. The first contribution is \(2/[12(12-2)]=2/120=1/60\). The second is \(1/[8(8-1)]=1/56\). Hence, \(\hat G(t)=1/60+1/56=29/840\approx0.0345238\), and \(\sqrt{\hat G(t)}\approx0.185806\).
Transformed quantities. Since \(-\log(35/48)=\log(48/35)\approx0.315853\), \(\hat\theta(t)=\log(0.315853)\approx-1.15248\). The transformed standard error is \(0.185806/0.315853\approx0.58826\). The 90% margin is \(1.645(0.58826)\approx0.96769\).
Endpoints and check. The transformed endpoints are approximately \(-2.12017\) and \(-0.18478\). Applying the inverse transformation in reverse order gives \(L(t)\approx0.4356\) and \(U(t)\approx0.8869\). The 90% interval is \((0.4356,0.8869)\), rounded to four decimal places. The censorings do not contribute Greenwood terms; they affect the later risk set.
Common mistake avoided: Subtracting the two censored subjects from the risk set before calculating the first failure contribution would be incorrect. They are censored after the first failure time and therefore remain in its risk set.
Interpretation, Limits, and Exam Traps
The confidence level describes the long-run performance of the interval procedure under its assumptions. A 95% pointwise interval is calculated for the survival probability at one specified time; it does not assert that the entire curve lies within the interval with 95% confidence. Constructing simultaneous bands for a whole curve is a different problem.
The log-log transformation maps survival values strictly between 0 and 1 to the real line. Its inverse maps every finite transformed endpoint back into \((0,1)\). This range property is useful, but it does not make the interval exact or eliminate uncertainty from small samples. The calculation uses an asymptotic normal approximation, and it can be unreliable when there are few failures or when the estimate is near a boundary.
- Do not confuse the two standard errors. Greenwood gives \(\widehat{\operatorname{SE}}\{\hat S(t)\}=\hat S(t)\sqrt{\hat G(t)}\). The log-log calculation instead uses \(\sqrt{\hat G(t)}/|\log\{\hat S(t)\}|\).
- Reverse the endpoint order after inversion. The transformation is decreasing, so the larger transformed endpoint produces the smaller survival endpoint.
- Do not treat a pointwise interval as a curve-wide guarantee. It concerns one selected time \(t\).
- Check the boundary cases. If \(\hat S(t)=0\) or \(\hat S(t)=1\), the displayed log-log calculation is not defined in its usual form. In particular, a value of 1 with no observed failures gives \(\hat G(t)=0\), not a useful finite log-log interval. Use a method appropriate to the boundary situation rather than substituting into the formula.
Check Your Understanding
For each problem, use the stated normal quantile and round probability endpoints to four decimal places where applicable.
- At a specified time, \(\hat S(t)=0.8\) and \(\hat G(t)=0.01\). Construct a 90% log-log interval using \(z_{0.95}=1.645\). (Answer: approximately \((0.6273,0.8987)\).)
- At a selected time, \(\hat S(t)=0.6\) and \(\hat G(t)=0.02\). Construct a 95% log-log interval using \(z_{0.975}=1.96\). (Answer: approximately \((0.4153,0.7431)\).)
- A study has 15 subjects at risk at one failure time, with three failures. Afterward, two subjects are censored; at the next failure time, 10 are at risk and two fail. Find the Kaplan-Meier estimate and Greenwood sum immediately after the second failure time. (Answer: \(\hat S(t)=0.64\), \(\hat G(t)=0.0417\).)
- At a specified time, \(\hat S(t)=35/48\) and \(\hat G(t)=29/840\). Construct a 90% log-log interval using \(z_{0.95}=1.645\). (Answer: approximately \((0.4356,0.8869)\).)
- A calculation gives transformed endpoints \(-2.3783\) and \(-0.6216\). Which endpoint is the lower survival endpoint after inversion, and why? (Answer: \(\exp[-\exp(-0.6216)]\), because the inverse log-log transformation is decreasing.)