Tutorials › Causal Inference › Inverse-Probability-of-Censoring Weights

Marginal Structural Models · Tutorial 735 of 972

Inverse-Probability-of-Censoring Weights

Learn to construct longitudinal censoring weights, distinguish numerator and denominator histories, and interpret the population represented by the weighted data.

Advanced 11 min read

What You'll Learn

  • Define retention indicators and the histories used to model censoring at each visit
  • Derive unstabilized and stabilized censoring weights as products of sequential probabilities
  • State the assumptions needed for censoring weights to recover full-data distributions
  • Identify how numerator choices affect the population represented by stabilized weights
  • Calculate and interpret censoring weights in hypothetical longitudinal examples
  • Recognize positivity and history-timing errors in censoring models

Why Follow-Up Loss Requires Its Own Weights

A longitudinal analysis may target an outcome that would be measured for everyone under a specified treatment history, even though some participants stop being observed before that outcome is recorded. If the chance of remaining observed depends on measured health history, the participants with observed outcomes need not represent the target population. Inverse-probability-of-censoring weights (IPCW) address this selection by giving greater weight to observed participants who resemble people who were more likely to be lost.

Censoring weights are distinct from treatment weights. Treatment weights address the assignment of treatment across histories; censoring weights address whether a participant remains observed. They can be combined when both processes require adjustment, but the censoring component has its own probabilities, assumptions, and positivity condition.

Definition: Consider visits indexed \(t=0,\ldots,K\). Let \(R_t=1\) mean that a participant is observed through visit \(t\), with \(R_0=1\). For each interval \(t=0,\ldots,K-1\), define the retention probability \(q_t(H_t)=P(R_{t+1}=1\mid R_t=1,H_t)\), where \(H_t\) is the measured history available just before retention through the next visit is determined. The participant is uncensored through visit \(K\) exactly when \(R_K=1\).

For specificity, let \(V\) denote baseline covariates, \(L_t\) the covariates measured by visit \(t\), and \(A_t\) the treatment received at visit \(t\). When retention through visit \(t+1\) is determined after these measurements, a sufficiently rich denominator history can be written \(H_t=(V,\bar L_t,\bar A_t)\), where bars denote histories through time \(t\). The actual timing in an application must be reflected in the history: a variable measured only after someone has already been lost cannot predict that earlier loss in the censoring model.

From Sequential Retention to a Weight

For someone observed through the final visit, each interval contributes one conditional probability of remaining observed. The product of these probabilities is the probability of the observed retention path, conditional on the histories along that path. The unstabilized IPC weight is the reciprocal of that product. Small retention probabilities therefore give larger weights.

$$ W_C^{\mathrm{unstab}}= \prod_{t=0}^{K-1}\frac{1}{q_t(H_t)} $$

A stabilized version puts a numerator retention probability over each denominator probability. Let \(S_t\) be a chosen, observed subset of \(H_t\), and define \(g_t(S_t)=P(R_{t+1}=1\mid R_t=1,S_t)\). Then, among participants with \(R_K=1\), the stabilized censoring weight is

$$ W_C^{\mathrm{stab}}= \prod_{t=0}^{K-1} \frac{g_t(S_t)}{q_t(H_t)} $$

The denominator should represent the censoring process conditional on the measured history needed to make censoring conditionally independent of the future full-data variables relevant to the analysis. The numerator is deliberately more restricted: it retains only a selected part of that history. Common choices include baseline variables, and in some analyses baseline variables together with past treatment. A numerator model is not simply a second estimate of the same full conditional probability; it defines which measured features are allowed to remain associated with retention in the weighted data.

For instance, if the numerator conditions only on baseline covariates \(V\), then the stabilized weighted data can represent the target distribution conditional on \(V\). If the desired result is marginal over \(V\), the analyst must ensure that the baseline distribution is also handled appropriately. A numerator that is constant with respect to participants and histories gives the simplest direct recovery of the marginal full-data distribution after normalization. More generally, stabilization preserves a numerator-defined distribution; it does not automatically mean every stabilized weighted sample has the original marginal distribution.

Worked Example: A Two-Interval Stabilized Weight

Suppose a hypothetical participant is observed at visit 0 and has a history that gives a denominator retention probability of \(0.80\) for the first interval. Conditional on remaining observed, the participant's updated history gives a denominator retention probability of \(0.50\) for the second interval. Suppose the numerator probabilities are \(0.90\) at each interval. Calculate this participant's weights if they remain observed through both intervals.

The participant's observed path has two retention factors. The unstabilized weight is

$$ W_C^{\mathrm{unstab}} =\frac{1}{0.80}\times\frac{1}{0.50} =1.25\times2 =2.50. $$

The stabilized weight is

$$ W_C^{\mathrm{stab}} =\frac{0.90}{0.80}\times\frac{0.90}{0.50} =1.125\times1.80 =2.025. $$

Thus this observed participant contributes 2.50 times their ordinary contribution under the unstabilized weight, or 2.025 times under the specified stabilized weight. These values are weights, not probabilities. Their difference reflects the numerator probabilities as well as the denominator probabilities; it does not indicate a change in the participant's observed outcome.

Why Weighting Can Restore the Full-Data Distribution

The key assumption is conditional independent censoring: among participants still observed at a given interval, retention is independent of the relevant future full-data variables once the measured history \(H_t\) is held fixed. In words, after conditioning on the recorded history, people retained and lost at that interval have the same distribution of the future full-data quantities relevant to the target. This is an assumption about unobserved future information, not something guaranteed by fitting a censoring model.

A second requirement is censoring positivity: for every history that occurs in the target population and matters to the analysis, there must be a positive probability of remaining observed. Formally, \(q_t(H_t)>0\) for those histories at every interval. If a history always leads to loss, observed data cannot supply information about the corresponding full-data outcomes through weighting.

The following argument shows why the denominator product corrects selection. Let \(F\) be any integrable function of the complete data relevant to the target, such as an outcome or an outcome contrast. Under sequential conditional independent censoring and positivity,

$$ E\left[ \frac{R_K F}{\prod_{t=0}^{K-1}q_t(H_t)} \right]=E(F). $$

To justify the identity, consider the retention indicators one interval at a time. Conditional on being observed through \(t\) and on \(H_t\), the probability of remaining observed through \(t+1\) is \(q_t(H_t)\). Conditional independent censoring permits the relevant complete-data quantity \(F\) to be treated as having the same conditional distribution among those retained as among those at risk with that history. Consequently, the factor \(R_{t+1}/q_t(H_t)\) has conditional mean one for that step. Iterating this conditional expectation over the intervals removes each retention indicator and its probability factor:

$$ E\left[ \frac{R_K F}{\prod_{t=0}^{K-1}q_t(H_t)} \right] = E\left[ \frac{R_{K-1}F}{\prod_{t=0}^{K-2}q_t(H_t)} \right] =\cdots=E(F). $$

This is a population identity, not a claim that each finite sample reproduces the target exactly. In practice, probabilities are estimated from observed data and weighted estimates vary from sample to sample. The identity explains what the denominator weights are designed to achieve when the assumptions hold and the probabilities are correctly represented.

Key result: With conditional independent censoring given \(H_t\) and censoring positivity, inverse products of the sequential retention probabilities recover full-data expectations from participants observed through the outcome visit. Stabilized weights multiply this correction by a numerator factor, so the represented population also depends on the numerator history.

Worked Example: Restoring Two Baseline Groups

Consider a hypothetical population with 100 participants: 50 have a high-risk baseline profile and 50 have a low-risk profile. Suppose everyone is observed at baseline, and retention to the outcome visit is \(0.50\) for the high-risk group and \(1.00\) for the low-risk group. Among the 50 high-risk participants, an expected 25 remain observed; all 50 low-risk participants remain observed. The 75 observed participants therefore include 25 high-risk and 50 low-risk participants, rather than the target population's equal split.

First use unstabilized weights. Each observed high-risk participant receives weight \(1/0.50=2\), and each observed low-risk participant receives weight \(1/1.00=1\). The weighted group totals are

$$ 25\times2=50\quad\text{high-risk},\qquad 50\times1=50\quad\text{low-risk}. $$

The weighted totals reproduce the target population's 50-to-50 group representation in expectation. Now use a constant numerator retention probability of \(0.80\). The stabilized weights are \(0.80/0.50=1.60\) for the high-risk group and \(0.80/1.00=0.80\) for the low-risk group. The weighted totals become

$$ 25\times1.60=40\quad\text{high-risk},\qquad 50\times0.80=40\quad\text{low-risk}. $$

After normalization, the two groups again each account for one half of the weighted population. The common numerator factor changes the overall scale of these weighted totals, but not their relative representation. This example illustrates how a constant numerator can stabilize weights while preserving the marginal target distribution after normalization.

Choosing Histories and Numerators Carefully

The denominator history is a substantive part of the analysis, not merely a list of variables available in a data file. It should include measured predictors of retention that also carry information about the future outcome or other full-data quantities being analyzed. In longitudinal settings, those predictors can include time-varying covariates and past treatment. Omitting such a predictor can leave selection within histories, violating conditional independent censoring for the chosen \(H_t\).

The numerator history \(S_t\) must be available for those at risk and contained in, or otherwise consistently defined from, the denominator history. It is usually chosen to make weights less variable while retaining a clear target interpretation. If it includes baseline covariates, for example, weighted comparisons may be interpreted within baseline strata; a marginal result then requires appropriate standardization over the target baseline distribution. If it includes treatment history, the weighted data retain a numerator-defined association with that treatment history. The numerator choice should therefore follow the estimand, rather than being selected solely because it produces convenient numerical weights.

Worked Example: Matching the Model to the Visit History

Suppose a hypothetical two-interval study measures baseline covariates \(V\), treatment \(A_0\), and then a health measure \(L_1\) before deciding whether participants remain observed for the next interval. For the first interval, suppose the denominator retention probability for a particular history is \(0.90\), and the numerator probability is \(0.90\). For the second interval, suppose the participant has \(L_1=1\), with denominator retention probability \(0.40\); the numerator model, conditional only on the selected baseline history, gives probability \(0.70\). Calculate the participant's stabilized censoring weight if they remain observed through both intervals.

The first interval contributes \(0.90/0.90=1\). The second contributes \(0.70/0.40=1.75\). Therefore,

$$ W_C^{\mathrm{stab}} =\frac{0.90}{0.90}\times\frac{0.70}{0.40} =1\times1.75 =1.75. $$

The second denominator probability uses \(L_1\) because it is measured before the second retention decision and helps predict retention. If \(L_1\) also predicts the later outcome, omitting it from that denominator could leave informative censoring unaddressed. The numerator omits \(L_1\) by design; the resulting weight represents the population associated with the chosen baseline numerator history, rather than asserting that \(L_1\) is irrelevant to censoring.

Common Pitfalls and Practical Checks

  • Using the wrong time ordering. A censoring model must condition on information available before the retention decision being modeled. Including a variable observed only after loss can create an impossible history.
  • Using only baseline predictors in the denominator by default. If time-varying measured history predicts both retention and future outcomes, a baseline-only denominator may not make censoring conditionally independent.
  • Treating stabilized weights as automatically marginal. A numerator that varies across people can preserve or induce a numerator-defined distribution. State what the numerator conditions on and how the intended target distribution is represented.
  • Ignoring positivity. When some histories have retention probabilities near zero, the corresponding inverse probabilities become large; when retention probability is zero, weighting cannot recover that history's outcomes.
  • Calling a weight a probability. A weight can exceed one and is not the probability that a participant belongs to the target population. It is a multiplier used to correct the contribution of observed data.

In an applied analysis, the retention model should match the visit schedule, use histories measured before each loss process, and reflect the conditional independent censoring assumption needed for the target. The numerator history and target population should be reported alongside the weight formula. These details determine what the weighted analysis can support; a product formula alone does not establish that censoring is ignorable or that every relevant history has adequate follow-up.

Check Your Understanding

Use the definitions and assumptions above to answer the following questions.

  1. In a study with three retention intervals, write the unstabilized censoring weight for a participant observed through the outcome visit.
  2. Why must a time-varying covariate be measured before the relevant retention decision to belong in that interval's censoring history?
  3. Suppose a numerator retention probability is constant across participants. What happens to the relative weighted representation of participants when that common numerator factor is applied?
  4. State the conditional independent censoring assumption in words, and explain why it cannot be guaranteed merely by fitting a retention model.
  5. What does a retention probability of zero for a history imply for inverse-probability weighting in that history?
Clinical Biostats