Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Causal inference›Bayesian Marginal Structural Model
Regression modelQuasi-experimental / causal inference

Bayesian Marginal Structural Model

Bayesian Marginal Structural Model with Inverse Probability Weighting · Also known as: Bayesian MSM, Bayesian MSM-IPW, Bayesian weighted structural model, Bayesian causal MSM

Bayesian Marginal Structural Model (Bayesian MSM) combines the causal identification power of inverse-probability-weighted marginal structural models with Bayesian posterior inference. Rather than relying on point estimates and asymptotic standard errors, it propagates uncertainty through a full posterior distribution over causal effect parameters, offering coherent uncertainty quantification for causal effects of time-varying treatments.

ScholarGate
  1. Regression model
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Bayesian Marginal Structural Model
Bayesian Difference-in-D…Bayesian Instrumental Va…Doubly Robust EstimationInverse Probability Weig…Marginal Structural ModelPropensity Score Weighti…

When to use it

Use Bayesian MSM when you have longitudinal or panel data with time-varying treatments and time-varying confounders that are also affected by past treatment — the classic setting where standard regression is biased. Choose the Bayesian version specifically when the sample is moderate or small and asymptotic frequentist confidence intervals may be unreliable, when prior information from previous studies is available and scientifically appropriate to incorporate, or when the analysis feeds into a decision model requiring a full posterior predictive distribution. Do not use it when the treatment is fixed at baseline (a standard propensity-score method suffices), when no prior information is available and the sample is large (classical MSM-IPW is simpler and equally valid), or when the software and computational resources for MCMC are unavailable.

Strengths & limitations

Strengths
  • Handles time-varying treatments and time-varying confounders that are intermediate on the causal pathway, which standard regression and propensity-score matching cannot do correctly.
  • Full posterior uncertainty quantification rather than asymptotic confidence intervals, improving inference with small to moderate samples.
  • Allows principled incorporation of prior knowledge from previous trials, meta-analyses, or expert elicitation.
  • Posterior predictive distributions support downstream decision analysis and policy simulation directly.
  • Credible intervals have a direct probability interpretation: there is a 95% posterior probability that the causal effect lies in the stated interval.
Limitations
  • Requires correct specification of both the treatment (weight) model and the structural outcome model; misspecification of either can bias causal estimates.
  • Computationally intensive: MCMC sampling for complex longitudinal models can be slow, and fully propagating weight uncertainty adds further cost.
  • Sensitivity to prior choice can be substantial when data are sparse; results should be accompanied by prior-sensitivity analysis.
  • Stabilised weights can still be highly variable if positivity is near-violated, inflating variance regardless of the Bayesian framework.
  • Relatively limited software support compared with frequentist MSM implementations.

Frequently asked

How does the Bayesian MSM differ from the classical (frequentist) MSM?

Both use inverse-probability weights to construct a pseudo-population free of measured time-varying confounding, and both fit a marginal structural model in that pseudo-population. The difference is inference: the classical approach reports a point estimate plus asymptotic standard errors or a bootstrap interval, while the Bayesian MSM specifies priors and produces a full posterior distribution over causal parameters, enabling credible intervals and direct probability statements.

Do I need to model the weights in a Bayesian way as well?

Not necessarily. Many implementations estimate the weights from a frequentist propensity model and then condition on those plug-in weights in the Bayesian structural model. A fully Bayesian treatment propagates uncertainty through both stages, which is more principled but also more computationally demanding.

What software can I use?

Stan (via rstan or cmdstanr in R) and JAGS are the main platforms for specifying and sampling the Bayesian structural model. Weight models are typically fit first with standard regression tools (glm in R, sklearn in Python). The WeightIt R package simplifies weight estimation before passing to a Bayesian sampler.

When is the positivity assumption violated and why does it matter?

Positivity requires that every treatment history has a non-zero probability of occurring in the observed data. Violations cause extreme weights, which make the weighted likelihood (and thus the posterior) unstable. Trim or stabilise weights and report the range of estimated weights as a diagnostic check.

Can Bayesian MSM handle continuous or multivalued treatments?

Yes. For continuous treatments the denominator of the stabilised weights is a conditional density rather than a probability, estimated via density regression. The structural model then parameterises the dose-response curve. This is more complex than the binary case but remains feasible with appropriate software.

Sources

  1. Saarela, O., Stephens, D. A., Moodie, E. E. M., & Klein, M. B. (2015). On Bayesian estimation of marginal structural models. Biometrics, 71(2), 279-288. DOI: 10.1111/biom.12269 ↗
  2. Robins, J. M., Hernan, M. A., & Brumback, B. (2000). Marginal structural models and causal inference in epidemiology. Epidemiology, 11(5), 550-560. DOI: 10.1097/00001648-200009000-00011 ↗

How to cite this page

ScholarGate. (2026, June 3). Bayesian Marginal Structural Model with Inverse Probability Weighting. ScholarGate. https://scholargate.app/en/causal-inference/bayesian-marginal-structural-model

Related methods

Bayesian Difference-in-DifferencesBayesian Instrumental VariablesDoubly Robust EstimationInverse Probability WeightingMarginal Structural ModelPropensity Score Weighting

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Bayesian Difference-in-DifferencesCausal inference↔ compare
  • Bayesian Instrumental VariablesCausal inference↔ compare
  • Doubly Robust EstimationCausal inference↔ compare
  • Inverse Probability WeightingCausal inference↔ compare
  • Marginal Structural ModelCausal inference↔ compare
  • Propensity Score WeightingCausal inference↔ compare
Compare side by side →

Similar methods

Marginal Structural ModelPanel Data Marginal Structural ModelRobust Marginal Structural ModelMarginal Structural Model (IPTW)Bayesian Inverse Probability WeightingPolicy Evaluation Marginal Structural ModelHeterogeneous Treatment Effect Marginal Structural ModelMachine Learning-Augmented Marginal Structural Model

Related reference concepts

Multilevel and Partial Pooling ModelsCausal InferenceHierarchical Bayesian ModelsCounterfactual ReasoningEmpirical Bayes MethodsBayesian Computation and MCMC

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Bayesian Marginal Structural Model (Bayesian Marginal Structural Model with Inverse Probability Weighting). Retrieved 2026-07-21 from https://scholargate.app/en/causal-inference/bayesian-marginal-structural-model · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Saarela, Stephens, Moodie & Klein (Bayesian extension); Robins, Hernan & Brumback (original MSM)
Year
2015 (Bayesian extension); 2000 (MSM foundation)
Type
Causal inference / Bayesian weighted regression
DataType
Longitudinal or panel data with time-varying treatments
Subfamily
Quasi-experimental / causal inference
Related methods
Bayesian Difference-in-DifferencesBayesian Instrumental VariablesDoubly Robust EstimationInverse Probability WeightingMarginal Structural ModelPropensity Score Weighting
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account