Tutorials › Competing Risks and Multi-State Models › Inverse Probability Weighting for Treatment Effects

Causal Contrasts With Competing Events · Tutorial 194 of 699

Inverse Probability Weighting for Treatment Effects

Construct treatment weights to estimate marginal cumulative incidences under each treatment, and understand the assumptions and diagnostics needed to interpret their contrast causally.

Advanced 12 min read

What You'll Learn

  • Define inverse-probability treatment weights for each treatment arm.
  • Connect treatment weighting to marginal treatment-specific cumulative incidence.
  • Calculate a weighted risk difference with arm-specific denominators.
  • Estimate cumulative incidence from weighted risk sets when event times matter.
  • Check exchangeability, positivity, consistency, and censoring conditions.
  • Recognize how extreme weights affect precision and interpretation.

Why Weight Treatment Groups?

A treatment-specific cumulative incidence is a marginal risk: it describes the probability of experiencing an event of interest by a specified time under a treatment strategy, allowing competing events to occur. When treatment assignment depends on baseline characteristics that also predict outcomes, the observed treatment groups can differ in their covariate distributions. Comparing their crude cumulative incidences can then mix treatment differences with those baseline differences.

Inverse-probability treatment weighting addresses this imbalance by giving more weight to individuals whose observed treatment was less likely given their measured baseline characteristics. The resulting weighted treatment groups can represent the same target population. Weighting does not remove the need for causal assumptions: it corrects measured treatment-selection differences only when the relevant covariates are measured and the treatment model is adequate.

Definition: Let \(A\) denote baseline treatment, with possible values \(a=0\) and \(a=1\), and let \(L\) be measured baseline covariates. The treatment propensity for arm \(a\) is \(e_a(L)=P(A=a\mid L)\). An individual who received treatment \(A=a\) receives the unstabilized inverse-probability treatment weight \(w_i=1/e_a(L_i)\). In an arm-specific calculation, only individuals with \(A_i=a\) contribute; their weights are \(1/e_a(L_i)\).

Let \(T\) be time to the first event and \(J\) its type, where \(J=1\) is the event of interest and other values represent competing events. Write \(T^a,J^a\) for the potential event time and type under treatment \(a\). The marginal treatment-specific cumulative incidence is \(F_1^a(t)=P(T^a\leq t,J^a=1)\). A competing event is not treated as ordinary loss to follow-up: after it occurs, the person can no longer experience the event of interest as the first event.

Identification and the Weighted Risk

For a fixed horizon \(t\), define \(Y_i=I(T_i\leq t,J_i=1)\), the indicator that individual \(i\) experiences the event of interest by \(t\) before a competing event. If outcomes are observed through \(t\), an inverse-probability weighted estimate of the risk under treatment \(a\) is the normalized, or Hájek, estimate

$$ \widehat F_{1,H}^a(t)= \frac{\sum_{i=1}^n I(A_i=a)w_iY_i} {\sum_{i=1}^n I(A_i=a)w_i}. $$

The numerator and denominator both use the treatment-\(a\) group. The denominator is not the total weight across both treatment arms. A corresponding Horvitz–Thompson estimate is \(\widehat F_{1,HT}^a(t)=n^{-1}\sum_i I(A_i=a)w_iY_i\); it uses the full sample size as denominator and is not necessarily bounded by one in a finite sample. The normalized estimate is often easier to interpret as a weighted risk. A risk difference compares \(\widehat F_1^1(t)\) and \(\widehat F_1^0(t)\), with the direction stated explicitly.

The identifying argument is the same for the event indicator as for any outcome defined under each treatment. Suppose consistency holds, conditional exchangeability holds, and positivity holds. Then

$$ E\left\{\frac{I(A=a)Y}{e_a(L)}\right\} =E\left[ \frac{P(A=a\mid L)}{e_a(L)} E(Y\mid A=a,L) \right] =E\{E(Y^a\mid L)\} =F_1^a(t). $$

The first equality conditions on \(L\); the second uses consistency and exchangeability to replace the observed conditional mean with the potential-outcome conditional mean. Also, \(E\{I(A=a)/e_a(L)\}=1\). Thus the population ratio underlying the normalized estimate has numerator \(F_1^a(t)\) and denominator 1. In a finite sample, dividing by the observed sum of arm-specific weights normalizes the weights and can improve stability, though it does not eliminate sampling uncertainty or bias from violated assumptions.

Assumptions: Consistency means the observed event history equals the potential event history under the treatment actually received, with treatment strategies sufficiently well defined. Conditional exchangeability means the potential event histories are independent of \(A\) given measured baseline covariates \(L\). Positivity requires \(P(A=a\mid L=l)>0\) for each treatment being compared and each covariate pattern represented in the target population. The propensity model must also estimate these probabilities adequately. To estimate risk through \(t\), the event status through \(t\) must be observed, or censoring must be handled under appropriate censoring assumptions and methods.

Worked Examples

Worked Example: A Weighted Risk Difference at a Fixed Horizon

Consider a hypothetical study of 20 people, with 10 in each of two baseline covariate strata, low and high risk. The treatment probabilities are estimated as \(P(A=1\mid L=\text{low})=0.8\) and \(P(A=1\mid L=\text{high})=0.2\). There are 8 treated and 2 untreated people in the low-risk stratum, and 2 treated and 8 untreated people in the high-risk stratum. Outcomes are fully observed to the horizon. Among treated people, the low-risk stratum has 2 target events, 1 competing event, and 5 with no event by the horizon; the high-risk stratum has 1 target event, 1 competing event, and 0 with no event. Among untreated people, the low-risk stratum has 1 target event and 1 competing event; the high-risk stratum has 1 target event, 2 competing events, and 5 with no event.

For treatment, the weights are \(1/0.8=1.25\) in the low-risk stratum and \(1/0.2=5\) in the high-risk stratum. The weighted target-event count is \(2(1.25)+1(5)=7.5\). The treatment-arm total weight is \(8(1.25)+2(5)=10+10=20\). Therefore,

$$ \widehat F_{1,H}^1(t)=\frac{7.5}{20}=0.375. $$

For the untreated arm, the weights are \(1/0.2=5\) in the low-risk stratum and \(1/0.8=1.25\) in the high-risk stratum. Its weighted target-event count is \(1(5)+1(1.25)=6.25\), and its arm-specific total weight is \(2(5)+8(1.25)=20\). Thus \(\widehat F_{1,H}^0(t)=6.25/20=0.3125\). The estimated risk difference, treatment 1 minus treatment 0, is \(0.375-0.3125=0.0625\), or 6.25 percentage points by the horizon. This is an estimated causal contrast only under the stated assumptions; it is not by itself evidence that treatment caused the difference.

The competing events contribute to the denominator because these people were part of the population at risk of either first event, but they do not contribute to the target-event numerator. They are not counted as target events.

Worked Example: Weighted Cumulative Incidence From Event Times

A fixed-horizon indicator uses whether the target event occurred by the horizon, but does not use the ordering of event times. When event times matter, a weighted Aalen–Johansen calculation uses weighted risk sets. Consider a hypothetical treated group with no censoring. At time \(t_1\), the weighted risk set totals 10: target events carry total weight 5, competing events carry weight 1.25, and 3.75 weight remains event-free. At the later time \(t_2\), that remaining risk set has total weight 3.75; target events carry weight 1.25 and competing events carry weight 2.5.

At \(t_1\), the weighted increments for the target and competing event types are \(5/10=0.5\) and \(1.25/10=0.125\). Thus the weighted probability of remaining event-free after \(t_1\) is \(1-0.5-0.125=0.375\). At \(t_2\), the target-event increment is \(1.25/3.75=1/3\), while the competing-event increment is \(2.5/3.75=2/3\). The target cumulative incidence through \(t_2\) is therefore

$$ \widehat F_1(t_2) =(1)(0.5)+(0.375)(1/3) =0.5+0.125 =0.625. $$

The second-time target increment is multiplied by the probability of remaining free of either event through \(t_1\). This is why a cumulative incidence is not obtained by summing weighted target-event hazards alone. In an actual treatment comparison, the same calculation is made separately within each weighted treatment arm.

Worked Example: Stabilization and Weight Concentration

In the first example, suppose the marginal proportion receiving treatment 1 is \(10/20=0.5\). A stabilized treatment-1 weight is \(0.5/e_1(L)\), so the low- and high-risk weights become \(0.5/0.8=0.625\) and \(0.5/0.2=2.5\). The weighted target count is \(2(0.625)+1(2.5)=3.75\), and the treated total weight is \(8(0.625)+2(2.5)=10\). Their ratio remains \(3.75/10=0.375\). The common factor of 0.5 cancels in a normalized, within-arm risk.

The unstabilized treatment-arm weights in that example have effective sample size \((\sum w_i)^2/\sum w_i^2=20^2/\{8(1.25^2)+2(5^2)\}=400/62.5=6.4\), even though 10 people were treated. This calculation signals that a few observations carry substantial influence. Stabilization changes the scale of the weights but does not repair poor overlap or make extreme relative weights harmless.

Time-to-Event Estimation, Diagnostics, and Limits

For event-time data, let the weighted risk set just before time \(u\) in arm \(a\) be the sum of treatment weights among people still free of every event at \(u\). With fully observed event times, the weighted increment for event type \(k\) is

$$ d\widehat\Lambda_{ak}(u)= \frac{\sum_i I(A_i=a)w_i I(T_i=u,J_i=k)} {\sum_i I(A_i=a)w_i I(T_i\geq u)}. $$

The weighted event-free survival estimate is the product over event times \(u\) of \(1-\sum_k d\widehat\Lambda_{ak}(u)\), using the increments for all event types. The weighted cumulative incidence for event type 1 is the sum, over event times up to \(t\), of the event-free survival just before \(u\) multiplied by \(d\widehat\Lambda_{a1}(u)\). This is the weighted Aalen–Johansen construction. Treatment weights change the contribution of individuals to event counts and risk sets; they do not remove competing events from the risk set before those events occur.

In practice, treatment probabilities are usually estimated from a model for \(P(A=1\mid L)\), often a logistic regression for a binary treatment. The model should include measured baseline covariates needed to make treatment assignment conditionally exchangeable; the goal is not to predict treatment as accurately as possible in isolation. Examine propensity distributions by observed arm, weight summaries, the largest weights, and weighted covariate balance. Balance checks ask whether weighted covariate distributions are similar across treatment groups. A small effective sample size or a few dominant weights warns that the estimate may be unstable.

Positivity problems arise when some covariate patterns have treatment probabilities near zero or one. Their inverse probabilities are large, so estimates can be highly variable and sensitive to model choices. Truncating extreme weights may reduce variance but changes the estimator and can introduce bias; report the rule and, where useful, compare results under reasonable alternatives. No truncation rule can recover information about treatment groups absent from a covariate stratum.

Treatment weighting and standardization are alternative ways to use measured covariates to estimate marginal treatment-specific risks. Standardization predicts risks conditional on covariates and averages them over a target covariate distribution; weighting reweights observed treatment groups toward a common distribution. Both rely on consistency, exchangeability, positivity, and adequate modeling. A crude comparison does neither adjustment. Treatment weights also do not automatically handle censoring: if follow-up is censored before the horizon, the analysis must address censoring under suitable assumptions, potentially using censoring weights as well. Weighting cannot eliminate bias from unmeasured confounding, incorrect treatment probabilities, ill-defined treatment versions, or inadequate overlap.

Common Mistake

A frequent error is to divide the weighted event count in one treatment arm by the sum of weights from both arms. That denominator does not normalize the treated group and does not estimate its treatment-specific risk. In the first example the correct treatment denominator is \(8(1.25)+2(5)=20\), not the total weight across the study. Another error is to interpret a weighted difference as automatically causal. Weighting creates the desired covariate balance only if the propensity model and positivity are adequate, and causal interpretation additionally requires consistency, conditional exchangeability, and appropriate handling of censoring.

Key takeaway: For each treatment-specific risk, use only that arm’s inverse-probability weights in both the weighted event numerator and the arm-specific normalizing denominator. A weighted contrast estimates a marginal causal contrast only under explicit identification and measurement assumptions.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. For a fixed horizon, what does the indicator \(I(T\leq t,J=1)\) count, and how does a competing event contribute?
  2. If four treated people have weights 2, 2, 4, and 4, and the first and third experience the target event by the horizon, calculate the normalized weighted risk.
  3. Why can a propensity close to zero produce an unstable treatment-weighted estimate?
  4. Does treatment weighting alone correct informative loss to follow-up before the horizon? Explain.
  5. State the direction and size of the risk difference if the estimated treatment-1 risk is 0.24 and treatment-0 risk is 0.30.

Solutions. (1) It equals 1 only when the target event is the first event and occurs by \(t\); a competing event contributes 0 to this numerator but represents an event in the competing-risk process. (2) The weighted event count is \(2+4=6\), and the treated total weight is \(2+2+4+4=12\), so the risk is \(6/12=0.50\). (3) Its inverse is large, so a small number of observations can dominate weighted counts and risk sets, increasing variability and sensitivity. (4) No. Treatment weights address treatment assignment; censoring requires suitable assumptions and censoring adjustment when needed. (5) Treatment 1 minus treatment 0 is \(0.24-0.30=-0.06\), a 6-percentage-point lower estimated risk under treatment 1 by the specified horizon.

Clinical Biostats