Tutorials › Marginal Structural Models › Deriving the Continuous-Time Weighted Survival Estimator

Censoring and Informative Dropout · Tutorial 228 of 501

Deriving the Continuous-Time Weighted Survival Estimator

Learn to construct the inverse-censoring-weighted hazard and product-integral survival estimator, derive its target under conditional independent censoring, and check when the estimator is unreliable.

Advanced 11 min read

What You'll Learn

  • Define observed event and risk processes and the continuous-time inverse censoring weight.
  • Derive why weighted event and risk-set expectations recover their full-data counterparts.
  • Construct the weighted Nelson–Aalen hazard and product-integral survival estimator.
  • Work through intensity-based weights and a stratified censoring example.
  • Identify positivity, model, and effective-risk-set problems that can destabilize estimates.
  • Compare weighted product-limit estimation with ordinary Kaplan–Meier estimation and parametric survival models.

From Censoring Weights to a Survival Curve

An inverse censoring weight can recover event information lost when follow-up ends early. To estimate a survival curve, however, it is not enough to weight the observed failures alone. At every time, the estimate must compare weighted failures with the weighted people still at risk. That ratio estimates the event hazard among the full, uncensored cohort at that time.

Let \(T_i\) be subject \(i\)'s event time and \(C_i\) the censoring time. The observed follow-up ends at \(O_i=\min(T_i,C_i)\), and \(\Delta_i=I(T_i\leq C_i)\) indicates an observed event. Define the observed counting and at-risk processes by \(N_i(t)=I(O_i\leq t,\Delta_i=1)\) and \(Y_i(t)=I(O_i\geq t)\). Their full-data counterparts are \(N_i^T(t)=I(T_i\leq t)\) and \(Y_i^T(t)=I(T_i\geq t)\). For clarity, assume continuous event and censoring times, so that event-censoring ties have probability zero.

Let \(G_i(t)\) denote the probability of remaining uncensored through time \(t\), conditional on the measured history used in the censoring model. The history may vary over time. The inverse censoring weight at time \(t\) is \(W_i(t)=1/G_i(t-)\), where \(t-\) means just before \(t\). If the conditional censoring intensity is \(\lambda_{C,i}(s)\), then \(G_i(t-)=\exp\{-\int_0^{t-}\lambda_{C,i}(s)\,ds\}\), and the weight is the corresponding exponential of the integrated intensity. Only observed risk-set members and observed events contribute to the estimator.

Definition: The inverse-censoring-weighted Nelson–Aalen increment is $$ d\widehat{\Lambda}^{\,\mathrm{IPCW}}(t) = \frac{\sum_{i=1}^n W_i(t)\,dN_i(t)} {\sum_{i=1}^n W_i(t)\,Y_i(t)}. $$ The associated product-integral survival estimator is $$ \widehat S^{\,\mathrm{IPCW}}(t) = \prod_{(0,t]}\left\{1-d\widehat{\Lambda}^{\,\mathrm{IPCW}}(u)\right\}. $$

The numerator is the weighted event contribution at time \(t\); the denominator is the total weighted risk set immediately before that event time. The product multiplies the estimated conditional probabilities of surviving each event-time increment. In a finite sample with distinct event times, it is the product of one minus the weighted event-to-risk ratio at each observed event time.

Why the Weighted Ratio Targets the Full-Data Hazard

The key assumption is sequential independent censoring: conditional on the measured history used to construct \(G_i\), censoring does not carry additional information about the subject's future event process. More precisely, along the full-data history, the conditional probability of remaining uncensored through \(t\) is \(G_i(t)\). Also require censoring positivity, \(G_i(t)>0\) over the time range of interest. These assumptions make the inverse weight correct and ensure that the event process remains observable with positive probability at each relevant history.

The following identity explains why the same weight must be used for both events and the risk set. For a full-data event or risk contribution at time \(t\), observation multiplies that contribution by the indicator of remaining uncensored. Conditional independent censoring makes the conditional expectation of that indicator equal to \(G_i(t-)\); division by \(G_i(t-)\) cancels the observation probability.

Result: Under conditional independent censoring and positivity, the weighted observed event and risk contributions have the same expectations as their full-data counterparts. In particular, for a measurable full-data contribution \(Q_i(t)\) determined by the event and measured histories through \(t\), $$ E\left[\frac{I(C_i\geq t)Q_i(t)}{G_i(t-)}\right] = E[Q_i(t)], $$ with the left-limit convention appropriate for a continuous censoring process.

Derivation. Condition on the full-data history that determines \(Q_i(t)\) and the censoring model. By the stated assumption, \(E[I(C_i\geq t)\mid\text{that history}]=G_i(t-)\). Since \(Q_i(t)\) and \(G_i(t-)\) are fixed given that history, $$ E\left[\left.\frac{I(C_i\geq t)Q_i(t)}{G_i(t-)}\right|\text{that history}\right] = \frac{Q_i(t)}{G_i(t-)}G_i(t-) = Q_i(t). $$ Taking expectations proves the identity. Applying it to \(Y_i^T(t)\) recovers the full-data risk-set expectation; applying it to event increments recovers the full-data event contribution. \(\square\)

For example, suppose the full-data event time has density \(f_T(t)\) and survival function \(S_T(t)=P(T>t)\). The expected full-data event contribution in a short interval around \(t\) is \(f_T(t)\,dt\), and the expected full-data risk set is \(S_T(t)\), up to the immaterial distinction between \(>\) and \(\geq\) under continuous event times. Thus the ratio of weighted contributions targets the marginal hazard \(\lambda_T(t)=f_T(t)/S_T(t)\), not an average of subject-specific hazards.

Worked Example: Recovering a Marginal Hazard Across Two Strata

Suppose a baseline history \(Z\) has \(P(Z=0)=0.6\) and \(P(Z=1)=0.4\). At a time \(t\), the event-free probabilities are \(0.8\) and \(0.5\), respectively. The conditional censoring survival probabilities through \(t\) are \(0.9\) and \(0.5\). The event densities at \(t\) are \(0.8(0.1)\) for \(Z=0\) and \(0.5(0.4)\) for \(Z=1\).

The full-data risk-set probability is \(0.6(0.8)+0.4(0.5)=0.48+0.20=0.68\). Among observed subjects, the expected inverse-weighted risk contribution is \(0.6(0.8)(0.9)(1/0.9)+0.4(0.5)(0.5)(1/0.5)=0.48+0.20=0.68\). The censoring probabilities cancel within each stratum.

The full-data event density is \(0.6(0.8)(0.1)+0.4(0.5)(0.4)=0.048+0.080=0.128\). The expected inverse-weighted observed event contribution is also \(0.6(0.8)(0.9)(0.1)(1/0.9)+0.4(0.5)(0.5)(0.4)(1/0.5)=0.048+0.080=0.128\). Therefore the marginal hazard at \(t\) is \(0.128/0.68\approx0.1882\). Weighting has recovered the full cohort's risk and event contributions; using only one stratum's hazard would not give this marginal hazard.

From the Hazard to the Product-Integral Estimate

For independent, identically distributed subjects, the empirical weighted event and risk contributions estimate their population counterparts. This yields a consistency result under standard regularity conditions: the censoring probabilities are known or consistently estimated; weights are bounded on the interval of interest (for example, \(G_i(t)\geq\epsilon>0\)); \(S_T(t)\) is bounded away from zero there; and the event distribution is continuous with a bounded density. Assume also the usual uniform laws of large numbers for the bounded weighted risk and event contributions.

Theorem: Under these conditions, for each fixed time \(t\) in the interval, \(\widehat S^{\,\mathrm{IPCW}}(t)\xrightarrow{p}S_T(t)\), the survival function of the event time in the full cohort that would be observed without censoring.

Proof. Write the sample weighted risk set, divided by \(n\), as \(R_n(u)=n^{-1}\sum_i W_i(u)Y_i(u)\). Write the sample weighted event measure, also divided by \(n\), as \(dB_n(u)=n^{-1}\sum_i W_i(u)dN_i(u)\). By the expectation identity and the uniform laws of large numbers, \(R_n(u)\) converges uniformly to \(S_T(u)\), and \(B_n\) converges uniformly to the full-data event distribution \(F_T\). Since \(S_T\) is bounded away from zero, division by \(R_n\) is stable, so the weighted cumulative hazard converges to $$ \int_{(0,t]}\frac{dF_T(u)}{S_T(u)} = \int_0^t\frac{f_T(u)}{S_T(u)}\,du = -\log S_T(t). $$ The last equality follows from \(dS_T(u)=-f_T(u)\,du\) and \(S_T(0)=1\).

The product-integral estimator has factors \(1-x_{nj}\), where \(x_{nj}\) is a weighted event-to-risk ratio at an observed event time. Bounded weights and a risk set of order \(n\) make the largest such increment tend to zero in probability; the sum of increments stays bounded in probability. For \(0\leq x<1\), \(\log(1-x)=-x+r(x)\), where \(|r(x)|\leq x^2/(1-x)\). Consequently the sum of the remainders is bounded by the largest increment times a bounded multiple of the sum of increments, and tends to zero. Thus the log of the product converges to \(-[-\log S_T(t)]=\log S_T(t)\). Exponentiating proves the claim. \(\square\)

This result also clarifies why the product form matters. A cumulative hazard is not itself a survival probability: survival is obtained by multiplying survival factors, or, for a continuous population hazard, by exponentiating the negative integrated hazard. The empirical product retains the finite-sample event-time increments while converging to that continuous-time relation.

Worked Example: Converting a Constant Censoring Intensity to Weights

Suppose the conditional censoring intensity for a subject with a fixed measured history is \(0.2\) per time unit. Then \(G(t)=\exp(-0.2t)\). At time \(1\), the inverse weight is \(\exp(0.2)\approx1.2214\); at time \(2\), it is \(\exp(0.4)\approx1.4918\). The increasing weight compensates for the decreasing chance of remaining uncensored.

At time \(2\), suppose three subjects are observed in the risk set, with censoring intensities \(0.1\), \(0.3\), and \(0.2\) per time unit over follow-up. Their weights are \(\exp(0.2)\approx1.2214\), \(\exp(0.6)\approx1.8221\), and \(\exp(0.4)\approx1.4918\). If the second subject has the event at time \(2\), the weighted hazard increment is \(1.8221/(1.2214+1.8221+1.4918)=1.8221/4.5353\approx0.4018\). The corresponding product factor is \(1-0.4018=0.5982\). The risk-set weights are essential: the event contribution is compared with the weighted, not unweighted, risk set.

Worked Example: Building a Two-Event Weighted Product

At the first event time, suppose the risk-set weights are \(1\), \(2\), and \(1.5\), and the subject who fails has weight \(2\). The weighted risk total is \(1+2+1.5=4.5\), so the estimated hazard increment is \(2/4.5=4/9\). The first survival factor is \(1-4/9=5/9\).

At the next event time, suppose the remaining two subjects have weights \(1\) and \(1.5\), and the latter fails. The risk total is \(2.5\), so the increment is \(1.5/2.5=3/5\), and the second factor is \(2/5\). The estimated survival after the second event is therefore \((5/9)(2/5)=2/9\). This calculation shows the two distinct operations: form each increment from a weighted event divided by the weighted risk set, then multiply the resulting survival factors.

Assumptions, Diagnostics, and Alternatives

The estimator targets the uncensored marginal survival curve, not the survival curve of only those who remain under observation. That interpretation depends on the censoring model representing the relevant measured history and on positivity. If some histories have nearly zero probability of remaining uncensored, their inverse weights become very large. Such weights can make the estimate highly variable, even when the formula is implemented correctly.

  • Check the censoring model. Inspect whether the fitted censoring process reflects the histories that plausibly predict dropout. A misspecified model can leave weighted event and risk contributions distorted.
  • Inspect weight size over time. Rapidly increasing or extreme weights signal weak positivity or unstable estimation. Report how many subjects contribute to each risk set and whether a few weights dominate it.
  • Check the weighted risk set. A denominator that becomes small or is driven by very few observations makes hazard increments unstable. The product can then be sensitive to individual failures.
  • Keep event and risk contributions aligned. Weighting failures but not the risk set does not estimate the ratio of full-data event contribution to full-data risk. It generally targets the wrong hazard.

With genuinely independent censoring, ordinary Kaplan–Meier estimation is simpler and does not require censoring weights; it is the natural alternative when that assumption is credible. A parametric survival model instead specifies a distribution or hazard form and can borrow strength through modeling, but its conclusions depend on that specification. The weighted product-limit approach avoids imposing a parametric form on the marginal survival curve, at the cost of relying on a correct censoring model and adequate positivity. It cannot recover information for histories that have no chance of continued observation.

Common pitfall: “Each observed failure should be upweighted, so I can divide the weighted failures by the ordinary number at risk.” This is incorrect: censoring also removes people from the observed risk set. The correction is to weight both event and risk-set contributions with the same inverse censoring probability, then form their ratio.

Check Your Understanding

Answer each question, then check the solution shown with it.

  1. At one event time, the weighted risk total is \(8\), and the failing subject has weight \(2\). What are the hazard increment and product factor?
    Solution: The increment is \(2/8=0.25\). The survival factor is \(1-0.25=0.75\).
  2. If a subject's censoring intensity is constant at \(0.1\), what is the inverse censoring weight at time \(3\)?
    Solution: \(G(3)=\exp(-0.1(3))=\exp(-0.3)\), so the inverse weight is \(\exp(0.3)\approx1.350\).
  3. Why must the risk set as well as the failures be weighted?
    Solution: Censoring changes which subjects are observed at risk. Weighting both contributions recovers the full-data event contribution and full-data risk set, so their ratio targets the marginal hazard.
  4. State one condition needed for the estimator to represent the full-cohort survival curve, and explain why it matters.
    Solution: Conditional independent censoring is needed so that, given the modeled history, censoring does not provide additional information about future event time. Positivity is also needed so that the chance of remaining uncensored is positive and inverse weights are defined.
Clinical Biostats