Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › Calculating Greenwood Standard Errors

Exam ASTAM · Kaplan-Meier and Nelson-Aalen · Tutorial 240 of 979

Calculating Greenwood Standard Errors

Use the Kaplan-Meier estimate and the failures and risk sets at each event time to calculate and check its Greenwood standard error.

Intermediate 10 min read

What You'll Learn

  • Identify the failure count and risk set needed at each event time.
  • Apply Greenwood’s formula to a Kaplan-Meier estimate at a selected time.
  • Account for tied failures and censorings recorded at an event time.
  • Calculate standard errors at event times and between event times.
  • Recognize when Greenwood’s formula is undefined or easy to misapply.

Why Calculate a Kaplan-Meier Standard Error?

A Kaplan-Meier curve gives an estimate of survival, but that estimate comes from a finite sample. Its standard error summarizes the estimated sampling variability at a selected time. For an actuarial analysis, this helps distinguish a survival estimate supported by a substantial risk set from one based on only a few observations. The standard error is measured on the same scale as the survival estimate; it is not itself a confidence interval.

Greenwood’s formula uses the Kaplan-Meier estimate and the numbers at risk and failing at each observed failure time up to the time of interest. Censored observations affect later risk sets, but do not create a failure factor in the product.

Definition: Let \(t_1<t_2<\cdots\) be the distinct observed failure times. At \(t_j\), let \(n_j\) be the number at risk immediately before that time and \(d_j\) the number of failures at that time. For a selected time \(t\), the Kaplan-Meier estimate is $$ \widehat{S}(t)=\prod_{t_j\leq t}\left(1-\frac{d_j}{n_j}\right). $$ When every factor is positive, Greenwood’s estimated variance and standard error are $$ \widehat{\operatorname{Var}}\!\left(\widehat{S}(t)\right) = \widehat{S}(t)^2 \sum_{t_j\leq t}\frac{d_j}{n_j(n_j-d_j)}, \qquad \widehat{\operatorname{SE}}\!\left(\widehat{S}(t)\right) = \widehat{S}(t) \sqrt{\sum_{t_j\leq t}\frac{d_j}{n_j(n_j-d_j)}}. $$ Here \(d_j\) denotes a count of failures, not a monetary deductible.

The risk set \(n_j\) is counted just before failures at \(t_j\). Thus, if some individuals are censored at the same recorded time as failures, they are included in \(n_j\) for that time under the usual event-table convention. They are removed from the risk set afterward, along with the individuals who failed. Censoring alone does not change \(\widehat{S}(t)\), although it can reduce later risk sets.

Why Greenwood’s Formula Has This Form

At a failure time \(t_j\), the estimated conditional probability of failure among those at risk is \(d_j/n_j\). The Kaplan-Meier factor \(1-d_j/n_j\) is the corresponding estimated conditional probability of surviving that time. The estimate across times is the product of these conditional survival estimates.

A short variance argument explains the Greenwood contribution from one event time. If \(D_j\) is treated as a binomial count with \(n_j\) trials and failure probability \(q_j\), then its estimated variance is \(n_jq_j(1-q_j)\). Apply the delta method to \(\log(1-D_j/n_j)\), whose derivative with respect to \(D_j\) is \(-1/(n_j-D_j)\). Substituting \(D_j=d_j\) and \(q_j\approx d_j/n_j\) gives

$$ \widehat{\operatorname{Var}}\!\left[\log\left(1-\frac{D_j}{n_j}\right)\right] \approx \frac{d_j}{n_j(n_j-d_j)}. $$

The log of a product is the sum of the logs of its factors. Under the usual large-sample approximation that contributions from successive failure times can be added, the estimated variance of \(\log\widehat{S}(t)\) is the sum of these terms. Applying the delta method to exponentiate back to \(\widehat{S}(t)\), whose derivative with respect to its log is \(\widehat{S}(t)\), multiplies that sum by \(\widehat{S}(t)^2\). Taking the square root gives the standard error formula. This is an estimated, approximate standard error, not an exact finite-sample variance in every setting.

A Reliable Calculation Procedure

For each failure time up to and including the selected time, use the risk set immediately before that time. Calculate the survival factor and Greenwood contribution separately, then combine them. This separation makes it easier to detect a common error: using a risk set that has already been reduced by failures or censorings at the same time.

1
Locate relevant failure times.
Include event times at or before the selected time. Do not add a term for a time with censoring but no failures.
2
Read each risk set and failure count.
For every included event time, record \(n_j\) just before the time and the tied failure count \(d_j\).
3
Calculate survival and Greenwood sums.
Multiply the factors \(1-d_j/n_j\), and separately add \(d_j/[n_j(n_j-d_j)]\).
4
Calculate and check the standard error.
Multiply the estimated survival by the square root of the Greenwood sum. Check that the sum is nonnegative and that the estimate and standard error are on the survival-probability scale.

Worked Calculations

Worked Example: Standard Error at the Second Failure Time

A hypothetical follow-up study has 12 individuals at risk immediately before time 1. At time 1, 2 fail and 1 is censored. At time 2, 3 fail and 2 are censored. Calculate the Kaplan-Meier estimate and Greenwood standard error at time 2.

Method and risk sets. At time 1, \(n_1=12\) and \(d_1=2\). After the 2 failures and 1 censoring, the risk set at time 2 is \(12-2-1=9\), so \(n_2=9\) and \(d_2=3\). The censorings at time 2 do not reduce \(n_2\), because it is measured just before time 2.

Kaplan-Meier estimate. The two survival factors are \(1-2/12=10/12\) and \(1-3/9=6/9\). Therefore,

$$ \widehat{S}(2) = \frac{10}{12}\frac{6}{9} = \frac{5}{9} = 0.5556. $$

Greenwood sum. The contributions at times 1 and 2 are

$$ \frac{2}{12(12-2)}=\frac{2}{120}=\frac{1}{60}, \qquad \frac{3}{9(9-3)}=\frac{3}{54}=\frac{1}{18}. $$

Their sum is \(1/60+1/18=3/180+10/180=13/180\). Thus,

$$ \widehat{\operatorname{SE}}\!\left(\widehat{S}(2)\right) = \frac{5}{9}\sqrt{\frac{13}{180}} \approx 0.1493. $$

The corresponding estimated variance is \((5/9)^2(13/180)=65/2916\approx0.0223\), whose square root is approximately \(0.1493\). The calculation avoids the common mistake of subtracting the time-2 censorings before forming the time-2 risk set. Rounded to four decimal places, the standard error is 0.1493.

Worked Example: A Later Estimate with Several Risk Sets

In a hypothetical study, 20 individuals are at risk just before time 2. At time 2, 4 fail and 3 are censored. At time 5, 2 fail and 4 are censored. Calculate the Kaplan-Meier estimate and Greenwood standard error at time 5.

Method and risk sets. The time-2 risk set is \(n_1=20\), with \(d_1=4\). The risk set at time 5 is \(20-4-3=13\), with \(d_2=2\). The four censorings at time 5 are included in the risk set at that time.

Kaplan-Meier estimate. The factors are \(1-4/20=16/20=4/5\) and \(1-2/13=11/13\). Their product is

$$ \widehat{S}(5)=\frac{4}{5}\frac{11}{13} =\frac{44}{65} \approx0.6769. $$

Greenwood sum. The contributions are

$$ \frac{4}{20(16)}=\frac{1}{80}, \qquad \frac{2}{13(11)}=\frac{2}{143}. $$

Using denominator \(11{,}440\), the sum is \(143/11{,}440+160/11{,}440=303/11{,}440\approx0.0264860\). Therefore,

$$ \widehat{\operatorname{SE}}\!\left(\widehat{S}(5)\right) = \frac{44}{65}\sqrt{\frac{303}{11{,}440}} \approx0.1102. $$

As a check, the square root of the Greenwood sum is approximately \(0.1627\), and \(0.6769(0.1627)\approx0.1102\). The calculation avoids treating the second risk set as 16: the 3 censorings after time 2 must also be removed before time 5. Rounded to four decimal places, the standard error is 0.1102.

Worked Example: Reading the Estimate Between Failure Times

A hypothetical event table has 10 individuals at risk before time 1; 1 fails and 2 are censored at time 1. At time 3, 2 fail and 1 is censored. At time 4, 1 fails. Find the Kaplan-Meier estimate and standard error at time 3.5, and then at time 4.

Method and risk sets. The risk set at time 3 is \(10-1-2=7\), and the risk set at time 4 is \(7-2-1=4\). At time 3.5, the time-4 failure has not yet occurred, so only the time-1 and time-3 terms are used.

At time 3.5. The estimate is

$$ \widehat{S}(3.5) = \frac{9}{10}\frac{5}{7} = \frac{9}{14} \approx0.6429. $$

The Greenwood sum is

$$ \frac{1}{10(9)}+\frac{2}{7(5)} = \frac{1}{90}+\frac{2}{35} = \frac{43}{630} \approx0.0682540. $$

Thus, \(\widehat{\operatorname{SE}}(\widehat{S}(3.5))=(9/14)\sqrt{43/630}\approx0.1679\).

At time 4. Include the additional factor \(1-1/4=3/4\), so \(\widehat{S}(4)=(9/14)(3/4)=27/56\approx0.4821\). The additional Greenwood contribution is \(1/[4(4-1)]=1/12\), giving a total of \(43/630+1/12=191/1260\). Consequently,

$$ \widehat{\operatorname{SE}}\!\left(\widehat{S}(4)\right) = \frac{27}{56}\sqrt{\frac{191}{1260}} \approx0.1877. $$

The estimate is constant between failure times, so using the time-4 factor at 3.5 would be incorrect. The time-4 calculation also checks against the update rule: it multiplies the preceding survival estimate by \(3/4\) and adds the time-4 Greenwood term. Rounded to four decimal places, the two standard errors are 0.1679 and 0.1877.

Conditions, Checks, and Common Traps

Greenwood’s formula is used with a Kaplan-Meier estimate formed from right-censored observations under the usual assumption that censoring is independent of the event time, at least conditional on any modeled groups or covariates. The risk sets and event counts must represent the observation scheme correctly. In particular, the formula is not a substitute for handling delayed entry, competing events, or dependent censoring appropriately.

At a selected time \(t\), include all failures at times \(t_j\leq t\), including failures exactly at \(t\). If \(t\) falls between two observed failure times, the estimate and standard error use only the failures at or before \(t\). Censorings do not contribute a summand, but do affect the risk sets at subsequent failure times.

  • Wrong risk set: subtracting censorings recorded at an event time before calculating that time’s failure fraction makes \(n_j\) too small. Use the risk set immediately before the event time.
  • Wrong summand: \(d_j/[n_j(n_j-d_j)]\) is the Greenwood contribution. Do not use \(d_j/n_j\) alone as the variance contribution.
  • Wrong endpoint: a failure at the selected time is included; a later failure is not.
  • Wrong scale: the standard error is \(\widehat{S}(t)\) times the square root of the Greenwood sum, not just the square root of the sum.
  • Zero survival factor: if \(d_j=n_j\), the Kaplan-Meier estimate becomes zero and the Greenwood summand has a zero denominator. The usual Greenwood standard error formula is then undefined; do not substitute into it or report a finite Greenwood standard error from that expression.
Key takeaway: To calculate a Greenwood standard error, first obtain the Kaplan-Meier estimate from the event-time risk sets. Then sum \(d_j/[n_j(n_j-d_j)]\) over those same failure times and multiply the square root of that sum by the estimate.

Check Your Understanding

For each hypothetical event table, calculate the requested Greenwood standard error. Round final standard errors to four decimal places.

  1. There are 15 individuals at risk at time 1; 3 fail and 2 are censored. At time 2, 2 fail and 1 is censored. Find the standard error of the Kaplan-Meier estimate at time 2. (Answer: 0.1306)
  2. At time 1, \(n_1=18\), with 2 failures and 4 censorings. At time 4, 3 fail and 1 is censored. Find the standard error at time 4. (Answer: 0.1242)
  3. There are 9 at risk at time 1; 1 fails and 1 is censored. At time 2, 2 fail and 2 are censored. Find the standard error at time 2. (Answer: 0.1692)
  4. At time 2, there are 14 at risk; 4 fail and 3 are censored. At time 5, 2 fail and 1 is censored. Find the standard error at time 5. (Answer: 0.1494)
  5. There are 12 at risk immediately before time 2, when 2 fail and 3 are censored. At time 4, 1 fails. Find the standard error at time 4. (Answer: 0.1437)
Clinical Biostats