Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
IPTW (inverse probability of treatment weighting) is a propensity score method that weights each person by 1 divided by the probability of receiving the treatment they actually received. The weighting creates a pseudo-population in which measured covariates are balanced between treated and untreated groups, so a simple comparison of outcomes estimates the average treatment effect. IPW (inverse probability weighting) is the general name for the same idea; IPTW is the version applied to a treatment or exposure (Chesnaye et al., Clinical Kidney Journal, 2022).
Inverse probability weighting (IPW) — most often applied to a treatment variable as inverse probability of treatment weighting (IPTW) — is a way to remove confounding from an observational comparison by reweighting the sample rather than restructuring it. Where propensity score matching (PSM) pairs each treated unit with a comparable untreated unit and drops whatever is left over, IPW keeps every unit and instead gives each one a weight equal to the inverse of its estimated probability of having received the treatment it actually received. The result is a reweighted “pseudo-population” in which treatment assignment is no longer associated with the measured covariates — the same balancing goal PSM pursues, reached by a different mechanism, with different failure modes.
That difference in mechanism is the whole story of this page. Weighting the full sample instead of discarding part of it is IPW’s central advantage — and the same mechanism is also the source of its most characteristic problem: a small number of units with a propensity score near 0 or 1 can receive enormous weights, and those few units can end up dominating an estimate that is supposed to represent the whole sample.
How inverse probability weighting works
IPW starts the same way PSM does: fit a model — typically logistic regression — predicting treatment assignment from the pre-treatment covariates believed to influence both treatment and outcome. That fitted probability, written e, is the propensity score for each unit. PSM then uses e to find matches. IPW instead uses e directly as a weight:
- A treated unit is weighted 1 / e.
- An untreated unit is weighted 1 / (1 − e).
Intuitively: a treated unit that looked unlikely to be treated (low e) is up-weighted, because it is standing in for many similar units that, by chance, weren’t treated. An untreated unit that looked unlikely to escape treatment (high e, so 1 − e is small) is up-weighted for the same reason in reverse. Units whose treatment status was highly predictable from their covariates — a treated unit with e near 1, or an untreated unit with e near 0 — get weights close to 1, since there was little to correct for. This construction targets the average treatment effect (ATE), the effect across the whole population; a variant that weights only the untreated group (by e / (1 − e), leaving treated units at weight 1) targets the average treatment effect on the treated (ATT) instead, the same estimand PSM typically targets by construction.
Stabilized weights
The raw weights above are rarely used unmodified in practice. A stabilized weight replaces the numerator of 1 with the marginal (unconditional) probability of the treatment a unit actually received, rather than a flat 1 — for a treated unit, P(treatment) / e; for an untreated unit, P(no treatment) / (1 − e). Because the marginal treatment probability is usually much closer to the propensity scores at the center of the distribution than a bare numerator of 1 is, stabilization narrows the overall spread of the weights without changing what they balance, which is why it is close to standard practice rather than an optional refinement — this is the construction behind marginal structural models as developed by Robins and colleagues, and detailed for practitioners by Cole and Hernán’s widely cited “Constructing Inverse Probability Weights for Marginal Structural Models” (American Journal of Epidemiology, 2008).
IPW vs. propensity score matching: reweighting vs. discarding
Both methods use the same propensity score to address the same problem — confounding by measured covariates in a non-randomized comparison — but they act on the sample differently, and that difference has real consequences for the resulting analysis.
| Dimension | Propensity score matching | Inverse probability weighting |
|---|---|---|
| What happens to the sample | Unmatched units (often at the tails of the propensity-score distribution) are dropped entirely | Every unit is retained and reweighted; none are discarded |
| Effective sample size | Shrinks — sometimes substantially, depending on overlap | Nominally preserved, though extreme weights can erode the effective sample size (see below) |
| Typical estimand | Average treatment effect on the treated (ATT) | Average treatment effect (ATE) by default; ATT achievable with an alternate weight construction |
| Sensitivity to poor overlap | Poorly overlapping units simply go unmatched and are excluded from the reported result | Poorly overlapping units are retained but can receive very large weights, which can dominate the estimate rather than being visibly excluded |
| Extends to time-varying treatment | Not naturally — matching is built around a single treatment decision | Yes — the basis of marginal structural models for treatments and confounders that change over time |
| Diagnostic focus | Post-match covariate balance (standardized mean differences) | Covariate balance after weighting, plus the distribution of the weights themselves |
The practical consequence of “reweight instead of discard” is that IPW does not quietly resolve a poor-overlap problem the way matching does — matching’s response to a treated unit with no comparable untreated counterpart is to exclude it and report a smaller, better-matched sample; IPW’s response is to keep it and multiply its contribution to the estimate, sometimes by a large factor. Neither response is free. Matching trades sample size and generalizability for a visibly cleaner comparison group; IPW trades that same trade-off for statistical stability, and can lose badly on the second half of that trade if overlap is poor enough.
The extreme-weight instability problem
Every observational treatment-selection process has to satisfy positivity: every unit needs a realistic, non-zero probability of having received either the treatment or the comparison condition, given its covariates. Where positivity is violated or nearly violated — a covariate combination that predicts treatment with near-certainty — the propensity score for those units sits near 0 or near 1. Plugged into 1/e or 1/(1 − e), a propensity score of 0.02 produces a weight of 50; one of 0.005 produces a weight of 200. A handful of such units can end up carrying more influence over the final estimate than the rest of the sample combined.
This is the specific failure mode that separates IPW from PSM in practice. Matching’s response to a unit with no realistic counterpart is silence — it simply doesn’t get matched, and the analyst can see the exclusion in the reported sample size. IPW’s response to the same unit is a very large number sitting quietly inside a weighted average, inflating the variance of the estimate (a small number of large weights behaves, for variance purposes, like a much smaller effective sample) without necessarily announcing itself unless the analyst specifically checks the weight distribution. A treatment-effect estimate that looks precise on paper can be substantially driven by a handful of extreme-weight units — and because a weighted mean doesn’t flag which observations dominated it, this can go unnoticed in a superficial read of the results.
Diagnosing the problem before it distorts the estimate
- Inspect the weight distribution directly. A histogram of the (stabilized) weights, plus the maximum weight and the ratio of maximum to mean, is the first and cheapest check. A small number of weights many multiples larger than the rest is the signature of the problem, not an edge case to explain away.
- Check the propensity-score overlap between groups before weighting is even applied — the same overlap plot used to assess matching feasibility. Poor overlap predicts extreme weights before they’re calculated, the way a skewed input predicts a skewed output.
- Report the effective sample size the weighted analysis is actually running on (a standard formula, sometimes attributed to Kish, divides the square of the summed weights by the sum of squared weights), not just the nominal count of units. A large nominal sample with a handful of dominant weights can have an effective sample size far smaller than the row count suggests.
What to do about extreme weights
- Stabilize first. Stabilized weights (above) are the default response and materially narrow the distribution before any further correction is needed — an unstabilized-weight analysis with an instability problem should usually be re-run stabilized before reaching for trimming.
- Trim or truncate as a last resort, not a default. Capping weights at a chosen percentile (commonly the 1st/99th, though the specific cut point is a judgment call reported explicitly, not a fixed rule) or at a fixed maximum value reduces variance at the cost of some bias, because it quietly changes the population the estimate describes — the units that got trimmed are no longer contributing their full weight to what is nominally still called the “average treatment effect.” Report the trimming rule used and how many units it affected; an untrimmed and a trimmed estimate reported side by side is a stronger disclosure than either alone.
- Consider whether the question is answerable with this design at all. Severe non-overlap is sometimes a sign that the treated and untreated groups are too different on the covariates that predict treatment for any reweighting scheme to produce a trustworthy comparison — in that case, the honest conclusion is that this data doesn’t support the causal question being asked, not that a more aggressive trimming rule will fix it.
- Doubly robust alternatives. Augmented inverse probability weighting (AIPW) and targeted maximum likelihood estimation (TMLE) combine a weighting model with an outcome model, giving the estimate two independent chances to be correctly specified and generally more stable behavior under the same positivity problems that destabilize plain IPW — worth considering when extreme weights persist after stabilization and reasonable trimming.
When IPTW beats matching for a causal question
Neither method is categorically better; the right choice depends on what the causal question actually needs.
- The treatment or confounders change over time. This is IPTW’s strongest case. When a covariate is affected by earlier treatment and also predicts later treatment and the outcome — a time-varying confounder that is simultaneously a mediator — standard covariate adjustment or matching at a single time point cannot correctly separate the treatment effect from that confounding, because adjusting for the covariate blocks part of the treatment’s real effect while failing to fully remove the confounding it’s supposed to fix. IPTW, applied at each time point to build a marginal structural model, is the standard solution to exactly this structural problem; matching has no natural extension to it.
- The estimand of interest is the ATE, not the ATT. If the research question is about the effect of treatment across the whole population — including units that, in this dataset, happened not to be treated — IPW’s default construction targets that directly. Matching’s natural estimand, built by pairing treated units to comparable controls, is the ATT: the effect specifically among those who received treatment. These are genuinely different quantities, and the choice between them should follow from the question, not from which method is more familiar.
- Preserving sample size and power matters, and overlap is reasonably good. Where the treated and untreated groups overlap well on the propensity-score distribution, IPW’s central advantage — using the full sample rather than discarding unmatched units — comes with little of its central risk, since there are few if any near-0/near-1 propensity scores to produce extreme weights. This is the case where IPW’s benefit is closest to free.
- Matching still wins when overlap is poor and the comparison needs to be visibly clean. If a meaningful share of the treated group has no realistic untreated counterpart, matching’s response — exclude them, and say so plainly in the reported sample size — is more transparent and often more defensible than IPW’s response of assigning them a large weight that a casual reader of the results won’t see. A published matching analysis that drops 30% of the treated group for lack of overlap is disclosing a real limitation in the design; a weighted analysis with the same underlying overlap problem can look complete while quietly being driven by a handful of extreme-weight observations.
The two methods share the limitation that matters most: neither can address confounding from a variable that was never measured. Both PSM and IPW balance the covariates that were actually put into the propensity model — post-weighting or post-matching balance diagnostics say nothing about a confounder that was never collected. Choosing between the two methods is a decision about sample retention, estimand, and how time-varying treatment is handled; it is not a decision about which one gets closer to a randomized trial’s guarantees, because neither one does. See CASRAI’s guide to endogeneity sources and remedies for the broader landscape of tools — instrumental variables, difference-in-differences, regression discontinuity — that address confounding from causes weighting and matching cannot reach.
IPTW worked example: from propensity score to weights
Chesnaye and colleagues illustrate IPTW with a comparison of two dialysis treatments in which diabetes predicts which treatment a patient receives. Among patients with diabetes, the probability of receiving the first treatment (EHD) is 0.25. Those patients on EHD get a weight of 1 / 0.25 = 4, and those with diabetes on the other treatment (CHD) get 1 / (1 – 0.25) = 1.33. Among patients without diabetes the pattern reverses: EHD patients get 1 / 0.75 = 1.33 and CHD patients get 1 / (1 – 0.75) = 4. In the original sample diabetes was 75% in one arm and 25% in the other; after weighting it is 50% in each arm (source).
| Step | What you do |
|---|---|
| 1. Model treatment | Fit a logistic regression of treatment on pre-treatment confounders to get each unit’s propensity score |
| 2. Compute weights | 1 / e for treated units, 1 / (1 – e) for untreated units; stabilize if the spread is wide |
| 3. Check balance | Recompute standardized mean differences in the weighted sample |
| 4. Estimate the effect | Fit the weighted outcome model, with a robust variance estimator or bootstrap |
How to check balance and get valid standard errors
After weighting, compare covariates between groups with standardized mean differences. As a rule of thumb, a standardized difference below 10% (0.10) is considered a negligible imbalance (Chesnaye et al., 2022). A Love plot shows these differences before and after weighting in one figure. Because weighting makes observations non-independent, the standard errors from a plain regression are not valid; the same paper recommends either a robust “sandwich” variance estimator or bootstrap-based methods.
When treatment and confounders change over time, IPTW is applied at each time point inside a marginal structural model. When extreme weights persist, doubly robust estimation adds an outcome model as a second safeguard.
Assumptions inverse probability weighting depends on
An IPW estimate is only as credible as the assumptions behind it, and the tutorial by Chesnaye et al. (2022) lists them explicitly. Four matter in practice:
- Exchangeability (no unmeasured confounding). Conditional on the measured covariates, treated and untreated groups are exchangeable. Cole and Hernán (2008) note that this is not empirically verifiable from the data: weighting can balance measured covariates, never unmeasured ones. See endogeneity sources and remedies for the wider problem.
- Positivity. Both exposed and unexposed individuals must exist at each level of every confounder. Cole and Hernán add that zero cells can also arise by chance when data are sparse or covariates are continuous, which is one route to the extreme weights discussed above.
- Consistency. The treatment must be defined well enough that the outcome observed under a given treatment is the outcome that treatment would produce.
- A correctly specified propensity model. Weights are functions of the estimated propensity score, so a misspecified logistic regression for treatment propagates into the effect estimate. Chesnaye et al. advise revisiting the propensity model if balance remains poor after weighting.
What the evidence says about truncation and weight diagnostics
Cole and Hernán (2008) worked through an example with stabilized weights centred at 1.00 and ranging from 0.20 to 4.49. The effect estimate was -1.91 (standard error 0.132) without truncation and -1.80 (standard error 0.122) after truncating at the 1st and 99th percentiles. The authors considered 1st/99th truncation reasonable, and recommended reporting an estimate that holds across a range of reasonable truncation choices rather than a single specification. They also note that truncating all the way to the median reproduces the model adjusted only for baseline covariates, which shows truncation is a continuum between the weighted and unweighted analysis.
The trade-off is stated plainly by Chesnaye et al.: truncation reduces variance but increases bias, because it changes the population the estimate describes. Two further checks come from the same papers. First, the mean of the stabilized weights should be about 1; Cole and Hernán describe this as a necessary condition for a correctly specified weight model, and caution that a pooled mean near 1 can hide time-specific misspecification in longitudinal analyses. Second, Chesnaye et al. recommend stabilized over unstabilized weights because they tend to reduce the variance of the effect estimate, and caution that variance estimates may be unreliable in small samples (they flag concern below roughly 150 participants). The data table below the guide collects these reference values with their sources.
Overlap weights: a bounded alternative
Overlap weighting, introduced by Li, Morgan and Zaslavsky in the Journal of the American Statistical Association (2018; 113(521): 390-400), weights each unit in proportion to its estimated probability of belonging to the opposite group. Because that probability lies between 0 and 1, the weights are bounded and cannot explode the way inverse probabilities do when a propensity score approaches 0 or 1. According to the authors, overlap weights minimise the asymptotic variance of the weighted average treatment effect among balancing weights, and when the propensity score comes from a logistic regression they give exact mean balance on the covariates in the model (abstract and record).
The cost is a change of estimand: overlap weights target the average effect in the overlap population (ATO), the units for whom treatment could plausibly have gone either way, rather than the whole-sample ATE. State this explicitly if you use them, since it changes what the result means for policy or practice.
Software for IPW in R and Stata
In R, the WeightIt package estimates propensity score weights with method = "glm" by default. Setting stabilize = TRUE produces stabilized weights, estimand = "ATT" targets the treated, and weightitMSM() handles time-varying treatments. Calling summary() on the result reports the weight ranges, coefficient of variation, entropy and effective sample size, which are the diagnostics reporting standards ask for. The companion cobalt package’s bal.tab() reports balance statistics, and a threshold such as thresholds = c(m = .05) flags covariates whose weighted mean difference exceeds it. WeightIt offers three standard error approaches: M-estimation that accounts for estimating the weights, robust standard errors that treat the weights as fixed, and the bootstrap. In Stata, teffects ipw belongs to the teffects treatment-effects family.
Balance: why not to test it with p-values
Chesnaye et al. advise against judging balance by p-values, because they depend on sample size: a large sample can make a trivial difference significant, and a small one can hide a large difference. Use standardized differences instead, with the 0.10 rule of thumb above, and if imbalance persists revisit the propensity model rather than adding a significance test.
Reporting standards
A methods section using IPW/IPTW should state, at minimum: which covariates went into the propensity model and why, whether weights were stabilized, the estimand targeted (ATE or ATT), the weight distribution actually observed (at minimum the maximum weight and some measure of spread), whether and how weights were trimmed or truncated, and the resulting effective sample size. As with propensity score matching, reviewers increasingly expect the underlying diagnostics reported directly rather than a summary assurance that “weighting achieved balance” — the weight distribution is as central to judging an IPW analysis as the balance table is to judging a matched one.
Frequently asked questions
Is IPTW the same thing as a propensity score?
No — the propensity score is the estimated probability of treatment given covariates; IPTW is one specific way of using that score (as the basis of a weight, rather than as the basis of a match). The same propensity score can feed either a matching or a weighting analysis.
Does IPW require a larger sample than matching?
Not inherently — IPW retains the full sample rather than discarding units, so in principle it needs no more data than matching and can preserve more of what’s collected. The catch is that a sample with poor covariate overlap will produce extreme weights under IPW just as it produces unmatched, excluded units under PSM; neither method turns a fundamentally poor-overlap sample into a well-powered one.
What’s a “good” maximum weight?
There is no universal cutoff, which is exactly why the weight distribution needs to be reported rather than summarized as “acceptable.” A useful practical signal is comparing the maximum weight to the mean weight and to the overall sample size — a handful of weights many times larger than the rest, or a few units effectively standing in for a large share of the weighted total, is the pattern worth investigating and disclosing, whatever the specific numeric threshold used.
Can IPW and matching be combined?
Yes. Matching weights (Li and Greene) use min(e, 1 − e) in the numerator to approximate 1:1 matching while keeping all units, and weighting followed by outcome regression on the weighted sample is also used in practice. Combining a weighting or matching step with an outcome model is part of what gives doubly robust methods like AIPW their name: the estimate stays consistent if either the treatment model or the outcome model is correctly specified, not only if both are.
Does stabilizing the weights change what the estimate measures?
No — stabilization changes the numerator used to construct the weight, which narrows the weight distribution and reduces variance, but it targets the same estimand as the corresponding unstabilized weight. It is a variance-reduction technique, not a change to the causal question being asked.
What is the difference between IPW and IPTW?
IPTW (inverse probability of treatment weighting) is inverse probability weighting applied to treatment assignment, using the propensity score to build the weights. “IPW” is the broader label; the same idea is also applied to censoring or missing data, where WeightIt supports censoring weights through its .cens() functions.
Should I truncate weights, and at what percentile?
Truncating at the 1st and 99th percentiles is common, and Cole and Hernán judged it reasonable in their example, but it trades lower variance for added bias. Report results across several reasonable truncation choices and state the one used.
Can I use p-values to test whether the weights achieved balance?
No. P-values depend on sample size, so standardized differences are the recommended check.
Which software runs IPW?
R’s WeightIt with cobalt for balance checking, and Stata’s teffects ipw.
Sources
Sources:
- Chesnaye NC et al. An introduction to inverse probability of treatment weighting in observational research. Clin Kidney J, 2022. https://pmc.ncbi.nlm.nih.gov/articles/PMC8757413
- Cole SR, Hernán MA. Constructing inverse probability weights for marginal structural models. Am J Epidemiol 2008;168(6):656-664. https://pmc.ncbi.nlm.nih.gov/articles/PMC2732954/
- WeightIt: Weighting for covariate balance (CRAN vignette). https://cran.r-project.org/web/packages/WeightIt/vignettes/WeightIt.html
- Li F, Morgan KL, Zaslavsky AM. Balancing covariates via propensity score weighting. J Am Stat Assoc 2018;113(521):390-400. https://econpapers.repec.org/RePEc:taf:jnlasa:v:113:y:2018:i:521:p:390-400
Data: Reported diagnostics and thresholds for inverse probability weighting
Compiled from a methods tutorial (Chesnaye et al. 2022), a methodological paper on weight construction (Cole and Hernan 2008) and the WeightIt R package vignette: the numeric checks and reference values each source gives for judging an IPW analysis.
Period covered: 2008/2022.
| Diagnostic or reference value | Value | What it checks | Source |
|---|---|---|---|
| Standardized difference after weighting, negligible imbalance | below 0.10 (10%) | Covariate balance between weighted groups | Chesnaye et al. 2022 |
| Example balance threshold in package output (bal.tab thresholds argument) | m = 0.05 | Flags weighted mean differences above the threshold | WeightIt vignette |
| Mean of stabilized weights | 1 | Necessary condition for a correctly specified weight model | Cole and Hernan 2008 |
| Common truncation percentiles | 1st and 99th | Caps extreme weights; reduces variance, increases bias | Chesnaye et al. 2022; Cole and Hernan 2008 |
| Cole and Hernan example: stabilized weight range after 1st/99th truncation | 0.20 to 4.49 | Spread of weights in their worked example | Cole and Hernan 2008 |
| Cole and Hernan example: estimate, untruncated (SE) | -1.91 (0.132) | Effect estimate before truncation | Cole and Hernan 2008 |
| Cole and Hernan example: estimate, truncated at 1st/99th (SE) | -1.80 (0.122) | Effect estimate after truncation | Cole and Hernan 2008 |
| Sample size below which variance underestimation is a concern | 150 | Small-sample reliability of IPTW variance | Chesnaye et al. 2022 |
Sources
- Chesnaye NC et al. An introduction to inverse probability of treatment weighting in observational research. Clin Kidney J 2022 (accessed 2026-11-18)
- Cole SR, Hernan MA. Constructing inverse probability weights for marginal structural models. Am J Epidemiol 2008;168(6):656-664 (accessed 2026-11-18)
- WeightIt: Weighting for covariate balance (CRAN vignette) (accessed 2026-11-18)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







