Algorithm Search⌘K

Theoremcore

Greenwood's formula

Also called Greenwood variance estimator.

Estimates the variance of the Kaplan-Meier estimate as S(t)^2 times the sum over event times of d / (n (n - d)), and gives pointwise confidence intervals.

Greenwood's formula is the usual estimate of the variance of the Kaplan-Meier estimate S^(t)\hat S(t):

Var^ S^(t)=S^(t)2∑j: tj≤tdjnj(nj−dj),\widehat{\mathrm{Var}}\,\hat S(t) = \hat S(t)^2 \sum_{j:\, t_j \le t} \frac{d_j}{n_j(n_j - d_j)},

where tjt_j are the distinct event times, djd_j the events and njn_j the subjects at risk at tjt_j. The theorem behind it says that, under independent censoring, S^(t)\hat S(t) is asymptotically normal and nn times Greenwood's estimate converges in probability to the asymptotic variance. So S^(t)±z1−α/2Var^\hat S(t) \pm z_{1 - \alpha/2}\sqrt{\widehat{\mathrm{Var}}} is a pointwise confidence interval with asymptotic coverage 1−α1 - \alpha. Below, the theorem is proved in full for event times on a finite grid, by the delta method. The continuous case is stated with its source and not proved here. The finite-sample behaviour of the intervals is only measured, by simulation.

Statement

Let (Ti,Ci)(T_i, C_i), i=1,…,ni = 1, \ldots, n, be independent copies of a pair (T,C)(T, C) of an event time and a censoring time, with observed Yi=min⁡(Ti,Ci)Y_i = \min(T_i, C_i) and δi=1{Ti≤Ci}\delta_i = 1\{T_i \le C_i\}. Fix a time tt. Let t1<⋯<tmt_1 < \cdots < t_m be the points in (0,t](0, t] where TT has positive mass, and write

qj=P(T=tj∣T≥tj),πj=P(Y≥tj),S(t)=P(T>t)=∏j=1m(1−qj).q_j = P(T = t_j \mid T \ge t_j), \qquad \pi_j = P(Y \ge t_j), \qquad S(t) = P(T > t) = \prod_{j=1}^m (1 - q_j).

The Kaplan-Meier estimate is S^(t)=∏j=1m(1−q^j)\hat S(t) = \prod_{j=1}^m (1 - \hat q_j) with q^j=dj/nj\hat q_j = d_j / n_j, dj=#{i:Yi=tj,δi=1}d_j = \#\{i : Y_i = t_j, \delta_i = 1\} and nj=#{i:Yi≥tj}n_j = \#\{i : Y_i \ge t_j\} (set q^j=0\hat q_j = 0 when nj=0n_j = 0). Greenwood's estimate is V^(t)=S^(t)2∑j=1mdj/(nj(nj−dj))\hat V(t) = \hat S(t)^2 \sum_{j=1}^m d_j / (n_j(n_j - d_j)), set to 00 when some dj=njd_j = n_j.

Theorem (Greenwood's formula, discrete time). Assume:

  1. the pairs (Ti,Ci)(T_i, C_i) are independent and identically distributed;
  2. TT is discrete, and it has finitely many points of positive mass in (0,t](0, t];
  3. censoring is independent: P(T=tj∣T≥tj,C≥tj)=qjP(T = t_j \mid T \ge t_j, C \ge t_j) = q_j for j=1,…,mj = 1, \ldots, m (this holds when TT and CC are independent);
  4. πj>0\pi_j > 0 for j=1,…,mj = 1, \ldots, m: some subjects can still be under observation at tjt_j;
  5. qj<1q_j < 1 for j=1,…,mj = 1, \ldots, m, so S(t)>0S(t) > 0.

Then, as n→∞n \to \infty,

  • (a) n (S^(t)−S(t))→dN(0,σ2(t))\sqrt n\,(\hat S(t) - S(t)) \xrightarrow{d} N(0, \sigma^2(t)) with σ2(t)=S(t)2∑j=1mqjπj(1−qj)\displaystyle \sigma^2(t) = S(t)^2 \sum_{j=1}^m \frac{q_j}{\pi_j (1 - q_j)};
  • (b) nV^(t)→pσ2(t)n \hat V(t) \xrightarrow{p} \sigma^2(t);
  • (c) if S(t)<1S(t) < 1, then (S^(t)−S(t))/V^(t)→dN(0,1)(\hat S(t) - S(t))/\sqrt{\hat V(t)} \xrightarrow{d} N(0, 1), so the interval S^(t)±z1−α/2V^(t)\hat S(t) \pm z_{1 - \alpha/2}\sqrt{\hat V(t)} has coverage tending to 1−α1 - \alpha.

Continuous case (cited, not proved here). If TT has a continuous distribution FF, TT and CC are independent, CC has survival function GG, and P(Y>t)>0P(Y > t) > 0, then n(S^(t)−S(t))→N(0,σ2(t))\sqrt n(\hat S(t) - S(t)) \to N(0, \sigma^2(t)) with σ2(t)=S(t)2∫0tdF(u)S(u) S(u−) G(u−)\sigma^2(t) = S(t)^2 \int_0^t \frac{dF(u)}{S(u)\,S(u-)\,G(u-)}, and nV^(t)→σ2(t)n \hat V(t) \to \sigma^2(t) in probability (Breslow and Crowley 1974; Andersen et al. 1993, Chapter IV, with general FF and with counting process methods). For continuous FF, S(u)=S(u−)S(u) = S(u-). For discrete TT independent of CC, πj=S(tj−) G(tj−)\pi_j = S(t_j-)\,G(t_j-) and P(T=tj)=qjS(tj−)P(T = t_j) = q_j S(t_j-), so the integrand at u=tju = t_j becomes qj/(πj(1−qj))q_j/(\pi_j(1 - q_j)), the term in (a).

In plain words

The Kaplan-Meier curve multiplies many fractions, one for each death: the fraction of the people at risk who got past that moment. Each fraction is like a coin-toss proportion, so its uncertainty is roughly the usual one for a proportion, and the fractions at different moments are uncorrelated. When you multiply fractions, their relative errors add up. Greenwood's formula adds the relative uncertainty of each fraction and scales the total back by the square of the survival estimate. Moments with few people at risk add the most uncertainty.

Proof

Write Eij=1{Yi=tj,δi=1}E_{ij} = 1\{Y_i = t_j, \delta_i = 1\} (subject ii has an observed event at tjt_j) and Rij=1{Yi≥tj}R_{ij} = 1\{Y_i \ge t_j\} (subject ii is at risk at tjt_j). Then dj=∑iEijd_j = \sum_i E_{ij} and nj=∑iRijn_j = \sum_i R_{ij}. Every event at tjt_j is at risk at tjt_j, so Eij≤RijE_{ij} \le R_{ij} and EijRij=EijE_{ij}R_{ij} = E_{ij}.

Step 1: the centred event counts. Eij=1E_{ij} = 1 means Ti=tjT_i = t_j and Ci≥tjC_i \ge t_j, and Rij=1R_{ij} = 1 means Ti≥tjT_i \ge t_j and Ci≥tjC_i \ge t_j. By condition 3,

E[Eij]=P(T=tj∣T≥tj,C≥tj) P(T≥tj,C≥tj)=qjπj,E[Rij]=πj.\mathrm E[E_{ij}] = P(T = t_j \mid T \ge t_j, C \ge t_j)\, P(T \ge t_j, C \ge t_j) = q_j \pi_j, \qquad \mathrm E[R_{ij}] = \pi_j.

Define ξij=Eij−qjRij\xi_{ij} = E_{ij} - q_j R_{ij} and the vector ξi=(ξi1,…,ξim)\xi_i = (\xi_{i1}, \ldots, \xi_{im}). Then:

  • E[ξij]=qjπj−qjπj=0\mathrm E[\xi_{ij}] = q_j\pi_j - q_j\pi_j = 0.
  • E[ξij2]=E[Eij]−2qjE[EijRij]+qj2E[Rij]=qjπj−2qj2πj+qj2πj=qj(1−qj)πj\mathrm E[\xi_{ij}^2] = \mathrm E[E_{ij}] - 2q_j\mathrm E[E_{ij}R_{ij}] + q_j^2\mathrm E[R_{ij}] = q_j\pi_j - 2q_j^2\pi_j + q_j^2\pi_j = q_j(1 - q_j)\pi_j.
  • For j<lj < l: an event at tjt_j means Yi=tj<tlY_i = t_j < t_l, so EijEil=EijRil=0E_{ij}E_{il} = E_{ij}R_{il} = 0. Being at risk at tlt_l or having an event there implies being at risk at tjt_j, so RijRil=RilR_{ij}R_{il} = R_{il} and RijEil=EilR_{ij}E_{il} = E_{il}. Expanding,
ξijξil=−qjEil+qjqlRil=−qjξil,\xi_{ij}\xi_{il} = -q_j E_{il} + q_j q_l R_{il} = -q_j \xi_{il},

and E[ξijξil]=−qjE[ξil]=0\mathrm E[\xi_{ij}\xi_{il}] = -q_j\mathrm E[\xi_{il}] = 0.

So the ξi\xi_i are independent and identically distributed with mean 00 and covariance matrix D=diag(qj(1−qj)πj)D = \mathrm{diag}(q_j(1 - q_j)\pi_j). They are bounded, so all moments are finite.

Step 2: the hazard estimates are jointly normal. By the multivariate central limit theorem (the central limit theorem for each linear combination aTξia^{\mathsf T}\xi_i, and the Cramér-Wold device), Zn=n−1/2∑i=1nξi→dNm(0,D)Z_n = n^{-1/2}\sum_{i=1}^n \xi_i \xrightarrow{d} N_m(0, D). By the law of large numbers, nj/n→πj>0n_j/n \to \pi_j > 0 in probability (condition 4), so P(nj=0)→0P(n_j = 0) \to 0. On the event {nj>0}\{n_j > 0\},

q^j−qj=dj−qjnjnj=∑iξijnj,son(q^j−qj)=nnj Zn,j.\hat q_j - q_j = \frac{d_j - q_j n_j}{n_j} = \frac{\sum_i \xi_{ij}}{n_j}, \qquad \text{so} \qquad \sqrt n(\hat q_j - q_j) = \frac{n}{n_j}\, Z_{n,j}.

Let An=diag(n/nj)A_n = \mathrm{diag}(n/n_j), which converges in probability to A=diag(1/πj)A = \mathrm{diag}(1/\pi_j). By the vector form of Slutsky's theorem, AnZn→dA Nm(0,D)A_n Z_n \xrightarrow{d} A\,N_m(0, D), which is

n(q^−q)→dNm(0,Σ),Σ=ADA=diag ⁣(qj(1−qj)πj).\sqrt n(\hat q - q) \xrightarrow{d} N_m(0, \Sigma), \qquad \Sigma = A D A = \mathrm{diag}\!\left(\frac{q_j(1 - q_j)}{\pi_j}\right).

The events {nj=0}\{n_j = 0\} have probability tending to 00, so the value of q^j\hat q_j on them does not change the limit. The hazard estimates at different event times are asymptotically independent.

Step 3: the delta method. S^(t)=g(q^)\hat S(t) = g(\hat q) and S(t)=g(q)S(t) = g(q) for g(x)=∏j=1m(1−xj)g(x) = \prod_{j=1}^m (1 - x_j), which is a polynomial and so differentiable everywhere. Its gradient at qq has entries

∂g∂xj(q)=−∏l≠j(1−ql)=−S(t)1−qj,\frac{\partial g}{\partial x_j}(q) = -\prod_{l \ne j}(1 - q_l) = -\frac{S(t)}{1 - q_j},

using condition 5. By the multivariate delta method, n(S^(t)−S(t))→dN(0,∇gTΣ∇g)\sqrt n(\hat S(t) - S(t)) \xrightarrow{d} N(0, \nabla g^{\mathsf T}\Sigma\nabla g) with

∇gTΣ∇g=∑j=1mS(t)2(1−qj)2⋅qj(1−qj)πj=S(t)2∑j=1mqjπj(1−qj)=σ2(t).\nabla g^{\mathsf T}\Sigma\nabla g = \sum_{j=1}^m \frac{S(t)^2}{(1 - q_j)^2}\cdot\frac{q_j(1 - q_j)}{\pi_j} = S(t)^2\sum_{j=1}^m \frac{q_j}{\pi_j(1 - q_j)} = \sigma^2(t).

This proves (a).

Step 4: Greenwood's estimate is consistent. On the event that nj>0n_j > 0 and dj<njd_j < n_j for every jj,

nV^(t)=S^(t)2∑j=1mn djnj(nj−dj)=S^(t)2∑j=1mq^j(nj/n)(1−q^j).n\hat V(t) = \hat S(t)^2 \sum_{j=1}^m \frac{n\, d_j}{n_j(n_j - d_j)} = \hat S(t)^2\sum_{j=1}^m \frac{\hat q_j}{(n_j/n)(1 - \hat q_j)}.

The map (s,x,p)↦s2∑jxj/(pj(1−xj))(s, x, p) \mapsto s^2\sum_j x_j/(p_j(1 - x_j)) is continuous at (S(t),q,π)(S(t), q, \pi) because every πj>0\pi_j > 0 and every qj<1q_j < 1. We have S^(t)→pS(t)\hat S(t) \xrightarrow{p} S(t) and q^→pq\hat q \xrightarrow{p} q from (a) and Step 2, and nj/n→pπjn_j/n \xrightarrow{p} \pi_j. By the continuous mapping theorem, nV^(t)→pσ2(t)n\hat V(t) \xrightarrow{p} \sigma^2(t). The event that some nj=0n_j = 0 or some dj=njd_j = n_j has probability tending to 00, because q^j→qj<1\hat q_j \to q_j < 1 in probability. This proves (b).

Step 5: the studentized statistic. If S(t)<1S(t) < 1, then some qj>0q_j > 0, so σ2(t)>0\sigma^2(t) > 0. Write (S^−S)/V^=n(S^−S)/nV^(\hat S - S)/\sqrt{\hat V} = \sqrt n(\hat S - S)\big/\sqrt{n\hat V}. The numerator converges in distribution to N(0,σ2)N(0, \sigma^2) by (a), and the denominator converges in probability to σ>0\sigma > 0 by (b). Slutsky's theorem gives the limit N(0,1)N(0, 1), and the coverage of the interval tends to P(∣N(0,1)∣≤z1−α/2)=1−αP(|N(0,1)| \le z_{1 - \alpha/2}) = 1 - \alpha. This proves (c). □\square

Consequences

No censoring: the binomial variance. If no subject is censored, S^(t)=#{i:Yi>t}/n\hat S(t) = \#\{i : Y_i > t\}/n is a binomial proportion, and Greenwood's estimate is exactly S^(t)(1−S^(t))/n\hat S(t)(1 - \hat S(t))/n. Without censoring nj+1=nj−djn_{j+1} = n_j - d_j, so each term telescopes:

djnj(nj−dj)=1nj−dj−1nj=1nj+1−1nj,∑j=1mdjnj(nj−dj)=1nS^(t)−1n,\frac{d_j}{n_j(n_j - d_j)} = \frac{1}{n_j - d_j} - \frac{1}{n_j} = \frac{1}{n_{j+1}} - \frac{1}{n_j}, \qquad \sum_{j=1}^m \frac{d_j}{n_j(n_j - d_j)} = \frac{1}{n\hat S(t)} - \frac1n,

because n1=nn_1 = n and nm−dm=nS^(t)n_m - d_m = n\hat S(t). Multiplying by S^(t)2\hat S(t)^2 gives S^(t)(1−S^(t))/n\hat S(t)(1 - \hat S(t))/n, the plug-in variance of a binomial proportion.

A worked example. In the 6-MP arm of the leukemia data on the Kaplan-Meier page, the event times up to 23 weeks have (nj,dj)=(21,3),(17,1),(15,1),(12,1),(11,1),(7,1),(6,1)(n_j, d_j) = (21, 3), (17, 1), (15, 1), (12, 1), (11, 1), (7, 1), (6, 1). The sum is

321⋅18+117⋅16+115⋅14+112⋅11+111⋅10+17⋅6+16⋅5=0.09018,\frac{3}{21 \cdot 18} + \frac{1}{17 \cdot 16} + \frac{1}{15 \cdot 14} + \frac{1}{12 \cdot 11} + \frac{1}{11 \cdot 10} + \frac{1}{7 \cdot 6} + \frac{1}{6 \cdot 5} = 0.09018,

and with S^(23)=160/357=0.4482\hat S(23) = 160/357 = 0.4482 the standard error is 0.44820.09018=0.13460.4482\sqrt{0.09018} = 0.1346. The plain 95% interval is (0.184,0.712)(0.184, 0.712).

The log-log interval. The plain interval can leave [0,1][0, 1], and its coverage is poor when S(t)S(t) is near 00 or 11. Apply the delta method to θ=log⁡(−log⁡S(t))\theta = \log(-\log S(t)) for 0<S(t)<10 < S(t) < 1: the derivative of s↦log⁡(−log⁡s)s \mapsto \log(-\log s) is 1/(slog⁡s)1/(s\log s), so the estimated standard error of θ^\hat\theta is

τ^=V^(t)S^(t) ∣log⁡S^(t)∣=∑jdj/(nj(nj−dj))∣log⁡S^(t)∣.\hat\tau = \frac{\sqrt{\hat V(t)}}{\hat S(t)\,|\log\hat S(t)|} = \frac{\sqrt{\sum_{j} d_j/(n_j(n_j - d_j))}}{|\log\hat S(t)|}.

Transforming θ^±zτ^\hat\theta \pm z\hat\tau back with S=exp⁡(−eθ)S = \exp(-e^\theta) gives the interval (S^(t)exp⁡(zτ^), S^(t)exp⁡(−zτ^))\left(\hat S(t)^{\exp(z\hat\tau)},\ \hat S(t)^{\exp(-z\hat\tau)}\right), which always lies inside (0,1)(0, 1). By (c) and the delta method it has the same asymptotic coverage. For the 6-MP data at 23 weeks it is (0.188,0.680)(0.188, 0.680). For the placebo arm at 15 weeks, where S^=1/7\hat S = 1/7 and there is no censoring, the plain interval (−0.007,0.293)(-0.007, 0.293) goes below 00, while the log-log interval is (0.036,0.321)(0.036, 0.321).

Other uses. The same Step 2 gives the variance of the Nelson-Aalen estimator of the cumulative hazard, ∑jqj(1−qj)/πj\sum_j q_j(1 - q_j)/\pi_j, estimated by ∑jdj(nj−dj)/nj3\sum_j d_j(n_j - d_j)/n_j^3. The asymptotic independence of the q^j\hat q_j across event times is also the reason why the log-rank test adds variances over event times. Greenwood's formula gives a pointwise interval at each fixed tt; it does not give a band that covers the whole curve with probability 1−α1 - \alpha. Simultaneous bands, such as the Hall-Wellner band, need the limit process of the continuous case.

Tightness

Each condition is needed.

  • Without independent censoring (condition 3), S^\hat S converges to the wrong limit. Let TT be uniform on {1,2,3}\{1, 2, 3\}, let a subject with T=2T = 2 be censored at time 1.5 with probability 1/21/2, and let no other subject be censored. At time 2 the risk set has limiting proportion 1/6+1/3=1/21/6 + 1/3 = 1/2 of the sample, with events 1/61/6, so q^2→1/3\hat q_2 \to 1/3, while q2=P(T=2∣T≥2)=1/2q_2 = P(T = 2 \mid T \ge 2) = 1/2. Then S^(2)→(2/3)(2/3)=4/9\hat S(2) \to (2/3)(2/3) = 4/9, but S(2)=1/3S(2) = 1/3. The observed pairs (Y,δ)(Y, \delta) alone cannot reveal this (Tsiatis 1975; see censoring).
  • Without condition 4 no one is observed at tjt_j, qjq_j does not appear in the data, and no consistent estimate of S(t)S(t) exists.
  • Without condition 5, S(t)=0S(t) = 0, S^(t)=0\hat S(t) = 0 with probability tending to 11, and the limit in (a) is degenerate.

What is measured, not proved. The theorem is about the limit. In finite samples Greenwood's estimate tends to be too small, and the plain interval undercovers. In a simulation with T∼T \sim exponential with rate 1, independent censoring C∼C \sim exponential with rate 0.5 (one third of the times censored), tt chosen so that S(t)=0.5S(t) = 0.5, 0.80.8 or 0.950.95, r=10000r = 10000 replications per row and seed 2026:

nn S(t)S(t) variance of S^\hat S mean of V^\hat V plain 95% log-log 95%
20 0.5 0.01562 0.01443 0.921 0.949
20 0.8 0.00860 0.00807 0.905 0.950
20 0.95 0.00242 0.00226 0.628 0.560
50 0.5 0.00613 0.00597 0.938 0.948
50 0.8 0.00337 0.00332 0.923 0.956
50 0.95 0.000965 0.000935 0.913 0.881
200 0.5 0.00152 0.00152 0.949 0.951
200 0.8 0.000852 0.000846 0.943 0.951
200 0.95 0.000243 0.000240 0.924 0.950

The log-log interval is close to 95% at n=20n = 20 when S(t)S(t) is not extreme. At S(t)=0.95S(t) = 0.95 and n=20n = 20 both intervals fail: in about a third of the samples no event happens before tt, so S^(t)=1\hat S(t) = 1, V^(t)=0\hat V(t) = 0, and neither interval contains the true value. The coverage tends to 95% as nn grows, as (c) says, but this table only measures it.

History

Major Greenwood derived the formula in 1926, in an appendix to a report for the British Ministry of Health on the natural duration of cancer, for the actuarial life-table estimate of survival from grouped data. He treated the survival fractions of successive intervals as independent binomial proportions and combined their variances, which is the argument of Steps 2 and 3 in finite-sample form. Kaplan and Meier (1958) derived the same formula for the product-limit estimate. Breslow and Crowley (1974) gave the first rigorous large-sample proof for the product-limit estimate under random censorship with continuous FF, and the counting process theory of the late 1970s and the 1980s, collected by Andersen, Borgan, Gill and Keiding (1993), extended it to general distributions and to the whole curve.

References

  1. Major Greenwood, A Report on the Natural Duration of Cancer, Reports on Public Health and Medical Subjects No. 33, His Majesty's Stationery Office, London, 1926, pp. 1 to 26 (the variance of the life-table survival estimate is derived in Appendix I)
  2. E. L. Kaplan and Paul Meier, Nonparametric estimation from incomplete observations, Journal of the American Statistical Association 53(282), 1958, pp. 457 to 481 (the variance of the product-limit estimate, the same formula derived again)
  3. N. Breslow and J. Crowley, A large sample study of the life table and product limit estimates under random censorship, Annals of Statistics 2(3), 1974, pp. 437 to 453 (weak convergence of the product-limit process for continuous distributions, and consistency of the Greenwood estimate)
  4. Per Kragh Andersen, Ørnulf Borgan, Richard D. Gill and Niels Keiding, Statistical Models Based on Counting Processes, Springer, 1993, Chapter IV (the product-limit estimator, its asymptotic variance and the Greenwood-type estimators of it)
  5. John P. Klein and Melvin L. Moeschberger, Survival Analysis, Techniques for Censored and Truncated Data, 2nd edition, Springer, 2003, Chapter 4 (Greenwood's formula and pointwise confidence intervals for the survival function, including the log-log transformation)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/GZDDD3/text.yaml