Tutorials › Competing Risks and Multi-State Models › Deriving The Nelson-Aalen Variance

Transition Intensities and Probabilities · Tutorial 281 of 699

Deriving The Nelson-Aalen Variance

You will derive the usual sum of transition counts divided by squared risk sets and learn when that variance estimate is appropriate.

Advanced 12 min read

What You'll Learn

  • Define the Nelson–Aalen estimator and its variance estimate for one transition.
  • Derive the variance formula using the transition counting-process martingale.
  • Explain why predictable risk sets and appropriate censoring assumptions matter.
  • Work through variance calculations with separate event times and tied counts.
  • Distinguish the target transition’s event count from other transitions that change its risk set.
  • Recognize when tied observations, sparse risk sets, or dependent subjects make the usual estimate unreliable.

Why Derive the Variance?

The Nelson–Aalen estimator adds estimated increments of a cumulative transition intensity. Its uncertainty depends on both how many target transitions occur and how many individuals are at risk for that transition when they occur. Deriving the variance makes clear why the risk set is squared in the denominator, and why the event count—not simply the number of observed times—appears in the numerator.

The focus here is one transition, from state \(h\) to state \(k\). The result concerns uncertainty in its cumulative intensity estimate. It does not, by itself, give covariance between estimates for different transitions.

Definition: Let \(N_{hk}(t)\) count transitions from state \(h\) to state \(k\) by time \(t\), and let \(Y_h(t)\) be the number of individuals in state \(h\) and under observation just before time \(t\). Write \(d_{hk}(u)\) for the number of \(h\to k\) transitions at event time \(u\). The Nelson–Aalen estimator of the cumulative transition intensity through time \(t\) is $$ \widehat A_{hk}(t)=\sum_{u\leq t:Y_h(u)>0}\frac{d_{hk}(u)}{Y_h(u)}. $$ Its usual estimated variance is $$ \widehat{\operatorname{Var}}\{\widehat A_{hk}(t)\} =\sum_{u\leq t:Y_h(u)>0}\frac{d_{hk}(u)}{Y_h(u)^2}. $$

Assumptions Behind the Calculation

For an individual currently in state \(h\), let \(\lambda_{hk}(u\mid\mathcal F_{u-})\) denote the transition intensity from \(h\) to \(k\), conditional on the history \(\mathcal F_{u-}\) observed just before \(u\). The counting-process formulation assumes that the transition count has intensity \(Y_h(u)\lambda_{hk}(u\mid\mathcal F_{u-})\). In other words, among those currently at risk, the instantaneous expected rate of target transitions is the risk-set size times the individual transition intensity.

The usual variance calculation relies on the following conditions, or their standard large-sample counterparts:

  • Individuals are independent sampling units. Each individual’s transition history may be multi-state and may depend on their own past, but dependence between individuals requires additional variance methods.
  • The risk set is defined just before each event time and is predictable: membership at time \(u\) is determined by information available before \(u\), not by whether the individual has the event at \(u\).
  • Censoring is noninformative for the transition process, conditional on the history used to define the model. Censored individuals leave the risk set; their censoring must not selectively conceal impending target transitions after conditioning on that history.
  • In the usual continuous-time formulation, event times have no point masses, so two individuals do not have an event at precisely the same time with positive probability. The intensity accumulates over time rather than through a fixed-time batch of events.

Other outgoing transitions from state \(h\) remove individuals from the \(h\to k\) risk set when they leave \(h\), but they are not counted in \(d_{hk}\). This distinction is essential: the estimator targets one transition, while its risk set reflects all ways an individual can cease to be at risk for that transition.

Deriving the Sum of Counts Over Squared Risk Sets

The derivation uses the martingale representation of a counting process. Define the compensated transition count \(M_{hk}(t)=N_{hk}(t)-\int_0^tY_h(u)\lambda_{hk}(u\mid\mathcal F_{u-})\,du\). Under the stated intensity model, this is a martingale: after accounting for the modeled intensity, its remaining increments have conditional mean zero.

1
Write the estimator as an integral.
When the risk set is positive, the cumulative estimator is the integral of \(1/Y_h(u)\) against the transition count. Its target cumulative intensity for this derivation is the integral of \(\lambda_{hk}(u\mid\mathcal F_{u-})\) over times with \(Y_h(u)>0\).
2
Subtract the target.
Replacing the transition count by its intensity plus its compensated martingale gives the estimation error as the martingale integral \(\int_0^t 1/Y_h(u)\,dM_{hk}(u)\), over times with \(Y_h(u)>0\).
3
Calculate its predictable variation.
The martingale’s rate of variation is \(Y_h(u)\lambda_{hk}(u\mid\mathcal F_{u-})\). Multiplying by the squared integrand \(1/Y_h(u)^2\) gives a variance accumulation rate of \(\lambda_{hk}(u\mid\mathcal F_{u-})/Y_h(u)\).
4
Estimate the variation from observed events.
Replacing the unknown intensity contribution by observed transition increments yields \(\int_0^t 1/Y_h(u)^2\,dN_{hk}(u)\), which is the sum of \(d_{hk}(u)/Y_h(u)^2\) over target-transition times.

The central martingale identity can also be written explicitly. The predictable variation of \(M_{hk}\) is \(\int_0^tY_h(u)\lambda_{hk}(u\mid\mathcal F_{u-})\,du\). Therefore the predictable variation of the estimator’s martingale error is

$$ \int_0^t\frac{1}{Y_h(u)^2} Y_h(u)\lambda_{hk}(u\mid\mathcal F_{u-})\,du = \int_0^t\frac{\lambda_{hk}(u\mid\mathcal F_{u-})}{Y_h(u)}\,du. $$

The observed counting-process version of this variation is \(\int_0^tY_h(u)^{-2}\,dN_{hk}(u)\). At a time \(u\) with \(d_{hk}(u)\) target events, the integral adds \(d_{hk}(u)/Y_h(u)^2\), giving the stated estimator. This is a martingale-based variance estimate, not an assertion that all observed increments are exactly normally distributed. Its usual inferential use relies on suitable large-sample behavior and a variance estimate that is not dominated by a few sparse risk sets.

Worked Calculations

Worked Example: Separate Target-Transition Event Times

Suppose a hypothetical study has three \(h\to k\) event times by the analysis endpoint. Immediately before them, the risk sets and target counts are respectively \(Y_h=20,d_{hk}=1\); \(Y_h=12,d_{hk}=2\); and \(Y_h=8,d_{hk}=1\). Assume independent individuals, noninformative censoring, and distinct event times under the continuous-time model.

The cumulative intensity estimate is

$$ \widehat A_{hk} =\frac{1}{20}+\frac{2}{12}+\frac{1}{8} =0.05000+0.1667+0.1250 =0.3417. $$

The variance estimate uses the same event counts and squared risk sets:

$$ \widehat{\operatorname{Var}}(\widehat A_{hk}) =\frac{1}{20^2}+\frac{2}{12^2}+\frac{1}{8^2} =0.002500+0.01389+0.01563 =0.03201. $$

Using the unrounded variance, the estimated standard error is approximately \(\sqrt{0.03201389}=0.1789\), in cumulative-intensity units. The estimate is an accumulated transition intensity, not a transition probability.

Worked Example: A Tied Count Under the Grouped-Time Convention

Suppose two target transitions are recorded at the same observed time, when \(Y_h=10\), followed later by one target transition when \(Y_h=6\). If the event times were continuous, an exact tie between independent individuals would have probability zero. Here, treat the tie as a grouped-time observation and use the conventional risk set immediately before that time.

With \(d_{hk}=2\) at the first time and \(d_{hk}=1\) at the second,

$$ \widehat A_{hk} =\frac{2}{10}+\frac{1}{6} =0.2000+0.1667 =0.3667, \qquad \widehat{\operatorname{Var}}(\widehat A_{hk}) =\frac{2}{10^2}+\frac{1}{6^2} =0.02000+0.02778 =0.04778. $$

The estimated standard error is \(\sqrt{0.04777778}=0.2186\). This calculation shows how the grouped convention is applied; it does not make rounded or interval-recorded ties equivalent to genuinely distinct continuous event times. If ties are common because times are recorded coarsely, the continuous-time event assumption needs scrutiny, and a model for grouped event times may be more appropriate.

Worked Example: Competing Outgoing Transitions Change the Risk Set

Consider a hypothetical state \(h\) with multiple outgoing transitions. Before the first observed \(h\to k\) event time, other outgoing transitions have already removed individuals from state \(h\), leaving \(Y_h=25\); one \(h\to k\) event then occurs. At a later \(h\to k\) event time, the risk set is \(Y_h=14\) and two target transitions occur. Assume the risk sets are measured just before each time and the usual independence and censoring conditions hold.

The earlier competing exits affect the risk-set sizes but do not enter the target counts. Thus

$$ \widehat A_{hk} =\frac{1}{25}+\frac{2}{14} =0.04000+0.1429 =0.1829, $$

and

$$ \widehat{\operatorname{Var}}(\widehat A_{hk}) =\frac{1}{25^2}+\frac{2}{14^2} =0.001600+0.01020 =0.01180. $$

The estimated standard error is \(\sqrt{0.01180408}=0.1086\), in cumulative-intensity units. Counting the competing exits as \(h\to k\) events would answer a different question and would give an incorrect numerator.

Conditions, Diagnostics, and Alternatives

The formula is most useful when the transition process is adequately represented by its intensity, the risk sets are correctly constructed, and the sampling units are independent. In practice, check that every denominator is the number at risk immediately before the event time; that individuals who leave state \(h\) through any route are no longer counted in its outgoing-transition risk sets; and that censoring is not informative after conditioning on the modeled history. At times when the risk set is zero, no increment is estimable; if individuals later enter state \(h\), the risk set can become positive again and later increments can be estimated.

Look for sparse risk sets and large individual terms \(d_{hk}(u)/Y_h(u)^2\). If a small number of times dominate the estimated variance, asymptotic normal approximations can be poor even when the formula is computed correctly. Also check whether event times are recorded precisely enough for the continuous-time assumption to be plausible, and whether subjects are clustered or otherwise dependent. The usual formula does not automatically account for such dependence.

For a single transition, the sum-of-counts-over-squared-risk-sets formula is the direct Nelson–Aalen martingale variance estimate. It is different from a Greenwood variance calculation for a survival product estimate: the estimand and estimator differ, so one should not substitute a formula for the other without a derivation. The variance here concerns one cumulative transition-intensity estimate; uncertainty involving more than one transition estimate requires additional covariance calculations.

Common Mistake

Common pitfall: Treating the number of event times as the numerator, or using \(d_{hk}(u)/Y_h(u)\) rather than \(d_{hk}(u)/Y_h(u)^2\) in the variance sum. The estimator’s increment is \(d_{hk}(u)/Y_h(u)\), but its estimated variance contribution is \(d_{hk}(u)/Y_h(u)^2\). When multiple target events occur at one grouped time, the contribution is \(d_{hk}(u)/Y_h(u)^2\), not \(1/Y_h(u)^2\). Keep the target count, risk set, and square in the variance denominator distinct.

Check Your Understanding

Answer each question, then compare your reasoning with the brief solutions.

  1. At a target event time, \(Y_h=16\) and \(d_{hk}=2\). What are the estimator increment and the variance contribution?
  2. Why can a competing outgoing transition change the \(h\to k\) variance estimate without being included in \(d_{hk}\)?
  3. At two target event times, the pairs \((Y_h,d_{hk})\) are \((10,1)\) and \((5,1)\). Calculate the cumulative estimate and its variance estimate.
  4. What concern arises if event times are heavily tied because times were recorded only by week?

Solutions. (1) The estimator increment is \(2/16=0.1250\), and the variance contribution is \(2/16^2=0.0078125\). (2) The competing event removes an individual from state \(h\), changing who remains at risk for \(h\to k\), but it is not itself a transition to \(k\). (3) The cumulative estimate is \(1/10+1/5=0.3000\); the variance estimate is \(1/10^2+1/5^2=0.01000+0.04000=0.05000\). (4) The observed ties may reflect coarsened times rather than the continuous-time event assumption. The grouped calculation is a convention, and a grouped-time model or a careful sensitivity analysis may be needed.

Clinical Biostats