Inverse Probability of Treatment Weighting (IPW / IPTW)

Statistics
Introduced by
Robins, Hernán & Brumback
Year
2000
Type
Causal inference weighting estimator

What does it do?

Inverse Probability Weighting is a causal-inference method that gives each observation a weight equal to the inverse of the probability of the treatment it actually received.

Introduced for marginal structural models by Robins, Hernán and Brumback (2000), it reweights observational data to form a pseudo-population in which treatment is independent of measured confounders, provided the method's assumptions hold.

The intuition behind the method

In observational data, treated and untreated groups often differ in measured characteristics, so a naive comparison mixes the treatment effect with differences in who was treated. IPW reweights people according to how surprising their treatment was given their covariates. Individuals who were unlikely to receive the treatment they actually received count for more, and those who were very likely to receive it count for less. In the reweighted sample, treatment is on average unrelated to the measured covariates, so the comparison better reflects the effect of treatment itself.

History

Robins, Hernán and Brumback (2000) introduced marginal structural models for causal inference in epidemiology with time-varying exposures, together with inverse-probability-of-treatment weighted estimators for their parameters. The general idea of weighting observations by inverse probabilities predates this work; the 2000 paper's contribution was its use for time-varying confounders affected by earlier treatment, where standard adjustment is biased. Cole and Hernán (2008) later gave practical guidance on constructing the weights, describing weight truncation as an informal way to manage the tradeoff between bias and precision.

When to use it

Choose IPW for an observational causal question in which the treatment is measured, the relevant confounders are observed, and the aim is a marginal effect for the whole population. It applies to binary treatments and extends to continuous (generalized IPW) and time-varying treatments, the latter being the setting in which marginal structural models were developed. It is a weaker choice when important confounders are unmeasured, when some units have treatment probabilities close to 0 or 1 so that weights become extreme, or when the sample is small. Small samples make propensity estimates and the resulting weights unstable, and the sample size needed depends on the number of covariates and the degree of overlap between treated and untreated units.

Limitations and considerations

  • Consistency depends on four assumptions (Cole and Hernán, 2008): consistency, meaning the outcome observed under the treatment received equals the potential outcome under that treatment; exchangeability, meaning no unmeasured confounding; positivity; and a correctly specified weight model. None of these can be fully verified from the data.
  • Units with propensity close to 0 or 1 receive very large weights, which inflates the variance; truncating the weights trades some bias for precision.
  • A misspecified propensity model produces biased weights, and therefore a biased estimated effect.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Adjusts for measured confounders by reweighting the full sample, so every observation contributes to the estimate rather than being discarded or paired.
  • Designed for time-varying treatments with time-varying confounders that are affected by earlier treatment, a case where standard covariate adjustment is biased (Robins, Hernán and Brumback, 2000).
  • Can be combined with an outcome regression into an augmented (doubly robust) estimator that remains consistent if either the propensity model or the outcome model is correctly specified.

Applications

  • Estimating the causal effect of a treatment or exposure from observational data while adjusting for measured confounders.
  • Marginal structural models for time-varying exposures, such as longitudinal treatment in epidemiology.
  • Correcting nonrandom attrition in panel data, where units leave the sample for reasons related to characteristics observed in the first period. Wooldridge (2002, 2010) describes an IPW approach for correcting nonrandom attrition in this way.

How it works

How it works

1

A propensity model estimates e(X), the probability of receiving treatment given the measured covariates X, commonly with logistic regression. Its fitted values are used to construct the weights in the next step.

Formula
e(X_i) = \Pr(T_i = 1 \mid X_i)
2

Each observation receives the inverse of the probability of its observed treatment: treated units are weighted by 1/e(X) and untreated units by 1/(1 - e(X)). These weights target the average treatment effect in the whole population. A weighted outcome model, in which the outcome is regressed on treatment with weights w_i, estimates the marginal effect in the reweighted pseudo-population. Stabilized weights, whose numerator is the marginal probability of the treatment actually received rather than 1, are often used to reduce variance: Pr(T = 1) for treated units and Pr(T = 0) for untreated units. Extreme weights are usually trimmed at a chosen percentile cut-off, since they can dominate the estimate and inflate its variance. Trimming trades some bias for precision (Cole and Hernán, 2008).

Formula
w_i = \dfrac{T_i}{e(X_i)} + \dfrac{1 - T_i}{1 - e(X_i)}

Common pitfalls

  • Ignoring extreme weights. Units with propensities near 0 or 1 can dominate the weighted estimate; the weight distribution should be inspected and, if needed, truncated with its bias–precision cost acknowledged.
  • Applying IPW where positivity is violated. Weights grow without bound for units with propensities near 0 or 1, and truncation only partly mitigates this. Augmented estimators built on the same weights are affected as well, so the overlap between treated and untreated units should be checked, and the target population or estimand reconsidered, before relying on the estimate.
  • Using IPW on a small sample. Small samples make propensity estimates and the resulting weights unstable, and the sample size needed depends on the number of covariates and the degree of overlap between treated and untreated units.
  • Relying on one propensity model with no outcome model check. A single specification that is wrong biases the estimate, which is the motivation for augmented estimators.

Frequently asked questions

What is a propensity score in IPW?

It is e(X), the estimated probability of receiving treatment given the measured covariates, usually from a logistic regression. IPW uses the inverse of this probability, applied to the treatment actually received, as the weight for each observation.

Why do extreme weights matter?

When a unit had a probability of treatment close to 0 or 1, its inverse weight becomes very large and can dominate the estimate, inflating the variance. Truncating the weights reduces this at the cost of some bias (Cole and Hernán, 2008), and severe positivity violations cannot be fully rescued.

What is the difference between IPW and propensity score matching?

Both use the propensity score to address confounding. IPW keeps every observation and reweights it to form a pseudo-population, whereas matching selects or pairs treated and untreated units with similar scores. The two make different tradeoffs in how they use the sample, so the choice depends on the data.

How does IPW relate to doubly robust estimation?

IPW can be combined with an outcome regression to form an augmented (doubly robust) estimator, which stays consistent as long as either the propensity model or the outcome model is correctly specified, a safeguard against misspecification.

Related methods

Sources

  1. Robins, J. M., Hernán, M. A., & Brumback, B. (2000). Marginal Structural Models and Causal Inference in Epidemiology. Epidemiology, 11(5), 550-560.

    Open DOI reference
  2. Cole, S. R., & Hernán, M. A. (2008). Constructing Inverse Probability Weights for Marginal Structural Models. American Journal of Epidemiology, 168(6), 656-664.

    Open DOI reference
  3. Econometric Analysis, 8th Edition, sec. 11.2.5, p. unknown