Bayesian Inverse Probability Weighting

Statistics
Introduced by
Saarela, Stephens, Moodie & Klein (2015); Liao & Zigler (2020)
Year
2015
Type
Bayesian causal weighting estimator
Family
Quasi-experimental / causal inference

What does it do?

Bayesian Inverse Probability Weighting (Bayesian IPW) extends classical IPW by placing prior distributions over the propensity-score model parameters and carrying that uncertainty into the causal-effect estimate.

The aim is a posterior distribution for the average treatment effect that reflects both propensity-score estimation uncertainty and outcome-model uncertainty, so that credible intervals can be reported in place of asymptotic approximations.

The intuition behind the method

Classical IPW re-weights the observed sample so that treated and untreated units look more comparable, with each unit weighted by the inverse of the probability of receiving the treatment it actually received. The Bayesian version asks what happens if those probabilities are themselves uncertain. The propensity-score model is treated as a probability model with a posterior distribution, so that multiple plausible propensity-score functions are drawn, a weighted treatment-effect estimate is computed under each, and the results are combined. When propensity scores are estimated from limited or noisy data, the resulting posterior for the treatment effect can be wider than a single plug-in IPW estimate would suggest, depending on the prior and the data. This makes the uncertainty visible rather than hidden.

History

Inverse probability weighting is a standard tool in causal inference, extended to that setting through marginal structural models. Bayesian treatments of the propensity score are more recent. Liao and Zigler (2020) examine how uncertainty from the design stage, including the estimated propensity score, propagates into causal estimates for several implementations, one of which is inverse probability of treatment weighting.

When to use it

Choose Bayesian IPW for observational data with a binary treatment (the weight formula on this page covers only that case) and many pre-treatment covariates, when you want the uncertainty in the propensity score represented explicitly. It is most relevant when the sample is small enough that asymptotic IPW variance formulas are unreliable, when substantive prior knowledge about treatment assignment can be encoded, or when the propensity model is complex or positivity is nearly violated, which tends to produce extreme weights. Do not choose it when MCMC or variational computation is not available, or when a frequentist IPW analysis with proper diagnostics already answers the question. Poorly chosen priors can mask uncertainty rather than reveal it, so the prior specification needs justification.

Limitations and considerations

  • Sampling from both the propensity and outcome models by MCMC or variational inference can be slow on large datasets.
  • Misspecified priors on the propensity model can shift the posterior treatment effect, so the prior must be justified rather than chosen by default.
  • Bayesian inference does not repair violations of positivity. If some units have near-zero probability of the treatment they received, the weights remain extreme under every posterior draw.
  • Extreme weights remain a practical problem; the unstabilised form given on this page can produce very large weights, so trimming or stabilised weights are still advisable.
  • Interpreting a posterior distribution and its credible interval requires familiarity with Bayesian reasoning, which may be unfamiliar to some applied audiences.
  • Causal interpretation requires conditional exchangeability (no unmeasured confounding given the covariates), positivity, consistency and no interference between units. Bayesian inference does not remove the need for these assumptions.

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

Strengths

  • Carries propensity-score estimation uncertainty into the posterior for the treatment effect, so the interval does not rest only on a plug-in estimate of the propensity score.
  • Allows informative priors on the propensity-model parameters, which can help when data on treatment assignment are limited.
  • Produces a full posterior for the average treatment effect, so probability statements such as the posterior probability that the effect is positive can be read directly from the analysis.
  • Its uncertainty summaries do not depend only on large-sample variance approximations, which is the motivation for using it in small samples.

Applications

  • Health-services research — estimating treatment effects from administrative claims data with many confounders and limited sample sizes.
  • Pharmacoepidemiology — comparative effectiveness studies where drug assignment is strongly confounded and prior clinical knowledge can inform propensity priors.
  • Social policy evaluation — assessing programme effects in small-area studies where few control units exist and asymptotic IPW inference is unreliable.
  • Environmental epidemiology — estimating effects of pollution exposure on health outcomes with spatially structured confounding and uncertain exposure probabilities.
  • Economics — evaluating firm-level or individual-level policy interventions with rich covariate sets and small treated populations.

How it works

How it works

1

Model the propensity score e(X), the probability that each unit receives treatment given its covariates, using a logistic or other flexible regression.

Formula
e(X_i) = P(A_i=1 \mid X_i)
2

Place a prior on the propensity-model parameters and combine it with the data through the likelihood. The result is a posterior distribution over the parameters, which induces a posterior distribution over e(X) rather than a single fitted value. It is typically obtained by MCMC or variational inference.

Formula
p(e(X_i) \mid X_i, \alpha) \propto L(\alpha \mid X, A)\, p(\alpha)
3

For each posterior draw, compute the weights given in the formula: treated units receive 1/e(X) and untreated units receive 1/(1-e(X)). The formula shown is the unstabilised form. Stabilised variants, which place the marginal probability of the treatment actually received in the numerator, are commonly used when these weights are extreme.

Formula
w_i = \frac{A_i}{e(X_i)} + \frac{1 - A_i}{1 - e(X_i)}
4

Fit a weighted Bayesian outcome model in which each observation's likelihood contribution is raised to the power of its weight, with a prior on the outcome-model parameters. Because the weights depend on e(X), the weights from each propensity draw feed into this step, so the two sources of uncertainty are combined across draws. Because the weights enter as exponents on the likelihood, the result is a weighted pseudo-posterior rather than a standard posterior. Its credible intervals may not have nominal coverage, so comparing them with a sandwich or bootstrap variance estimate is advisable.

Formula
p(\mu \mid Y, w, \beta) \propto \prod_i p(Y_i \mid \mu_i, \beta)^{w_i}\, p(\beta)
5

Combine the propensity and outcome posteriors to obtain a posterior for the treatment effect, summarised by its posterior mean and a credible interval. The estimand in the mechanics panel is conditional on covariates. The marginal average treatment effect is obtained by averaging that conditional effect over the distribution of the covariates.

Formula
\hat{\tau}_{ATE} = E[Y(1) - Y(0) \mid X]

Common pitfalls

  • Using flat priors on the propensity-model parameters and presenting the result as better uncertainty quantification. A flat prior adds little regularisation, so the posterior mainly reflects the likelihood.
  • Treating the posterior mean as if it were a frequentist point estimate and ignoring the posterior spread, which is the main output the Bayesian approach adds.
  • Checking covariate balance only once. Balance should be assessed after weighting across the propensity draws used, because a misspecified propensity model can leave covariates unbalanced even under Bayesian weights.
  • Reporting only the posterior mean of the average treatment effect without its credible interval.
  • Treating only one stage as Bayesian and describing the result as full propagation of uncertainty. Full propagation requires that both the propensity and outcome stages carry their own uncertainty; a hybrid can be a reasonable analysis, but it should be described as such.

Frequently asked questions

How is Bayesian IPW different from standard IPW?

Standard (frequentist) IPW estimates the propensity score once and uses those point estimates as if they were the true probabilities, understating uncertainty. Bayesian IPW draws the propensity score from a posterior distribution and propagates that uncertainty into the treatment-effect estimate. Depending on the prior and the data, this can produce a wider posterior credible interval than a plug-in estimate would give.

Do I need to specify priors for both the propensity and outcome models?

Yes. A fully Bayesian IPW analysis requires priors on the propensity-score model parameters and on the outcome-model parameters. Using a flat prior on the propensity model and a Bayesian outcome model is a hybrid: it can be a legitimate analysis, but it does not fully propagate propensity uncertainty in the Bayesian sense.

What software can fit Bayesian IPW models?

Any general-purpose Bayesian modelling tool that supports MCMC or variational inference can fit the propensity and weighted outcome models. Some analysts fit a Bayesian logistic regression for the propensity stage and a weighted Bayesian regression for the outcome stage. Check the documentation of any specific tool for how it handles weights and posterior sampling.

Does the Bayesian approach fix extreme weight problems?

Not automatically. Extreme weights arise when positivity nearly fails, and Bayesian inference on the propensity model does not rescue this, because the weights can still be extreme under every posterior draw. Weight trimming or stabilised weights remain advisable.

When should I prefer Bayesian IPW over doubly robust estimation?

Prefer Bayesian IPW when you have strong prior knowledge to encode in the propensity model, or when full posterior uncertainty quantification is the goal. Doubly robust estimation is preferable when one of the two models (propensity or outcome) may be misspecified, as it remains consistent if either model is correctly specified.

Related methods

Sources

  1. Saarela, O., Stephens, D. A., Moodie, E. E. M., & Klein, M. B. (2015). On risk prediction and characterisation of treatment effects in a Bayesian framework using the propensity score. Statistics in Medicine, 34(14), 2170-2185.

    Open publication reference
  2. Liao, S. X., & Zigler, C. M. (2020). Uncertainty in the design stage of two-stage Bayesian propensity score analysis. Statistics in Medicine, 39(17), 2265-2290.

    Open DOI reference