Tutorials › Competing Risks and Multi-State Models › Deriving The Mean Cumulative Function Estimator

Recurrent-Event Estimands and Models · Tutorial 604 of 699

Deriving The Mean Cumulative Function Estimator

Learn how inverse-censoring weights recover the population mean event count from partially observed recurrent-event histories, and how those weights relate to the observed risk set.

Advanced 11 min read

What You'll Learn

  • Define the mean cumulative function as the expected recurrent-event count by time.
  • Derive inverse-censoring weights from independent right censoring.
  • Calculate weights using a censoring survival estimate and event-time risk sets.
  • Distinguish the target population mean from an average among uncensored subjects.
  • Check positivity, censoring assumptions, and risk-set calculations.

Why Weight Observed Event Contributions?

A recurrent-event history may be observed only until a participant is censored, so later events are missing. Simply averaging the event counts that happen to be recorded can therefore underestimate the population’s cumulative event burden. The mean cumulative function (MCF) targets the expected number of events by each time, not the event rate among those who remain observed.

The key idea is to give more weight to an event observed at a time when fewer subjects are still under observation. Under independent censoring, an observed event at time \(u\) represents the event contribution of approximately \(1/G(u-)\) subjects, where \(G(u-)\) is the probability of remaining uncensored until just before \(u\). The resulting estimator is an inverse-probability-of-censoring weighted (IPCW) estimator.

Definition: For subject \(i\), let \(N_i(t)\) be the number of recurrent events by time \(t\), and let \(C_i\) be the censoring time. The mean cumulative function is \(\mu(t)=E\{N_i(t)\}\). Write \(\widetilde N_i(t)=N_i(t\wedge C_i)\) for the observed event count and \(Y_i(u)=I(C_i\geq u)\) for the indicator that the subject is still observed immediately before time \(u\). The censoring survival function is \(G(u-)=P(C_i\geq u)\). The left limit specifies observation just before \(u\), so an event recorded at \(u\) is weighted by the probability of being observed up to that event time.

Deriving the IPCW Estimator

Assume subjects are independent and identically distributed, censoring is independent of the subject’s entire recurrent-event process, and the probability of remaining uncensored is positive through the time range of interest. In particular, independent censoring means \(C_i\) is independent of \(N_i(\cdot)\); it does not require the recurrent events within a subject to be independent of one another. Event histories must be recorded correctly up to censoring.

To see why weighting works, consider an event increment at time \(u\). Independence means that whether a subject is still observed at \(u\) does not select subjects according to their event histories. Thus the expected observed event increment is the population increment multiplied by the chance of being observed:

$$ E\{Y_i(u)\,dN_i(u)\}=G(u-)\,E\{dN_i(u)\}. $$

Dividing an observed increment by \(G(u-)\) consequently recovers its population expectation. Summing these weighted increments over subjects and event times gives the estimator when \(G\) is known:

$$ \widehat\mu_{\mathrm{IPCW}}(t) = \frac{1}{n}\sum_{i=1}^n \int_0^t \frac{Y_i(u)}{G(u-)}\,dN_i(u) = \frac{1}{n}\sum_{i=1}^n \int_0^t \frac{d\widetilde N_i(u)}{G(u-)}. $$

The integral is a sum over observed event times: every event for subject \(i\) at time \(u\) adds \(1/\{nG(u-)\}\) to the estimated MCF. For an event time shared by several subjects, their contributions are all included. Since \(G\) is usually unknown, replace it with an estimate \(\widehat G\), commonly the Kaplan–Meier estimate of the censoring survival distribution.

Result: With a common censoring distribution, no delayed entry, and ordinary right censoring, define \(Y(u)=\sum_{i=1}^nY_i(u)\), the number of subjects still under observation immediately before \(u\). The censoring Kaplan–Meier estimate satisfies \(\widehat G(u-)=Y(u)/n\). Therefore the plug-in IPCW estimator can be written $$ \widehat\mu(t)=\frac{1}{n}\sum_{i=1}^n\int_0^t\frac{d\widetilde N_i(u)}{\widehat G(u-)} =\sum_{u\leq t}\frac{dN_{\cdot,\mathrm{obs}}(u)}{Y(u)}, $$ where \(dN_{\cdot,\mathrm{obs}}(u)\) is the number of observed events at \(u\). An event time with \(Y(u)\) subjects under observation therefore adds \(1/Y(u)\) per event. This identity uses the censoring risk set: recurrent events do not remove a subject from observation or from that risk set.

For the identity, the censoring Kaplan–Meier estimate multiplies the conditional probabilities of not being censored at earlier censoring times. With no delayed entry, its risk set loses subjects only through censoring, so these factors telescope to the proportion still uncensored. Event times do not remove people from this censoring risk set. When censoring and events are tied, the analysis must follow the study’s rule for whether an event at the censoring time is observed and apply a consistent risk-set convention.

Worked Calculations

Worked Example: Recovering an Event Increment by Weighting

Suppose a hypothetical cohort has \(n=100\) subjects. At a particular time interval, 80 are still observed, and 8 events occur among them. Assume censoring is independent of recurrent-event histories and use the known observation probability \(G=0.80\) for this interval. What is the estimated contribution of this interval to the population mean event count?

Each observed event represents \(1/G=1/0.80=1.25\) population event contributions. The estimated total event contribution is \(8/0.80=10\). Dividing by all 100 subjects gives \(10/100=0.10\) events per subject.

$$ \frac{1}{n}\frac{dN_{\mathrm{obs}}}{G} = \frac{1}{100}\frac{8}{0.80} = 0.10\ \text{events per subject}. $$

If the 8 recorded events were simply divided by 100, the contribution would be \(0.08\) events per subject. That calculation treats unobserved event histories as though they had no events. The weighted contribution corrects for the 20% who were no longer observed, under the stated independence assumption.

Worked Example: Using the Number Still Under Observation

Consider four hypothetical subjects followed from time 0. Subjects A and D remain observed through time 4. Subject C is censored at 2.5, and subject B at 3. Their observed event times are: A at 1 and 3.5; B at 2; C at 1.5; and D at 1, 2, and 3.5. There are no tied events and censoring times do not coincide with event times. Assume censoring is independent of event histories and estimate the MCF through time 3.5.

The censoring survival estimate immediately before time 1, 1.5, and 2 is 1, because no one has yet been censored. At time 2.5, one of four subjects is censored, so the estimated survival becomes \(3/4\). At time 3, one of the three still observed is censored, giving \( (3/4)(2/3)=1/2\). Thus, immediately before time 3.5, \(\widehat G=1/2\), and two subjects remain under observation.

At time 1, two events contribute \(2/4=0.50\). At 1.5, one contributes \(1/4=0.25\). At time 2, two contribute \(2/4=0.50\). At 3.5, two contribute \(2/2=1.00\). Adding the increments gives the estimated mean event count by time 3.5:

$$ \widehat\mu(3.5)=\frac{2}{4}+\frac{1}{4}+\frac{2}{4}+\frac{2}{2} =0.50+0.25+0.50+1.00 =2.25\ \text{events per subject}. $$

The last two recorded events receive greater weight because only two subjects remain under observation. Equivalently, each contributes \(1/\{4(1/2)\}=1/2\) to the cohort average, for a combined increment of 1.00. These calculations use the observation status just before each event time; censoring after an event does not remove that event from the record.

Worked Example: When Censoring Probabilities Differ by Group

In a hypothetical study, four subjects belong to two prespecified strata, with two subjects in each. At a particular time, one subject in stratum A remains observed, and that subject has one event; the estimated probability of remaining observed in A is \(0.50\). Both subjects in stratum B remain observed, and one has an event; the corresponding probability in B is \(1.00\). Assume censoring is independent of event histories within each stratum and both probabilities are correctly specified.

With stratum-specific weights, the weighted total event contribution is \(1/0.50+1/1.00=3\). Dividing by the four subjects estimates a mean increment of \(3/4=0.75\) events per subject. The unweighted observed-event average is \(2/4=0.50\), which does not account for the lower observation probability in stratum A.

$$ \widehat\mu_{\mathrm{IPCW}} = \frac{1}{4}\left(\frac{1}{0.50}+\frac{1}{1.00}\right) = 0.75\ \text{events per subject}. $$

When observation probabilities differ across strata, use the appropriate conditional censoring probability for each subject. A single overall number still under observation need not reproduce this stratified estimate.

Assumptions, Diagnostics, and Alternatives

The estimator targets \(E\{N_i(t)\}\) for the study’s source population. Its interpretation depends on the censoring and observation process, not on a model for the dependence among a subject’s recurrent events. In practice, check that the following conditions are credible:

  • Independent censoring: after any conditioning used in the analysis, censoring must not preferentially hide histories with systematically different future event counts. If censoring depends on measured covariates, estimate \(G(u-\mid X_i)\) conditional on those covariates and use that weight. Unmeasured dependence between censoring and future events is not repaired by weighting on unrelated variables.
  • Positivity: \(G(u-)>0\) through the time range being estimated. If almost no one remains observable, weights become large and the estimate can be unstable. Restricting the analysis to a shorter horizon may be more defensible than extrapolating beyond the supported follow-up.
  • Correct censoring estimation and event recording: censoring times and censoring indicators must be correctly represented in the risk sets, and all recurrent events before censoring must be recorded. Errors in dates, event counts, or tie handling change the contributions.

Useful diagnostics include plotting the number under observation over time, inspecting the estimated censoring survival curve, and reporting whether the largest weights occur where few subjects remain. Compare results across reasonable censoring models when conditional weighting is used. Large weights, abrupt changes in the estimated MCF, or estimates dominated by a few late events signal limited information; they do not by themselves show that the estimator is biased, but they make its precision and assumptions especially important.

The IPCW estimator is closely related to the pooled risk-set estimator \(\sum dN_{\cdot,\mathrm{obs}}(u)/Y(u)\). Under the common-censoring, no-delayed-entry conditions stated above, they are the same calculation written in different ways. IPCW makes the probability correction explicit and extends naturally to conditional censoring models. By contrast, a raw average of observed counts divided by the full cohort size fails to correct for follow-up loss, while an average restricted to subjects who remain observed at a chosen time generally describes a selected subset rather than the original population.

This is a nonparametric approach to the MCF, not a model for event rates or event-specific effects. It does not make informative censoring ignorable, and it cannot identify mean event counts at times where the probability of observation is zero. A finite-sample estimate can also be noisy when late risk sets are small. The formula defines the estimate; uncertainty quantification requires additional methods and is not conveyed by the curve alone.

Common Mistake

Pitfall: Dividing the total observed event count by the original sample size and treating censored subjects as having zero events after censoring. This undercounts event contributions whenever follow-up ends before the target time. Instead, weight each observed event at \(u\) by \(1/\widehat G(u-)\), or equivalently by \(1/Y(u)\) under the common-censoring conditions above, and then accumulate the increments. The correction is justified only when the censoring assumptions and positivity condition are credible.
1
Specify the target and follow-up.
Define the MCF as the expected number of recurrent events by time \(t\), and establish the event/censoring tie convention.
2
Estimate observation probabilities.
Estimate \(G(u-)\), using a common censoring distribution or an appropriate conditional model when needed.
3
Weight and accumulate events.
Add \(1/\{n\widehat G(u-)\}\) for each observed event, or \(dN_{\cdot,\mathrm{obs}}(u)/Y(u)\) under the common-censoring setup.
4
Check support and interpretation.
Inspect risk-set sizes and weights, then report the estimated mean number of events per subject over time.

Check Your Understanding

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

  1. If \(G(u-)=0.50\), what is the inverse-censoring weight for one observed event at \(u\)?
  2. In a cohort of 20, there are 10 subjects still under observation just before an event time, and 3 observed events occur then. What increment does the pooled risk-set estimator add?
  3. Why does an event at a late time often contribute more than an event at an early time?
  4. Does the IPCW derivation require recurrent events within a subject to be independent? State the key censoring condition instead.
  5. What is the main problem if the estimated probability of remaining observed is zero at a time of interest?

Solutions. (1) \(1/0.50=2\); the event’s contribution before division by cohort size is two weighted event units. (2) \(3/10=0.30\) events per subject. (3) Fewer subjects may remain under observation, so \(G(u-)\) is smaller and the inverse weight is larger. (4) No. The key condition is that censoring be independent of the recurrent-event process, or conditionally independent given variables used for weighting. (5) The weight is undefined: there is no observed support for estimating the target at that time without additional assumptions.

Clinical Biostats