Why Estimate Variance for a Cumulative Incidence?
A cumulative incidence function (CIF) estimates the probability of experiencing a particular event type by a specified time, in the presence of other event types that prevent it. The estimate is built from event counts and the number of people at risk at successive event times. Its variance describes the sampling uncertainty associated with that estimate under the model and sampling assumptions. It is not the variance of individual event times, nor a measure of variation in the population's event times.
The Aalen variance estimate uses the estimated influence of the event-count increments on the CIF at the horizon of interest. An increment can affect the final CIF in two ways: it can directly change the target-cause increment, and it can change how many people remain at risk for later events. Thus, an event of a competing type may contribute to the variance even though it does not directly add to the target CIF.
Quantities Needed at Each Event Time
To use the formula, first calculate the Aalen–Johansen CIF and the event-free estimate at each event time through the horizon. With all causes included, the updates are
The starting values are \(\hat F_k(0-)=0\) and \(\hat S(0-)=1\). At each time, the calculation therefore needs \(Y_j\), \(d_{kj}\), \(d_j\), the pre-event \(\hat S(t_j-)\), and the post-event \(\hat F_k(t_j)\) and \(\hat S(t_j)\). For the variance at horizon \(t\), it also needs the final \(\hat F_k(t)\). The risk set includes individuals who have not yet experienced any event and have not been censored before that time. Under the independent-censoring condition for estimation, censoring removes individuals from later risk sets but is not counted as an event of a competing cause.
When event times are tied, use the total number of events at that time and the cause-specific counts among them in the updates. The formula treats the tied causes through those grouped increments. The event counts must satisfy \(0\le d_{kj}\le d_j\le Y_j\), and all risk-set sizes refer to the instant just before events at that time are processed.
Why the Formula Has These Weights
A short influence-function argument explains the two squared weights. Write \(\Delta \hat F_k(t_j)=\hat S(t_j-)d_{kj}/Y_j\) for the estimated target-cause increment at \(t_j\). A perturbation to the target-cause hazard at that time changes the CIF directly, but it also changes the number remaining event-free for subsequent times. A perturbation to a competing-cause hazard does not directly add to the target CIF; instead it changes the event-free probability available for later target events.
For a fixed horizon \(t\), the estimated target-CIF contribution after \(t_j\), conditional on being event-free just after \(t_j\), is \(\{\hat F_k(t)-\hat F_k(t_j)\}/\hat S(t_j)\). Consequently, the influence weight for a target-cause increment is proportional to one minus this future contribution, while the weight for a competing-cause increment is proportional to the future contribution itself. The common scale factor for either is \(\hat S(t_j-)/Y_j\). Squaring these weights and summing the event-count contributions gives the displayed variance estimate. This is the plug-in counting-process variance: it uses observed event counts to estimate the variability of the cause-specific increments.
This reasoning also clarifies why a competing event can matter. If a competing event occurs at \(t_j\), it reduces the number who can experience the target event later. When the horizon includes later target events, uncertainty in that competing-event increment can therefore alter the estimated target CIF.
Worked Example: Two Event Times and a Competing Cause
Suppose a hypothetical cohort has 20 people at risk at time \(t_1\). At \(t_1\), 2 experience target cause \(k\) and 1 experiences a competing cause. At \(t_2\), 17 are at risk; 1 experiences cause \(k\) and 2 experience a competing cause. There is no censoring before either time. Calculate the variance estimate for the CIF through \(t_2\).
At \(t_1\), \(Y_1=20\), \(d_{k1}=2\), and \(d_1=3\). Thus \(\hat F_k(t_1)=1(2/20)=0.1000\) and \(\hat S(t_1)=1(1-3/20)=0.8500\). At \(t_2\), \(Y_2=17\), \(d_{k2}=1\), and \(d_2=3\). The additional target increment is \(0.8500(1/17)=0.05000\), so \(\hat F_k(t_2)=0.1500\); also \(\hat S(t_2)=0.8500(14/17)=0.7000\).
For \(t_1\), the future-increment fraction is \((0.1500-0.1000)/0.8500=0.05882\). There is one competing event at \(t_1\), so the contribution is
At \(t_2\), the future-increment fraction is zero because \(t_2\) is the horizon. Its contribution is \((0.8500/17)^2[1(1-0)^2+2(0)^2]=0.002500\). The total variance estimate is \(0.004438+0.002500=0.006938\), and the corresponding estimated standard error is \(\sqrt{0.006938}=0.08329\). The CIF and its standard error are probabilities, so both are dimensionless.
Worked Example: A Competing Event Contributes Through Later Risk
In another hypothetical cohort, 12 people are at risk at \(t_1\): 1 has the target event and 2 have competing events. At \(t_2\), the 9 remaining people are at risk: 2 have the target event and 1 has a competing event. Find the Aalen variance estimate through \(t_2\).
The CIF and event-free estimates after \(t_1\) are \(\hat F_k(t_1)=1/12=0.08333\) and \(\hat S(t_1)=9/12=0.7500\). At \(t_2\), the target increment is \(0.7500(2/9)=0.1667\), giving \(\hat F_k(t_2)=0.2500\). The event-free estimate becomes \(0.7500(6/9)=0.5000\).
At \(t_1\), the future-increment fraction is \((0.2500-0.08333)/0.7500=0.2222\). Since there are 2 competing events at \(t_1\), their variance contribution is included:
At \(t_2\), the future-increment fraction is zero, so the contribution is \((0.7500/9)^2[2]=0.01389\). Therefore the total variance estimate is \(0.004887+0.01389=0.01878\), with estimated standard error \(\sqrt{0.01878}=0.1370\). The competing events at \(t_1\) contribute because they affect the people available to experience the target event at \(t_2\).
Assumptions, Diagnostics, and Limitations
The variance calculation relies on the same basic conditions as the CIF estimator. Event types must be mutually exclusive for an individual at a given time, event times and causes must be recorded consistently, and the risk set must correctly represent who remains under observation and event-free. Censoring must be independent of the event process, at least conditional on any variables used to define the analysis, for the estimator and its variance to have the intended interpretation. The observations are treated as independent across individuals; clustering or repeated observations can invalidate this variance calculation unless dependence is addressed by an appropriate method.
Before interpreting a result, check the input and intermediate quantities:
- Confirm \(Y_j\) is the pre-event risk set, and that the cause-specific counts sum to \(d_j\).
- Verify \(d_j\le Y_j\), and check that \(\hat S(t_j)\) and \(\hat F_k(t_j)\) follow the stated updates.
- Ensure that the future-increment fraction uses the post-event \(\hat F_k(t_j)\) and \(\hat S(t_j)\), not their pre-event values.
- Check that the variance is nonnegative and that a reported standard error is its square root.
The Aalen estimate is a large-sample variance estimate. With very small risk sets, few target events, or sparse causes, its approximation can be unstable; a small estimated variance does not by itself establish that the estimate is precise. The formula also does not correct biased estimation from informative censoring, incorrect event classification, or a misspecified analysis population. It estimates pointwise sampling variance at the chosen horizon, not uncertainty for an entire curve simultaneously.
The main alternative is to use resampling, such as a subject-level bootstrap, to estimate variability by repeatedly recalculating the CIF in resampled datasets. Resampling can be useful when a closed-form variance is difficult to implement, but it requires a suitable resampling scheme and can also be unreliable with sparse events. The Aalen estimate is computationally direct and transparent: the contribution from every event time can be inspected. Neither approach removes the need for correct risk sets and appropriate censoring assumptions.
Common Mistake
A frequent error is to include only target-cause events in the variance calculation and set the contribution from competing events to zero. That reasoning confuses “does not directly increase the target CIF” with “cannot affect its uncertainty.” The correction is to include the \(d_{-k,j}\) term at each event time. Its squared weight is zero at the horizon itself, but it can be positive earlier when target events remain possible. A second error is to use the final CIF in place of \(\hat F_k(t_j)\) inside the future-increment fraction; doing so erases the distinction between events occurring now and events occurring later.
Check Your Understanding
Try each question, then compare your reasoning with the solutions below.
- At an event time, \(Y_j=25\), \(d_{kj}=2\), and \(d_j=5\). What are \(d_{-k,j}\) and the event-free multiplier at this time?
- Why can a competing event contribute to the variance estimate at an early time but have zero contribution at the final horizon event time?
- Suppose \(\hat F_k(t)=0.30\), \(\hat F_k(t_j)=0.10\), and \(\hat S(t_j)=0.80\). Calculate the future-increment fraction.
- What is wrong with using a risk set measured after the events at \(t_j\) as \(Y_j\)?
Solutions. (1) \(d_{-k,j}=d_j-d_{kj}=5-2=3\), and the event-free multiplier is \(1-d_j/Y_j=1-5/25=0.8000\). (2) An early competing event can change how many individuals remain available for target events later, so its future-increment weight may be positive. At the horizon event time there are no later target increments, so that weight is zero. (3) The fraction is \((0.30-0.10)/0.80=0.25\). (4) \(Y_j\) must count individuals at risk immediately before the event time; using the post-event count changes the denominator and generally overstates the event increments per person at risk.