Tutorials › Marginal Structural Models › IPCW for Repeated Longitudinal Outcome Means

Censoring and Informative Dropout · Tutorial 239 of 501

IPCW for Repeated Longitudinal Outcome Means

Learn how cumulative censoring weights identify and estimate a marginal mean trajectory when outcomes are repeatedly measured but follow-up may stop informatively.

Advanced 12 min read

What You'll Learn

  • Define the time-specific censoring probability and cumulative inverse-probability weight.
  • State the sequential conditions that identify each marginal outcome mean.
  • Derive the inverse-weighting identity and the corresponding sample estimators.
  • Calculate time-specific weighted means from an observed longitudinal cohort.
  • Compare IPCW with complete-case analysis and describe when the weighting approach can fail.
  • Interpret basic signs of model, positivity, and follow-up problems.

Why Weight Repeated Outcomes?

A longitudinal study may measure an outcome repeatedly, yet some participants stop contributing measurements before the final visit. If the chance of remaining observed depends on prior health or other measured history, the mean among those still observed can differ from the mean in the original cohort. The target here is a separate marginal mean at each scheduled time: the mean outcome that would be observed in the original baseline population if outcome follow-up were complete.

Inverse-probability-of-censoring weighting (IPCW) reweights observed participants to represent those with similar observed histories who have become underrepresented through dropout. Each time point has its own weight, accumulating the inverse probabilities of remaining uncensored through that time. This is not a model for the outcome trajectory; it is a way to recover its time-specific marginal means under stated assumptions.

Definition: Consider \(n\) independent participants and scheduled times \(t=1,\ldots,T\). Let \(Y_t\) be the outcome at time \(t\) in the full-data process, and let \(R_t=1\) if the participant remains uncensored and \(Y_t\) is observed at time \(t\), with \(R_t=0\) otherwise. Monotone dropout means \(R_t=1\) implies \(R_{t-1}=1\); set \(R_0=1\). Let \(H_t\) denote the measured history available before the censoring decision at time \(t\), including baseline variables and previously observed outcomes and covariates. Define \(q_t(H_t)=P(R_t=1\mid R_{t-1}=1,H_t)\), the conditional probability of remaining observed at time \(t\), and \(G_t=\prod_{k=1}^t q_k(H_k)\), the cumulative probability of remaining observed through time \(t\). The marginal mean of interest is \(\mu_t=E[Y_t]\).

Identification and Estimation

The history in the censoring model must include measured predictors of both dropout and the outcome that are available before each censoring decision. The essential condition is sequential independent censoring: conditional on the measured history, retention at each time does not further select participants according to their future outcomes. One precise sufficient formulation is that, for every \(k\leq t\), \(P(R_k=1\mid R_{k-1}=1,\text{full data})=q_k(H_k)\). Here “full data” includes the outcome process, whether observed or not. The conditional probability on the right is the same as the observed-history retention probability defined above.

Identification also requires positivity: for histories occurring in the target population, \(q_k(H_k)>0\) at every \(k\leq t\). If a history makes continued observation impossible, outcomes for that history cannot be recovered by reweighting. For finite-variance inference, a stronger practical condition is often needed, such as bounded weights or suitable moment conditions. The model used to estimate each \(q_k\) must also be correctly specified, unless another valid estimation strategy supplies consistent probabilities.

Theorem: Under monotone dropout, sequential independent censoring, and positivity through time \(t\), $$ E\left[\frac{R_tY_t}{G_t}\right]=E[Y_t]=\mu_t \quad\text{and}\quad E\left[\frac{R_t}{G_t}\right]=1. $$

Proof. Conditional on the complete data, the sequential censoring condition gives \(P(R_k=1\mid R_{k-1}=1,\text{full data})=q_k(H_k)\). Since retention is monotone, repeated conditioning yields \(P(R_t=1\mid\text{full data})=\prod_{k=1}^t q_k(H_k)=G_t\). The product is determined by the full-data history, and is positive by assumption. Therefore, $$ E\left[\left.\frac{R_tY_t}{G_t}\right|\text{full data}\right] =\frac{Y_t}{G_t}P(R_t=1\mid\text{full data})=Y_t. $$ Taking expectations of both sides proves the first identity. Replacing \(Y_t\) by 1 proves the second. \(\square\)

The theorem leads to two common sample estimators. The Horvitz–Thompson estimator averages weighted outcomes over the original cohort, treating unobserved outcomes as contributing zero after multiplication by \(R_{it}\). The Hájek estimator divides the weighted outcome total by the total weight among those observed at that time. The latter is a normalized ratio and is often convenient in practice, but is not generally exactly unbiased in a finite sample.

$$ \widehat{\mu}^{\,HT}_t=\frac{1}{n}\sum_{i=1}^n\frac{R_{it}Y_{it}}{\widehat G_{it}}, \qquad \widehat{\mu}^{\,H}_t= \frac{\sum_{i=1}^n R_{it}Y_{it}/\widehat G_{it}} {\sum_{i=1}^n R_{it}/\widehat G_{it}}, \qquad \widehat G_{it}=\prod_{k=1}^t\widehat q_k(H_{ik}). $$

With known probabilities, independent and identically distributed participants, and finite expectations, the Horvitz–Thompson estimator has expectation \(\mu_t\) by the theorem. For consistency of the Hájek estimator, a simple sufficient set of conditions is that the probabilities are known, the weighted outcome and weight have finite first moments, and the denominator expectation is positive. The law of large numbers gives convergence of the numerator average to \(\mu_t\) and of the denominator average to 1; the ratio therefore converges in probability to \(\mu_t\). With estimated probabilities, consistency additionally requires that their estimation does not prevent convergence of these weighted averages—for example, under suitable regularity conditions, consistent censoring-model estimates and controlled weights suffice.

Worked Example: A Single-Time Weighted Mean

Suppose the baseline cohort has four participants. At a particular visit, two have history \(H=0\) and two have \(H=1\). Their outcomes are constant within history: \(Y=3\) for \(H=0\) and \(Y=7\) for \(H=1\). The retention probabilities are \(q(0)=0.5\) and \(q(1)=1\). In the realized sample, one \(H=0\) participant and both \(H=1\) participants remain observed. Calculate the Hájek mean.

At this first visit, the cumulative probabilities equal the visit-specific probabilities. The observed \(H=0\) participant has weight \(1/0.5=2\). Each observed \(H=1\) participant has weight \(1/1=1\). Thus the weighted numerator is \(2(3)+1(7)+1(7)=20\), and the weight total is \(2+1+1=4\). The Hájek estimate is \(20/4=5\).

The full cohort mean is \(\{3+3+7+7\}/4=5\), so this realized weighted estimate matches the target. The match here follows from the outcomes being constant within each history group; weighting does not guarantee exact recovery in every finite sample.

Accumulating Weights Across Visits

For repeated outcomes, a participant observed at time \(t\) must have remained uncensored at every earlier time. The relevant weight is therefore a product, not just the inverse probability of retention at the final visit. Each factor uses the history available at that step. If a participant had an estimated retention probability of 0.8 at the first visit and 0.5 at the second, the probability of remaining observed through the second visit is \(0.8\times0.5=0.4\), and the cumulative weight is \(1/0.4=2.5\).

The identification result applies separately at every time point. It does not require the weighted mean to follow a particular curve, nor does it imply that a single weighted regression is needed. A sequence of time-specific weighted means estimates the marginal mean trajectory \((\mu_1,\ldots,\mu_T)\). If treatment is also being handled with weights, the treatment and censoring components must correspond to the intended estimand and be combined appropriately; censoring weights alone do not adjust treatment assignment.

Worked Example: Two Visits and a Cumulative Weight

Four participants all attend visit 1. At visit 2, the estimated retention probability is 0.5 for participants A and B, based on their visit-1 history, and 1 for C and D. A, C, and D attend visit 2; B drops out. Their visit-2 outcomes are 2, 6, and 6, respectively. Calculate the visit-2 Hájek mean and compare it with the unweighted observed mean.

Since everyone was observed at visit 1, the first retention probability is 1 for each participant. The cumulative visit-2 weights for A, C, and D are therefore \(1/(1\times0.5)=2\), \(1/(1\times1)=1\), and \(1/(1\times1)=1\). The weighted numerator is \(2(2)+1(6)+1(6)=16\); the weight total is \(2+1+1=4\). The Hájek estimate is \(16/4=4\).

The observed mean without weights is \((2+6+6)/3=14/3\), approximately 4.67. The two estimates differ because the weighted calculation gives participant A’s history group twice the representation among visit-2 observations. The calculation illustrates the estimator, not a guarantee that the realized result equals the unobserved four-person mean.

Worked Example: How Dropout at Successive Visits Changes the Weight

A participant has estimated retention probabilities of 0.8 at visit 1, 0.5 at visit 2, and 0.4 at visit 3, conditional on the observed history at each respective visit. The participant is observed at all three visits, and the visit-3 outcome is 10. Find the cumulative visit-3 weight and this participant’s contribution to the visit-3 Horvitz–Thompson estimate when the cohort size is 20.

The cumulative probability is \(0.8\times0.5\times0.4=0.16\), so the cumulative weight is \(1/0.16=6.25\). The weighted outcome contribution before division by sample size is \(6.25\times10=62.5\). In the Horvitz–Thompson cohort average, this participant contributes \(62.5/20=3.125\). A participant not observed at visit 3 has \(R_3=0\) and contributes zero to that sum.

Using only the last-visit probability would give \(10/0.4=25\) before division by 20, which omits the earlier selection. It is not the cumulative IPCW contribution for a participant required to remain observed through all three visits.

Interpretation, Checks, and Limitations

IPCW and complete-case analysis answer the same marginal-mean question only under different circumstances. A complete-case mean at time \(t\) uses the participants observed then and is directly representative of the original cohort if continued observation is independent of \(Y_t\) without conditioning on history (or under other conditions that make the observed mean valid). IPCW instead allows dropout to depend on measured history, provided that history is sufficiently informative to satisfy sequential independent censoring and the retention probabilities are positive and correctly estimated.

A model for the outcome, such as a likelihood-based longitudinal model, may use a different route to account for incomplete measurements and relies on its own assumptions. IPCW makes the selection mechanism explicit, but it is not assumption-free and does not automatically outperform a correctly specified outcome model. Unlike simple imputation, it does not fill in each missing outcome; it reweights observed outcome records to represent the target population at each time.

Basic checks should establish that retention probabilities are defined for the histories actually encountered, that the risk set at each visit matches the specified time ordering, and that cumulative probabilities are calculated across all required visits. Very small estimated probabilities imply large weights and unstable estimates; this is a warning about limited information and potential positivity problems, not proof that the model is wrong. Conversely, plausible-looking weights do not establish that all predictors of dropout and outcome were measured or that the censoring model is correctly specified. Weight truncation can reduce the influence of extreme weights but changes the estimator and may introduce bias; it does not repair a lack of positivity.

The target also matters. The mean \(E[Y_t]\) refers to outcomes in the original baseline population under the full-data outcome process. If death or another competing event makes the outcome undefined, treating that event as ordinary dropout silently changes the estimand unless a meaningful outcome under that event has been defined. Likewise, IPCW for monotone dropout does not by itself solve intermittent missingness, where a participant may miss one measurement and later return.

Key takeaway: At time \(t\), weight each observed outcome by the inverse of the estimated probability of remaining observed through every visit up to \(t\). This identifies the original-cohort marginal mean only with sequential independent censoring, positivity, and adequate estimation of the retention probabilities.

Check Your Understanding

Answer each question before reading the solutions.

  1. A participant’s estimated retention probabilities at two successive visits are 0.9 and 0.6. What is the cumulative weight for an outcome observed at the second visit?
  2. State the identity that connects the weighted observed outcome to the full-data marginal mean.
  3. Why does a retention probability of zero for a history violate positivity?
  4. At a visit, the observed outcomes are 4 and 8, with corresponding weights 1 and 3. Calculate the Hájek mean.
  5. Does multiplying by inverse censoring weights, by itself, adjust for confounding by treatment assignment?

Solutions. (1) The cumulative probability is \(0.9\times0.6=0.54\), so the cumulative weight is \(1/0.54\approx1.852\). (2) Under the stated assumptions, \(E[R_tY_t/G_t]=E[Y_t]\). (3) A history with zero probability of remaining observed has no observed outcomes to reweight, so its target outcomes cannot be recovered from the observed data. (4) The weighted numerator is \(1(4)+3(8)=28\), the weight total is \(1+3=4\), and the Hájek mean is \(28/4=7\). (5) No. Censoring weights address selection due to loss of observation; treatment confounding requires appropriate treatment adjustment as well.

Clinical Biostats