Tutorials › Competing Risks and Multi-State Models › A Worked Variance Calculation

Cumulative Incidence Functions · Tutorial 67 of 699

A Worked Variance Calculation

Learn how event-time influence contributions combine to quantify uncertainty in an Aalen–Johansen cumulative incidence estimate.

Intermediate 11 min read

What You'll Learn

  • Identify the event-time quantities needed for an Aalen variance calculation.
  • Calculate and add variance contributions, including when one event time has a tied-event adjustment.
  • Check the cumulative incidence and survival estimates that enter the calculation.
  • Interpret the resulting standard error in the outcome’s probability scale.
  • Recognize when censoring, small risk sets, or a late horizon make the estimate unstable.

Why calculate variance event time by event time?

An Aalen–Johansen cumulative incidence estimate is a stepwise sum of event contributions: the probability of remaining event-free just before a time, multiplied by the estimated conditional probability of the event of interest at that time. Its uncertainty is likewise assembled from contributions across event times. A hand calculation is useful not only for obtaining a standard error, but also for seeing which times contribute most and checking that the risk sets and event counts have been used consistently.

This tutorial focuses on the variance calculation, not on re-deriving the cumulative incidence estimator. For cause \(k\), write \(\hat F_k(t)\) for the estimated cumulative incidence by time \(t\), \(\hat S(t-)\) for the estimated probability of remaining free of every event just before \(t\), \(Y_j\) for the number at risk just before event time \(t_j\), and \(d_{kj}\) for the number of cause-\(k\) events at that time. Let \(d_j\) be the total number of events from all causes at \(t_j\).

Definition: An Aalen variance estimate is a plug-in estimate of the sampling variance of a cumulative incidence estimator, formed from estimated event-time influence contributions. In a no-tie calculation, an event-time contribution can be written as \(V_j=A_j^2d_j/[Y_j(Y_j-d_j)]\), where \(A_j\) is the event-time coefficient from the linearized estimator. The estimated variance through \(t\) is the sum of the applicable contributions, and the standard error is its square root. With ties, the contribution uses the corresponding cause-specific event-count covariance terms; it is not generally obtained by treating tied failures as separate event times.

The coefficient \(A_j\) summarizes how a perturbation at time \(t_j\) affects the cumulative incidence at the horizon of interest. It depends on the survival and cumulative incidence estimates through that time and on the contribution of later event times. Thus the variance calculation is horizon-specific: a contribution at an early time may be different when the target horizon changes.

The calculation relies on independent subjects, correctly recorded event times and causes, and a valid independent-censoring condition for estimating the event process. In particular, censoring must not selectively remove people with different future event risks after conditioning on the information used in the analysis. Risk sets must reflect delayed entry, censoring, and all causes correctly. The variance formula estimates sampling uncertainty under these conditions; it does not repair informative censoring, dependence between subjects, or a misspecified observation process.

A calculation across event times

Consider a hypothetical competing-risk analysis for cause 1 at horizon \(t_3\). The estimator has already been calculated from the risk sets and cause counts. It equals \(1/10\) at \(t_2\). Immediately before \(t_3\), \(\hat S(t_3-)=27/34\); at \(t_3\), one cause-1 event occurs among \(Y_3=13\) people at risk. The influence-function calculation supplies the earlier variance contributions and the event-time coefficients shown below. They are presented to keep the hand calculation focused on assembling and checking the variance.

TimeVariance calculationContribution
\(t_1\)Earlier event-time influence terms\(V_1=0.001200000\)
\(t_2\)Earlier event-time influence terms\(V_2=0.00372681975\)
\(t_3\)\(1(27/34-0)^2/[13(13-1)]\)\(V_3=729/180336\approx0.004042454\)

Worked Example: Summing the Variance Contributions

Use the event-time contributions in the table to estimate the variance and standard error of \(\hat F_1(t_3)\).

At \(t_3\), the cause-1 contribution to the cumulative incidence is the event-free probability just before the time multiplied by the cause-1 event fraction:

$$ \hat S(t_3-)\frac{d_{13}}{Y_3} =\frac{27}{34}\frac{1}{13} =\frac{27}{442}. $$

Therefore the cumulative incidence at the horizon is

$$ \hat F_1(t_3) =\frac{1}{10}+\frac{27}{442} =\frac{221}{2210}+\frac{135}{2210} =\frac{356}{2210} =\frac{178}{1105} \approx 0.161086. $$

For the \(t_3\) variance term, there is one cause-1 event, \(Y_3=13\), and the influence coefficient displayed for this event is \(27/34-0\). Hence

$$ V_3 =\frac{1(27/34-0)^2}{13(13-1)} =\frac{729}{180336} \approx 0.004042454. $$

Adding all three terms gives

$$ \widehat{\operatorname{Var}}\{\hat F_1(t_3)\} =V_1+V_2+V_3 =0.001200000+0.00372681975+0.004042454086 \approx 0.008969274. $$

The standard error is the square root of the estimated variance:

$$ SE\{\hat F_1(t_3)\} =\sqrt{0.008969274} \approx 0.0947063. $$

The estimate is about \(0.1611\), or 16.11 percentage points, and its estimated standard error is about \(0.09471\), or 9.471 percentage points. This standard error describes estimated sampling variability on the cumulative-incidence probability scale. It is not itself a confidence interval and does not say that the true risk is within one standard error of the estimate with a particular probability.

Why the terms have this form

The event-time sum follows from linearizing the estimator. A small change in an estimated event probability at time \(t_j\) changes the cumulative incidence at the target horizon. The influence coefficient records that change. The event count has sampling variability within the risk set, so the variance of the linearized contribution is the squared coefficient multiplied by the estimated variance of the event-process increment. Under the no-tie Aalen form, that increment variance is estimated using \(d_j/[Y_j(Y_j-d_j)]\). The terms are then added over event times.

This is a plug-in variance calculation: unknown event probabilities and influence quantities are replaced by their estimates. Its practical justification is that the influence-function approximation represents the estimator’s first-order sampling variation; summing the estimated contributions estimates the variance of that approximation. It is an asymptotic approximation, not an exact finite-sample distribution.

When causes are competing, a change in one cause-specific event probability also changes the probability of remaining event-free, and therefore changes later contributions. The influence coefficient must account for this relationship. Calculating a separate variance for each cause-specific hazard and simply adding them omits covariance terms and generally gives the wrong cumulative-incidence variance. The earlier material on covariance between cause-specific estimates is relevant precisely because these components are not independent.

Worked Example: Checking the Last Event-Time Term

Suppose a calculation reports the last contribution as \(0.004042442\), using one cause-1 event among 13 at risk and coefficient \(27/34\). Check it before proceeding.

The denominator is \(13(13-1)=156\), and the squared numerator is \((27/34)^2=729/1156\). Thus

$$ V_3=\frac{729/1156}{156} =\frac{729}{180336} \approx 0.004042454. $$

So \(0.004042442\) is not the correctly rounded value. Keeping enough precision in each contribution gives a total variance of approximately \(0.008969274\), and a standard error of approximately \(0.0947063\). Rounding intermediate values too early can cause a small but avoidable disagreement in the final result.

Assumptions, diagnostics, and alternatives

Before interpreting the standard error, check that each event-time contribution uses the intended horizon and the correct risk set immediately before that event time. Verify that \(d_j\) counts all causes at the time, while \(d_{kj}\) counts only cause \(k\). If times are tied, use a tied-event variance calculation that accounts for the cause-specific counts jointly. The earlier material on handling tied event times explains why splitting a tied time into an arbitrary sequence can change the calculation.

Useful checks include confirming that every variance contribution is nonnegative, that the total variance equals the sum of the displayed terms before rounding, and that the square root is taken only after summation. A negative contribution usually signals a coding or algebra error. An unexpectedly large contribution may reflect a small risk set, a large influence coefficient, or an event time that strongly affects the estimate at the chosen horizon. Also compare the size of the standard error with the estimate: when the standard error is large relative to the estimate, uncertainty is substantial and a normal approximation may be questionable.

For independent censoring, the calculation uses the observed risk sets to estimate the event process. Informative censoring can make the cumulative incidence estimate itself biased; a variance formula cannot correct that bias. Similarly, a very late horizon with few people remaining at risk can produce unstable estimates and unreliable asymptotic standard errors. Report the horizon and the number at risk near it, and do not treat a numerically precise output as evidence that the underlying data support precise inference.

The Aalen plug-in calculation is efficient and uses the observed event history directly. A subject-level bootstrap is an alternative that repeatedly resamples independent subjects and recalculates the estimator; it can reveal skewness or other departures from a simple normal approximation, but its results can be unstable in small samples or near the tail of follow-up. Greenwood-type variance calculations are associated with single-event survival estimation and do not, by themselves, account for the covariance structure needed for a cause-specific cumulative incidence. These methods answer related but not interchangeable uncertainty questions.

Worked Example: Interpreting a Large Standard Error

Suppose a separate hypothetical analysis estimates a cause-2 cumulative incidence of \(0.08\) at 5 years, with an Aalen standard error of \(0.06\). What does that calculation suggest?

The estimate is an 8% estimated probability of cause-2 failure by 5 years in the population represented by the analysis, under the stated censoring and sampling assumptions. The standard error is 6 percentage points. Its size relative to the estimate indicates substantial sampling uncertainty; it would be unwise to describe the estimate as precise based on the point estimate alone.

The standard error is not a 95% interval and does not imply a 95% probability that the true cumulative incidence lies between \(0.02\) and \(0.14\). A confidence interval requires a separate construction and its own assumptions. In particular, a symmetric normal interval can be problematic when an estimate is near 0 or 1; interval construction is a separate topic.

Common mistake and key takeaway

  • Wrong: Treat each cause-specific estimate as independent, calculate separate variances, and add them. Correction: The cause-specific contributions are linked through the event-free probability. Use the cumulative-incidence influence calculation with the required covariance structure.
  • Wrong: Replace a tied event time by several ordered single events. Correction: Keep the tied-time counts together and use the corresponding tied-event variance contribution.
  • Wrong: Round each contribution heavily before adding it. Correction: Retain full precision through the sum and square root, then report a sensible number of significant figures.
  • Wrong: Interpret a small calculated standard error as proof that censoring assumptions hold. Correction: The variance quantifies sampling uncertainty under the model assumptions; it does not diagnose or remove bias from informative censoring.
Key takeaway: An Aalen standard error is obtained by summing the appropriate event-time influence-variance contributions and taking the square root. Correct risk sets, event counts, tie handling, horizon-specific influence coefficients, and adequate numerical precision are all essential.

Check Your Understanding

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

  1. If the event-time variance contributions are \(0.0020\), \(0.0030\), and \(0.0010\), what are the estimated variance and standard error?
  2. At one event time, \(Y_j=20\), \(d_j=1\), and the no-tie influence coefficient is \(A_j=0.5\). Calculate \(V_j\) using \(A_j^2d_j/[Y_j(Y_j-d_j)]\).
  3. Why must the cause-specific event counts at a tied time be handled jointly rather than arranged in an arbitrary order?
  4. What does a standard error of \(0.04\) mean when the estimated cumulative incidence is \(0.12\)? What does it not mean?
  5. Can a correct Aalen variance calculation remove bias caused by informative censoring? Explain.

Solutions. 1. The variance is \(0.0020+0.0030+0.0010=0.0060\), so the standard error is \(\sqrt{0.0060}\approx0.07746\). 2. \(V_j=0.5^2/[20(19)]=0.25/380\approx0.0006579\). 3. Tied failures share the same risk set and their cause counts contribute jointly to the event-process covariance; imposing an order changes the calculation without data to justify that order. 4. The estimated sampling standard deviation is 4 percentage points on the cumulative-incidence scale, under the assumptions. It is not itself a confidence interval and does not give the probability that the true risk is within 4 percentage points. 5. No. The variance estimate addresses sampling variability under the censoring assumptions; informative censoring can bias the cumulative incidence estimate itself.

Clinical Biostats