Tutorials › Marginal Structural Models › IPCW for Recurrent-Event Mean Functions

Censoring and Informative Dropout · Tutorial 238 of 501

IPCW for Recurrent-Event Mean Functions

Learn to construct and justify inverse censoring weights for recurrent-event mean functions, and to recognize when those weights cannot recover the intended population mean.

Advanced 12 min read

What You'll Learn

  • Define the marginal recurrent-event mean function and its weighted counting-process estimator.
  • State the observation-history and positivity assumptions required for inverse censoring weighting.
  • Derive why the weighted event-count process targets the full-data mean.
  • Calculate weighted contributions under common and history-dependent censoring survival.
  • Identify how positivity problems and censoring-model errors affect the estimator.
  • Distinguish recurrent-event mean estimation from survival and complete-case approaches.

Why recurrent events need their own censoring adjustment

A recurrent-event outcome is a count accumulated over time: for example, the number of hospital admissions or asthma exacerbations by time \(t\). If follow-up ends early for some people, their observed counts stop accumulating even though their full-data counts after censoring remain part of the population quantity of interest. A mean of the recorded counts therefore need not estimate the mean count that would have been observed under complete follow-up.

Inverse probability of censoring weighting (IPCW) addresses this by upweighting event increments that are observed in histories where remaining under observation was less likely. The contribution is attached to each event increment, using the probability of still being observed at that event time. This is a mean-count construction, not a survival probability: multiple events from one person can each contribute.

Definition: Let \(N_i^*(t)\) be subject \(i\)'s full-data recurrent-event counting process by time \(t\), and let \(C_i\) be the censoring time. The observed process is \(N_i(t)=\int_0^t R_i(u)\,dN_i^*(u)\), where \(R_i(u)=I(C_i\ge u)\) indicates observation at \(u\). The marginal recurrent-event mean function is \(\mu(t)=E[N_i^*(t)]\). If \(G_i(u)\) is the conditional probability of remaining uncensored through \(u\), the IPCW estimator is \(\hat\mu_{\mathrm{IPCW}}(t)=n^{-1}\sum_{i=1}^n\int_0^t R_i(u)G_i(u)^{-1}\,dN_i(u)\).

The integral is a weighted sum over observed event times. If subject \(i\) has observed events at \(u_{i1},\ldots,u_{ik}\), their contribution is \(\sum_{j=1}^k 1/G_i(u_{ij})\). A person with no observed events contributes zero, whether fully followed or censored before an event. This does not mean the person's full-data count is known to be zero; weighting uses the observed contributions across the sample to recover the population mean.

Observation-history assumptions and weights

Write \(\mathcal H_i^*(u-)\) for the full-data history just before \(u\), including baseline characteristics and the prior recurrent-event and covariate history. The observed history \(\mathcal H_i(u-)\) contains the corresponding information while the person remains under observation. A conditional censoring survival probability is built from the censoring process given that history. In continuous time, when censoring has conditional intensity \(\lambda_{C,i}(u\mid\mathcal H_i(u-))\) and there are no tied censoring and event times, it is commonly written along a history path as

$$ G_i(t)=\exp\left\{-\int_0^t \lambda_{C,i}(u\mid\mathcal H_i(u-))\,du\right\}. $$

The weight at an event time uses the history available immediately before that event. If the censoring intensity depends on previous events, for example, subjects with different event histories can have different weights. The history used to predict censoring must be observed up to the time at which the weight is needed; it cannot require information that would only be available after censoring.

  • Conditional independent censoring (coarsening at random). Given the relevant observed history, censoring carries no additional information about the future full-data event process. Equivalently for this weighting argument, the conditional probability of remaining observed through \(u\), given the full event history, is the specified \(G_i(u)\) determined by the available history.
  • Positivity. For histories that occur in the target population and have event increments of interest by \(t\), \(G_i(u)>0\). If some histories are certain to be censored before an event time, their later event contributions cannot be recovered from observed data.
  • Correct censoring probabilities. The \(G_i(u)\) values are known or estimated consistently from a correctly specified censoring model. With estimated weights, additional estimation uncertainty must be reflected in inference.
  • Well-defined mean and observation process. \(N_i^*(t)\) is a nonexplosive counting process on the interval considered, and \(E[N_i^*(t)]<\infty\). The event and censoring ordering is specified; here an event at \(u\) is observed when \(C_i\ge u\).

The marginal target averages over the population's history distribution. It is not a mean conditional on the people who remain observed. If the scientific target is a treatment-specific mean, the same censoring argument can be applied within the relevant treatment setting, but treatment exchangeability and treatment weighting are separate requirements.

Worked Example: A Common Censoring Survival Curve

Suppose four independent subjects are followed to time 2, and the censoring survival probability is common across them: \(G(u)=0.8\) for \(0\le u\le1\) and \(G(u)=0.5\) for \(1<u\le2\). Their observed events are: subject 1 at \(0.5\) and \(1.5\); subject 2 at \(1.5\); subject 3 at \(0.5\), followed by censoring at 1; and subject 4 has no observed events. Calculate the IPCW estimate at time 2.

Subject 1 contributes \(1/0.8+1/0.5=1.25+2=3.25\). The first event uses the survival probability through time \(0.5\); the second uses the probability through time \(1.5\).

Subject 2 contributes \(1/0.5=2\). Subject 3 contributes \(1/0.8=1.25\); censoring at 1 prevents any later observed contribution. Subject 4 contributes 0.

The estimated mean is therefore

$$ \hat\mu_{\mathrm{IPCW}}(2)=\frac{3.25+2+1.25+0}{4} =\frac{6.50}{4}=1.625. $$

The raw observed event-count mean is \(4/4=1\), but it treats the observed counts as if they were complete. The weighted estimate instead gives more representation to observed events at times when censoring has made observation less likely. The calculation does not establish that 1.625 is the true mean; its interpretation depends on the assumptions above.

Worked Example: History-Dependent Censoring Weights

Consider two equally represented history profiles. For profile L, the censoring intensity is \(0.10\) on \([0,1]\) and \(0.20\) on \((1,2]\). For profile H, it is \(0.30\) on \([0,1]\) and \(0.10\) on \((1,2]\). Each subject has observed events at times \(0.5\) and \(1.5\). Calculate the mean weighted count across the two subjects.

For profile L, cumulative censoring hazard is \(0.10(0.5)=0.05\) by time \(0.5\), so \(G_L(0.5)=\exp(-0.05)\). The first event weight is \(1/G_L(0.5)=\exp(0.05)\approx1.0513\). By \(1.5\), cumulative hazard is \(0.10(1)+0.20(0.5)=0.20\); hence \(1/G_L(1.5)=\exp(0.20)\approx1.2214\). The L subject contributes approximately \(1.0513+1.2214=2.2727\).

For profile H, the cumulative hazards at the two event times are \(0.30(0.5)=0.15\) and \(0.30(1)+0.10(0.5)=0.35\). The weights are therefore \(\exp(0.15)\approx1.1618\) and \(\exp(0.35)\approx1.4191\). The H subject contributes approximately \(1.1618+1.4191=2.5809\).

Averaging the two subject contributions gives \((2.2727+2.5809)/2\approx2.4268\). The distinct weights matter: applying one pooled censoring survival curve would fail to represent the specified difference in censoring by history.

Why the weighted process targets the full-data mean

The key identity is that, conditional on the full-data history, the chance of observing an event increment at \(u\) is \(G_i(u)\). Dividing the observed increment by that probability removes the selection caused by censoring, in expectation.

Theorem: Fix \(t\). Suppose the conditional independent censoring identity \(E[R_i(u)\mid\mathcal F_i^*]=G_i(u)\) holds for the full-data history \(\mathcal F_i^*\) through \(t\), with \(G_i(u)>0\) and \(G_i(u)\) measurable with respect to that full-data history. Suppose also that the weighted integral is integrable and \(E[N_i^*(t)]<\infty\). Then \(E[\int_0^t R_i(u)G_i(u)^{-1}\,dN_i^*(u)]=E[N_i^*(t)]=\mu(t)\).

Because \(R_i(u)dN_i^*(u)=dN_i(u)\), the integral in the theorem is the observed weighted contribution. To see the identity, condition on the full-data path. The nonnegative counting-process integral can be written as a sum over the subject's full-data event times \(u\le t\). At each such time, the conditional expected contribution is

$$ E\left[\left.\frac{R_i(u)}{G_i(u)}\right|\mathcal F_i^*\right] =\frac{E[R_i(u)\mid\mathcal F_i^*]}{G_i(u)} =\frac{G_i(u)}{G_i(u)}=1. $$

Thus each full-data event contributes one in conditional expectation. Summing over the finitely many event times on \([0,t]\), and then taking expectation over full-data paths, gives

$$ E\left[\left.\int_0^t\frac{R_i(u)}{G_i(u)}\,dN_i^*(u)\right|\mathcal F_i^*\right] =\int_0^t 1\,dN_i^*(u)=N_i^*(t). $$

Taking expectations proves the claim. The stated integrability condition justifies taking these expectations; the finite-mean condition makes the target finite. Positivity is needed for the divisions to be defined. \(\square\)

This result concerns the population expectation when the censoring probabilities are correct. With independent subjects and known weights, it also gives a direct consistency argument at each fixed \(t\): let \(Z_i(t)=\int_0^t R_i(u)G_i(u)^{-1}\,dN_i(u)\). If the \(Z_i(t)\) are identically distributed and integrable, the weak law of large numbers gives \(n^{-1}\sum_i Z_i(t)\xrightarrow{p}E[Z_i(t)]=\mu(t)\). Consistency of estimated weights requires additional conditions on their estimation and is not implied by this argument alone.

Worked contribution and a positivity warning

Worked Example: A Late Event With a Small Observation Probability

Suppose five subjects have a common known censoring survival of \(G(1)=0.8\) and \(G(2)=0.2\). By time 2, two observed events occur at time 1 and one at time 2; the other observed event histories contain no events. Compute the estimate and examine the late event's role.

Each time-1 event has weight \(1/0.8=1.25\), so the two early events contribute \(2(1.25)=2.50\). The time-2 event has weight \(1/0.2=5\). The total weighted count is \(2.50+5=7.50\), and the mean estimate is \(7.50/5=1.50\).

The late event contributes 5 by itself, two-thirds of the total weighted count. This is mathematically consistent with the specified censoring survival, but it signals that the estimate may be highly sensitive to a small number of observed late events. If the actual survival probability were \(0.4\) rather than \(0.2\), the correct late-event weight would be \(1/0.4=2.5\), not 5. A mistaken censoring model would then materially alter the estimate.

Failure modes and alternatives

A central diagnostic question is whether the observed histories support the required censoring probabilities. A fitted model that predicts very small \(G_i(u)\) creates very large \(1/G_i(u)\), so a few weighted events can dominate the estimated mean. Conversely, an estimated \(G_i(u)\) that is too large gives too little weight to those events. Check model fit and predicted censoring probabilities over time and across relevant histories; weight summaries and sensitivity checks can reveal instability, but cannot establish conditional independent censoring or prove that the model is correctly specified.

  • Positivity failure: If \(G_i(u)=0\) for a target history, no observed event at \(u\) can represent that history. Truncating large weights may reduce variability, but changes the estimator and does not restore information where observation probability is zero.
  • Unmeasured predictors of censoring and future events: If the observed history omits a common predictor of censoring and subsequent recurrent events, weighting on the recorded history may not remove selection bias.
  • Wrong time or history in the weight: Each event uses the probability of remaining observed through its own time, conditional on the history available just before it. Using a single end-of-follow-up weight for every increment, or using later history to define an earlier weight, does not implement the stated estimator.
  • Event-censoring ties: The convention \(R_i(u)=I(C_i\ge u)\) counts an event at the censoring time as observed. If the data collection protocol uses a different ordering, the risk indicator and censoring survival must match that protocol.

The unweighted observed mean is simpler but targets the mean among the observed records when censoring is informative, not generally the full-data mean. Complete-case analysis discards partially observed people and requires its own strong assumptions; it is not automatically unbiased. Kaplan–Meier methods estimate survival quantities under their assumptions, whereas the IPCW counting-process sum here directly estimates a mean cumulative event count. Normalizing weighted contributions can produce a ratio-type estimate, but it is not the same finite-sample estimator as the unnormalized IPCW mean proved above.

IPCW corrects selection due to censoring only to the extent that the observation-history assumptions and censoring model are credible. It does not model the recurrent-event process itself, supply information about unsupported histories, or remove uncertainty from estimated weights. For inference with estimated censoring weights, their estimation must be accounted for in the variance procedure.

Check Your Understanding

Answer each question, then check the solutions below.

  1. At an event time \(u\), why is the event contribution multiplied by \(1/G_i(u)\), rather than by \(1/G_i(t)\) for a later horizon \(t\)?
  2. A subject has two observed events at times with censoring survivals 0.8 and 0.4. What is the subject's weighted contribution?
  3. State the positivity condition relevant to a target history with event increments before time \(t\).
  4. What does a very large estimated weight indicate, and what does it not establish?

Solutions. (1) The contribution corrects the chance of being observed at the time that particular event occurred; a later horizon's survival probability is not the event-time observation probability. (2) The contribution is \(1/0.8+1/0.4=1.25+2.5=3.75\). (3) The probability of remaining uncensored through each relevant event time must be strictly positive for histories represented in the target population. (4) It indicates that the fitted model assigns a small observation probability to that history and that the weighted estimate may be unstable. It does not prove that the censoring model is correct or that censoring is conditionally independent given the recorded history.

Clinical Biostats