Marginal Structural Model (MSM)
Marginal Structural Model with Inverse Probability of Treatment Weighting · Also known as: MSM, MSM-IPTW, marginal structural Cox model, weighted structural model
A marginal structural model is a causal modeling framework designed to estimate the effect of a time-varying treatment in the presence of time-varying confounders that are themselves affected by prior treatment. By reweighting observations with inverse probability of treatment weights, MSMs create a pseudo-population in which confounding is eliminated, enabling unbiased estimation of causal treatment contrasts even when standard regression adjustments would fail.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
+26 more
When to use it
Use marginal structural models when treatment varies over time and time-varying covariates both predict future treatment and are affected by past treatment — a situation called treatment-confounder feedback or time-varying confounding. Common contexts include long-term drug exposure studies in epidemiology, repeated policy exposures in economics, and intensive-care treatment sequences in clinical research. MSMs are appropriate for longitudinal cohort data with binary or continuous time-varying treatment and a single final or cumulative outcome. Do not use MSMs when treatment is fixed and assigned once (standard propensity score methods suffice), when the positivity assumption fails (some covariate patterns have zero probability of treatment), when you have very few time points and weak confounding (ordinary regression is adequate), or when the primary interest is a conditional rather than marginal effect.
Strengths & limitations
- Correctly handles time-varying confounders that are intermediate variables on the causal pathway — something conventional regression adjustments cannot do.
- Targets a marginal (population-average) causal effect that is directly policy-relevant and interpretable without conditioning on individual covariate trajectories.
- Separates the treatment model from the outcome model, allowing flexible machine-learning approaches to estimate weights without misspecifying the outcome model.
- Stabilized weights keep the pseudo-population well-behaved and reduce variance compared with raw IPTW estimators.
- Readily extended to survival outcomes via marginal structural Cox models, making it widely applicable in clinical and epidemiological time-to-event research.
- Relies on three identifying assumptions — no unmeasured confounding (sequential exchangeability), positivity (every treatment level has nonzero probability at every history), and correct model specification — all of which are untestable from data alone.
- Extreme or highly variable weights inflate variance and can produce unstable estimates; weight truncation is a common but ad hoc remedy.
- Requires correctly specifying the treatment model at every time point; errors in any period propagate through the entire weight product.
- Inefficient compared with doubly robust estimators such as targeted maximum likelihood estimation (TMLE) when the outcome model is also available.
- Large, high-quality longitudinal datasets with complete covariate histories are needed; missing data in treatment or covariate history requires additional assumptions and methods.
Frequently asked
What makes MSMs different from conventional multivariable regression?
Conventional regression that adjusts for a time-varying covariate that is also affected by past treatment introduces collider-stratification bias. MSMs avoid this by removing confounding through reweighting rather than by conditioning, so that time-varying intermediates do not act as colliders in the adjusted model.
What is the positivity assumption and why does it matter?
Positivity requires that every individual, regardless of their covariate history, has a nonzero probability of receiving each level of treatment at each time point. If positivity fails, the inverse probability weights become infinite for some observations, making estimation impossible and results unreliable. Practical near-violations also inflate variance substantially.
When should I use stabilized versus unstabilized weights?
Always prefer stabilized weights in practice. Unstabilized weights have mean equal to the sample size, which is inefficient and leads to high-variance estimates. Stabilized weights have mean approximately 1 and achieve the same confounding removal with lower variance.
How do I handle extreme weights?
Inspect the weight distribution before fitting the outcome model. Commonly, weights above a threshold (e.g., the 99th percentile or a value of 10–20) are truncated or trimmed. Truncation reduces variance but introduces a small bias; sensitivity analyses should compare results with and without truncation.
Is an MSM the same as doubly robust estimation?
No. An MSM with IPTW is consistent only if the treatment model is correctly specified. Doubly robust estimators such as augmented IPTW or TMLE combine a treatment model and an outcome model, so they are consistent if either (but not necessarily both) is correctly specified — providing an additional layer of protection against misspecification.
Sources
- 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 ↗
- Hernan, M. A., & Robins, J. M. (2020). Causal Inference: What If. Chapman & Hall/CRC. link ↗
How to cite this page
ScholarGate. (2026, June 3). Marginal Structural Model with Inverse Probability of Treatment Weighting. ScholarGate. https://scholargate.app/en/causal-inference/marginal-structural-model
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.
- Difference-in-DifferencesEconometrics↔ compare
- Doubly Robust EstimationCausal inference↔ compare
- G-ComputationCausal inference↔ compare
- Inverse Probability WeightingCausal inference↔ compare
- Propensity Score WeightingCausal inference↔ compare