Inverse probability of treatment weighting (IPTW)
IPTW gives more weight to people whose observed treatment was less likely, to estimate an average treatment effect in the eligible population.
Fit
When to use it, and when not to
Use it when
- You compare two baseline treatments in observational data and want the average effect for all eligible patients.
- You measured the shared causes of treatment and outcome before treatment began.
Not when
- Treatment and confounders change during follow-up. Consider a marginal structural model for time-varying treatment. Read: Choosing an analysis for time-varying treatment
- Some patients have no comparable alternative treatment. Reconsider eligibility or the target; compare matching and weighting options. Read: Choosing propensity matching or weighting
Before you start
What you need
- The eligible population and treatment contrastState the outcome, follow-up horizon and whether the target is the full population.
- A propensity score for each personThis is the chance of receiving treatment given measured baseline factors.
- Weight and balance summariesInspect score distributions, weight tails, effective sample size and weighted differences in baseline factors.
- No unmeasured common cause of treatment and outcome remains.How to check: Choose baseline factors using clinical knowledge and a causal diagram, not treatment prediction alone.
- Each baseline profile can receive either treatment.How to check: Look for empty treatment groups and scores near the extremes; fitted probabilities cannot prove support.
- Treatment versions are well defined, without relevant interference between people.How to check: Align eligibility, treatment assignment and follow-up at time zero.
- The treatment model estimates the required probabilities adequately.How to check: Inspect balance, flexible terms and weight sensitivity; good balance cannot test unmeasured confounding.
- Missing at random may justify multiple imputation conditional on recorded predictors.How to check: State the assumption; refit weights within each imputed dataset. Explore departures if missingness may depend on unseen values.
Plain language
How it works
Estimate each patient's chance of baseline treatment from measured factors chosen by causal reasoning. This chance is the propensity score. For the full-population effect, weight treated people by one divided by their score. Weight untreated people by one divided by one minus their score. Normalize within each group before subtracting risks or means. Stabilized weights leave separately normalized means unchanged.
The aim is balance, not accurate treatment prediction. Check weighted means, spreads and overlap before outcomes. Scores near zero or one can yield huge weights; trimming changes the target population. Use a joint estimating-equation sandwich that includes score fitting, or bootstrap the whole analysis. Default weighted-regression errors can be wrong. Baseline IPTW does not handle treatment-confounder feedback over time.
- Low baseline risk: 25 treated people, 5 events; 75 controls, 30 events. Treatment score: 0.25.
- High baseline risk: 75 treated people, 30 events; 25 controls, 15 events. Treatment score: 0.75.
Worked example
A worked example
- Setting
- A cohort compares a baseline treatment with usual care across low and high baseline risk strata.
- Question
- What is the average difference in fixed-horizon event risk for eligible patients?
- Approach
- Use the stratum treatment shares as scores. Compute each weighted risk from its weighted events divided by its weighted total.
- Result
- Weighted event totals are 60 of 200 for treatment and 100 of 200 for control: 30 versus 50 in 100. The difference is -20 per 100.
- What it means
- These are weighted totals, not extra people. Causal interpretation still needs the stated assumptions; no confidence interval is computed from this summary.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
IPTW cannot repair unmeasured confounding or a treatment that some patients could never receive. Extreme weights can make a few records dominate.
- Treating weighted totals as a larger sample.Instead: Weights change contributions, not the number of independent people.
- Truncating large weights without reporting the change.Instead: Prespecify sensitivity analyses and explain how weight changes affect bias and the target.
- Using an ordinary binomial interval for a weighted contrast.Instead: Bootstrap people and refit the score and contrast in each sample; use a percentile interval. Resample clusters when required.
Inside Mallard
How Mallard uses this
When a plan names a propensity score or inverse probability of treatment weighting, its propensity cue links to IPTW. The method list also offers distinct matching, overlap-weighting and AIPW options.
iptw-propensity-weights-robust-se).analysis.iptw, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Marginal structural models and causal inference in epidemiology (opens in a new tab) · Epidemiology · doi 10.1097/00001648-200009000-00011
- Constructing inverse probability weights for marginal structural models (opens in a new tab) · Am J Epidemiol · doi 10.1093/aje/kwn164
- Moving towards best practice when using inverse probability of treatment weighting (IPTW) using the propensity score to estimate causal treatment effects in observational studies (opens in a new tab) · Stat Med · doi 10.1002/sim.6607