Tutorials › Marginal Structural Models › Weighted Kaplan-Meier Estimation Under Informative Dropout

Censoring and Informative Dropout · Tutorial 225 of 501

Weighted Kaplan-Meier Estimation Under Informative Dropout

Learn to construct the weighted Kaplan–Meier curve and see why inverse censoring weights recover the marginal event hazard when censoring is conditionally independent given observed history.

Advanced 12 min read

What You'll Learn

  • Define weighted risk-set and event counts at each discrete event time.
  • Construct inverse-probability-of-censoring weights using follow-up retention probabilities.
  • Derive the weighted hazard and Kaplan–Meier survival estimator.
  • Explain the assumptions under which the estimator targets complete-follow-up marginal survival.
  • Compare weighted and unweighted estimates when dropout changes the observed risk-set composition.
  • Diagnose positivity problems and understand when the weighted Kaplan–Meier approach is inappropriate.

Why Weight a Kaplan–Meier Curve?

The Kaplan–Meier estimator builds a survival curve by multiplying estimated conditional event-free probabilities across event times. Its usual risk sets represent the people still event-free and observed at each time. If dropout depends on observed prognosis, however, later observed risk sets can overrepresent people with a different event risk from the full population. The ordinary Kaplan–Meier curve may then describe the selected observed group rather than the survival distribution that would have been seen with complete follow-up.

Inverse-probability-of-censoring weighting (IPCW) addresses this selection by giving more weight to people whose observed histories made continued follow-up less likely. The weighted Kaplan–Meier estimator uses these weights in both the event count and the risk-set count. Its target is the marginal survival distribution under complete follow-up, provided censoring is conditionally independent of the event process given the recorded history and the required follow-up probabilities are positive.

Setup and Estimator

Consider a cohort followed over discrete event times \(k=1,\ldots,K\). Let \(T_i\) be person \(i\)'s event time and let \(C_i\) denote the time of censoring, using this timing convention: event status is observed during interval \(k\), and censoring at the end of interval \(k\) affects observation at later intervals. Define the full-follow-up risk and event indicators

$$ Y_i(k)=I(T_i\ge k),\qquad D_i(k)=I(T_i=k). $$

Let \(R_i(k)=1\) if person \(i\) is still observed and event-free when entering interval \(k\), and \(R_i(k)=0\) otherwise. Thus an observed event at \(k\) has \(R_i(k)=1\). Let \(H_i(j)\) be the observed history available by the end of interval \(j\), for a person still under follow-up and event-free then. Write

$$ q_i(j)=P\{R_i(j+1)=1\mid R_i(j)=1,\ T_i\ge j+1,\ H_i(j)\}. $$

This is the conditional probability of remaining observed and event-free for entry into the next interval, among people eligible to do so. The probability of being observed when entering interval \(k\), conditional on the relevant history along the way, is the product of the preceding retention probabilities. The corresponding IPCW is

$$ W_i(k)=\prod_{j=1}^{k-1}\frac{1}{q_i(j)},\qquad W_i(1)=1. $$

In a sample of \(n\) people, define the weighted risk-set and event counts by

$$ Y_w(k)=\sum_{i=1}^n R_i(k)W_i(k)Y_i(k),\qquad D_w(k)=\sum_{i=1}^n R_i(k)W_i(k)D_i(k). $$

The weighted event hazard estimate is \(\hat h_w(k)=D_w(k)/Y_w(k)\) when \(Y_w(k)>0\). The weighted Kaplan–Meier estimate is

$$ \hat S_w(k)=\prod_{j=1}^{k}\{1-\hat h_w(j)\},\qquad \hat S_w(0)=1. $$

These are weights for entering the interval: a person’s weight at \(k\) corrects for the probability of remaining observed through the earlier intervals, not for censoring after the event opportunity at \(k\).

Worked Example: Calculating the Weighted Product

Suppose an analysis has weighted risk-set and event counts \(Y_w(1)=8,\ D_w(1)=2\); \(Y_w(2)=6,\ D_w(2)=3\); and \(Y_w(3)=3,\ D_w(3)=1\). Calculate the hazards and the survival estimate through time 3.

At time 1, \(\hat h_w(1)=2/8=1/4\), so the estimated probability of surviving that interval is \(1-1/4=3/4\). At time 2, \(\hat h_w(2)=3/6=1/2\), giving an interval survival factor of \(1/2\). At time 3, \(\hat h_w(3)=1/3\), giving a factor of \(2/3\).

Therefore,

$$ \hat S_w(3)=\frac{3}{4}\times\frac{1}{2}\times\frac{2}{3} =\frac{1}{4}=0.25. $$

The calculation follows the Kaplan–Meier product exactly, but each risk-set and event count is weighted. In actual data, the counts are formed from the individual \(R_i(k)W_i(k)Y_i(k)\) and \(R_i(k)W_i(k)D_i(k)\) contributions.

Worked Example: Building Weights From Retention Probabilities

Three people enter interval 1. Their conditional probabilities of remaining observed for entry into interval 2 are \(q_A(1)=0.5\), \(q_B(1)=0.8\), and \(q_C(1)=0.5\). All three are observed and event-free when entering interval 2. At interval 2, A and C experience the event, while B does not. Calculate the weighted hazard at interval 2 and compare it with the unweighted hazard.

The interval-2 weights are the reciprocals of the interval-1 retention probabilities:

$$ W_A(2)=2,\qquad W_B(2)=\frac{1}{0.8}=1.25,\qquad W_C(2)=2. $$

The weighted risk-set total is \(2+1.25+2=5.25\). The weighted event total is \(2+2=4\), because A and C experience the event. Hence

$$ \hat h_w(2)=\frac{4}{5.25}=\frac{16}{21}\approx 0.762. $$

The unweighted hazard is \(2/3\approx0.667\). The difference arises because the weighted calculation gives more influence to A and C, whose histories predict less retention. This small calculation illustrates the construction; by itself, it does not establish that either estimate is close to a population hazard.

Why the Weighted Hazard Targets the Marginal Hazard

Define the full-follow-up marginal event hazard at time \(k\) as

$$ h(k)=P(T=k\mid T\ge k) =\frac{E\{Y_i(k)D_i(k)\}}{E\{Y_i(k)\}}, $$

provided \(P(T\ge k)>0\). The key idea is that inverse-probability weighting reconstructs the full risk set as well as its events. A weight applied only to events, or only to people who remain under observation, would not give this hazard.

Theorem: Suppose individuals are independent and identically distributed, event status and history are consistently defined, and censoring is sequentially independent of future event status conditional on the observed history used in the retention probabilities. Suppose also that \(q_i(j)>0\) for each history with positive probability among people eligible at \(j\). With the true retention probabilities, the weighted observed risk and event contributions have expectations equal to their full-follow-up counterparts: $$ E\{R_i(k)W_i(k)Y_i(k)\}=E\{Y_i(k)\},\qquad E\{R_i(k)W_i(k)D_i(k)\}=E\{D_i(k)\}. $$ Consequently, when \(P(T\ge k)>0\), the ratio of these expectations is the full-follow-up marginal hazard \(h(k)\).

Proof. Conditional on the relevant full event and history information, sequential independent censoring gives the probability of being observed when entering interval \(k\) as the product of the conditional retention probabilities along the eligible, event-free history. Denote that probability by \(\pi_i(k)\). By construction, \(W_i(k)=1/\pi_i(k)\). Thus the conditional expectation of the observation indicator times the weight is

$$ E\{R_i(k)W_i(k)\mid\text{full event and history information}\} =\pi_i(k)\frac{1}{\pi_i(k)}=1. $$

Both \(Y_i(k)\) and \(D_i(k)\) are determined by the full event information, and \(D_i(k)=1\) implies \(Y_i(k)=1\). Multiplying the conditional identity first by \(Y_i(k)\), then by \(D_i(k)\), and taking expectations gives the two stated equalities. Dividing the event expectation by the risk expectation gives \(E\{D_i(k)\}/E\{Y_i(k)\}=P(T=k\mid T\ge k)\), as required. \(\square\)

For a finite number of times, this identity also yields a large-sample result. If the true weights are known, the weighted contributions have finite expectations and sample averages converge to those expectations, and each target risk probability \(P(T\ge k)\) is positive, then the law of large numbers and the continuous mapping theorem give \(\hat h_w(k)\xrightarrow{p}h(k)\). Applying continuity to the finite product gives \(\hat S_w(k)\xrightarrow{p}S(k)\), where \(S(k)=P(T>k)\).

$$ S(k)=\prod_{j=1}^{k}\{1-h(j)\}. $$

Indeed, the event \(T>k\) requires surviving each interval \(1,\ldots,k\), and \(1-h(j)=P(T>j\mid T\ge j)\). Multiplying these conditional probabilities gives \(P(T>k)\). If retention probabilities are estimated, consistency additionally requires adequate estimation of those probabilities and control of the resulting weights; the known-weight argument alone does not guarantee that fitted weights behave well.

Worked Example: Informative Dropout Changes the Observed Risk Set

Suppose half the population is high risk and half is low risk. At time 1, the event probabilities are \(0.4\) for the high-risk group and \(0.1\) for the low-risk group. Among those who survive time 1, the time-2 event probabilities remain \(0.4\) and \(0.1\), respectively. Between the two event intervals, high-risk survivors have probability \(0.5\) of remaining observed; low-risk survivors have probability \(1\). Censoring is independent of the future event within each risk group.

The time-1 marginal hazard is \(0.5(0.4)+0.5(0.1)=0.25\), so survival through time 1 is \(0.75\). Among the original population, the proportions who are high-risk survivors and low-risk survivors at time 2 are, respectively, \(0.5(1-0.4)=0.30\) and \(0.5(1-0.1)=0.45\). The full risk-set proportion is \(0.30+0.45=0.75\). Its event proportion at time 2 is \(0.30(0.4)+0.45(0.1)=0.165\), so the full marginal hazard is \(0.165/0.75=0.22\).

Among those observed at time 2, the corresponding risk-set contributions are \(0.30(0.5)=0.15\) high-risk and \(0.45(1)=0.45\) low-risk. The unweighted observed hazard is therefore

$$ \frac{0.15(0.4)+0.45(0.1)}{0.15+0.45} =\frac{0.105}{0.60}=0.175. $$

This is below the full marginal hazard because high-risk survivors are underrepresented. The inverse retention weights are 2 for high-risk survivors and 1 for low-risk survivors. After weighting, the risk-set total is \(0.15(2)+0.45(1)=0.75\), and the event total is \(0.15(2)(0.4)+0.45(1)(0.1)=0.165\). The weighted hazard is \(0.165/0.75=0.22\), recovering the full marginal hazard. The resulting two-time survival estimate is \((1-0.25)(1-0.22)=0.75(0.78)=0.585\).

Assumptions, Diagnostics, and Alternatives

The estimator needs more than a censoring model that predicts dropout well. Its interpretation depends on the following conditions:

  • Sequential independent censoring: conditional on the recorded history, continued observation does not convey additional information about the event process. If important predictors of both dropout and future events are unrecorded, weighting cannot correct that selection.
  • Positivity: each relevant history among people at risk has a positive probability of remaining observed. If a history has retention probability zero, the full-follow-up risk set for that history cannot be reconstructed from observed data.
  • Correct retention probabilities: the conditional probabilities used in the weights must be known or adequately estimated. Model misspecification can leave residual selection bias.
  • Well-behaved weights and risk sets: very small retention probabilities produce large weights, and the estimator is undefined at a time when its weighted risk-set total is zero.

In practice, inspect the distribution of weights by time, the largest weights, and the weighted risk-set totals. Also assess whether fitted retention probabilities approach zero in particular histories. A rising weight distribution, a few observations dominating the weighted counts, or a nearly empty weighted risk set are warnings that the estimate may be unstable. Truncating weights can reduce variance, but changes the estimating procedure and can introduce bias; it does not repair a genuine positivity violation.

When censoring is independent of the event time without conditioning on history, ordinary Kaplan–Meier estimation is the simpler approach and generally avoids the extra variability from estimating weights. When censoring is independent only after conditioning on observed history, IPCW can recover the marginal curve without requiring the observed risk set to have the same history composition as the full risk set. Direct IPCW estimation of a fixed-horizon mean answers a different, single-time summary question; the weighted Kaplan–Meier estimator assembles hazards across event times into a survival curve. Stratification or standardization can also address observed prognostic differences, but require specifying how the stratum-specific results are combined. None of these methods can recover information about histories with no chance of continued observation.

Common Pitfall

Common mistake: “The people who drop out are more likely to have the event, so giving extra weight to the observed events will correct the bias.” This is wrong because the target hazard is a ratio of events to people at risk. Correcting only the event count, or using the wrong time-specific weight, does not reconstruct the full risk-set composition. Use the same entry-to-interval IPCW in both the event and risk-set totals, and verify that the weight corresponds to the probability of being observed at that interval.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Why does the weighted hazard divide the weighted event count by the weighted risk-set count rather than by the number of people originally enrolled?
  2. If retention into interval 3 requires surviving follow-up through intervals 1 and 2 with probabilities \(0.8\) and \(0.5\), what is the IPCW for a person with those probabilities?
  3. At a particular time, the weighted risk-set total is 10 and the weighted event total is 2. What are the estimated hazard and the corresponding Kaplan–Meier factor?
  4. What does a fitted retention probability of zero for a history occurring among people at risk imply?

Solutions. (1) The hazard is the event probability conditional on being at risk, so both numerator and denominator must represent the full-follow-up event and risk populations. (2) The entry-to-interval-3 weight is \(1/(0.8\times0.5)=2.5\). (3) The hazard is \(2/10=0.2\), and the survival factor is \(1-0.2=0.8\). (4) Positivity fails for that history: no observed person with it can represent its full-follow-up contribution, so IPCW cannot identify the target without additional assumptions or information.

Clinical Biostats