Marginal Structural Models: When Today's Confounder Is Yesterday's Treatment Effect

Clinical Epidemiology ResearchMethodology and Research DesignUniqcret doctor knowledges
Marginal Structural Models: When Today's Confounder Is Yesterday's Treatment Effect
On this page

อ่านฉบับภาษาไทย (Thai version)

Abstract

Marginal structural models fitted with inverse probability weighting (MSM + IPW) estimate the total effect of a treatment that changes over time without being misled by a time-varying confounder. Take patients on a steroid: severity on day 2 decides whether the steroid continues and also drives mortality, yet the day-1 steroid has already changed that severity. Ordinary regression is stuck. Leaving severity out leaves the next steroid decision confounded; adjusting for it controls a variable the first dose caused and cuts away part of the treatment effect. IPW uses severity only to ask how likely each patient was to receive the treatment actually received, then reweights patients into a pseudo-population in which severity history no longer decides treatment. The MSM then compares the strategies: continuing the steroid throughout versus reducing or stopping it throughout. This article follows that one chain step by step and shows why a single treatment with a mediator is a different, simpler problem.


Visual summary.

Steroid today, severity tomorrow

On a medical ward, patients admitted with a serious illness are started on a steroid. Every day the team looks at how sick each patient is and decides again: keep the steroid going, or reduce it or stop it. A research fellow wants to use the ward's records to answer a plain clinical question: does continuing the steroid, rather than reducing or stopping it, change mortality?

The records hold what was given each day, how severe each patient was each day, and who died. The difficulty sits in one fact. The same severity that guided each day's steroid decision was itself shaped by the steroid given the day before. That fact decides how the analysis has to be done.

The example: continue the steroid, or reduce or stop it

The study asks whether continuing a steroid, compared with reducing or stopping it, changes mortality. Two time points are enough to see the whole problem.

On the first day the patient either receives the steroid or does not:

$$A_0 = \text{steroid on day 1}$$

On the next day the team records how sick the patient is:

$$L_1 = \text{severity on day 2}$$

Then comes the next steroid decision, $A_1$ (continue, or reduce or stop), and finally the outcome, $Y$, death. The letter $A$ marks a treatment decision, $L$ a covariate measured along the way, and the subscript says which time point it belongs to.

Today's severity does two jobs

Severity on day 2 does two things at once. First,

$$L_1 \rightarrow A_1$$

that is, severity decides whether the patient gets the steroid again tomorrow. A patient who is still very sick is more likely to have the steroid continued. Second,

$$L_1 \rightarrow Y$$

that is, severity also drives mortality. A sicker patient is more likely to die, whatever the steroid does.

On its own this is ordinary confounding of the next decision: severity is a common cause of $A_1$ and $Y$, and an analyst would simply adjust for it.

The catch: yesterday's steroid already changed today's severity

The problem is that severity on day 2 did not arise on its own. The steroid given on day 1 has already changed it:

$$A_0 \rightarrow L_1$$

Put the arrows together and the structure is

$$A_0 \rightarrow L_1 \rightarrow A_1$$

together with

$$L_1 \rightarrow Y$$

Severity on day 2 is therefore a result of the earlier steroid and a reason for the next one. A variable like this is a time-varying confounder affected by prior treatment: it confounds the later decision, and part of the earlier treatment's effect runs through it [1, 2].

The diagram below draws the full picture. It adds $L_0$, the patient's state before the first dose. $L_0$ is an ordinary baseline confounder of both steroid decisions and of death; nothing earlier changed it, so it causes no special trouble. All the trouble sits in $L_1$.

Time-varying confounding affected by prior treatment. $L_0$ is a baseline confounder, $A_0$ the prior treatment (steroid on day 1), $L_1$ the time-varying covariate (severity on day 2), $A_1$ the subsequent treatment (the next steroid decision) and $Y$ the outcome (death). Key: $L_1$ is affected by prior treatment $A_0$, then predicts both subsequent treatment $A_1$ and outcome $Y$.

What MSM + IPW helps with: one strategy throughout versus another

The question the study really wants answered is a comparison of whole treatment strategies:

If every patient had received treatment strategy A all the way through, compared with strategy B all the way through, how different would the outcome be?

A treatment strategy (also called a regime) is a rule that fixes the treatment at every decision point. Here strategy A is "continue the steroid at every decision" and strategy B is "reduce or stop it at every decision". The answer is a difference in mortality between two hypothetical worlds, one in which everyone follows A and one in which everyone follows B. It is the comparison a randomised trial of the two strategies would make.

Why ordinary regression gets stuck

Suppose the analysis is an ordinary regression of death on the steroid decisions, and the only choice is what to do with severity on day 2. Both choices fail.

No choice of covariates in a single outcome regression fixes the first problem without causing the second [1, 3]. Severity has to be used, but not by holding it fixed.

Where IPW helps: how likely was the treatment this patient actually got?

This is the point where IPW helps. Inverse probability weighting does not put severity into the outcome model. It uses $L_1$ for a different job, to answer one question for every patient:

"With this severity, how likely was this patient to receive the treatment they actually received?"

A very sick patient whose steroid was continued received what most very sick patients receive. That treatment was likely, so the patient's weight stays modest. A very sick patient whose steroid was reduced or stopped did something unusual for their severity. Such patients are rare, so each gets a large weight and stands in for the similar patients who went the other way.

The weight is one over the probability of the treatment received. With two decisions, the two probabilities are multiplied, so each patient is weighted for the whole treatment history [4]:

$$w = \frac{1}{P(A_0 = a_0 \mid L_0)} \times \frac{1}{P(A_1 = a_1 \mid L_0, A_0, L_1)}$$

Here $a_0$ and $a_1$ are the treatments the patient actually received. Reweighting every patient this way builds a pseudo-population: a weighted version of the cohort in which treatment assignment is no longer decided by severity history the way it was in the raw data. Sicker and less sick patients end up spread across continuing and reducing the steroid as if severity had not chosen who got what.

Because severity was used only to build the weights, and never held fixed in the outcome model, the part of the steroid effect that works through severity stays intact. The weights can balance only the severity that was measured and entered into the weight model; a driver of the steroid decision that nobody recorded is not removed. The single-time-point version of this weighting is set out step by step in IPTW: Rebuilding the Comparison a Trial Would Have Given You.

Then the MSM answers the strategy question

The pseudo-population is not yet the answer; it is the ground on which the answer is computed. A marginal structural model (MSM) is a model for the outcome patients would have had under each treatment strategy. It is structural because it describes these would-have-been outcomes (potential outcomes) rather than plain associations, and marginal because it averages over severity instead of holding severity fixed [2].

Fitted in the weighted population, the MSM answers:

"On average, if everyone received treatment strategy A compared with B, what would the difference be?"

In the steroid example, that is the difference in mortality between continuing the steroid throughout and reducing or stopping it throughout. In practice the MSM is a weighted regression of death on the steroid decisions each patient received, with the weights from the IPW step; the risk under strategy A and under strategy B, and their difference, are read off that model.

The one flow to remember

Every step above follows from the one before. Read the chain from top to bottom:

$$\text{Severity affects future treatment + outcome}$$

but severity is also changed by prior treatment

$$\Downarrow$$

ordinary adjustment is stuck

$$\Downarrow$$

IPW = make the treatment groups comparable

$$\Downarrow$$

MSM = estimate the causal effect of the treatment strategy

The two methods split the work. IPW repairs the comparison; the MSM reads the strategy effect off the repaired comparison.

Only mediation, or a job for MSM + IPW?

Not every variable between a treatment and the outcome calls for MSM + IPW. If the structure is only

$$A \rightarrow X \rightarrow Y$$

with a treatment given just once, $X$ is a mediator: a variable on the path through which the treatment works. That is ordinary mediation, and it is not the main reason to reach for MSM + IPW. With one treatment and no later decision, there is no next treatment for $X$ to confound.

The picture changes when treatment is given again and $X$ feeds into the next decision:

$$A_0 \rightarrow X_1 \rightarrow A_1$$

together with

$$X_1 \rightarrow Y$$

This is where MSM + IPW earns its place, because $X_1$ is an effect of the old drug, but a confounder of the new drug. $X_1$ plays exactly the role that severity on day 2, $L_1$, played in the steroid example. The logic of confounders, mediators and comparability sorts the two roles [3]: for $A_0$, $X_1$ is a mediator that must not be held fixed; for $A_1$, it is a confounder that must be dealt with. Weighting handles both at once.

Single treatment or repeated treatment

When an intermediate variable calls for MSM + IPW.
StructureTreatment givenWhat $X$ isCalls for MSM + IPW?
$A \rightarrow X \rightarrow Y$OnceA mediator of $A$No: ordinary mediation
$A_0 \rightarrow X_1 \rightarrow A_1$, with $X_1 \rightarrow Y$More than onceA mediator for $A_0$ and a confounder for $A_1$Yes: $X_1$ is an effect of the old drug and a confounder of the new one

Common misreadings and their fixes

  • "Severity on day 2 is a confounder, so adjust for it."

    It is a confounder only for the next steroid decision. For the day-1 steroid it lies on the path to death, so holding it fixed cuts away part of that effect.

    Fix: Name the dose before naming the role, and use severity to build the weights, not as a covariate in the outcome model.

  • "Leaving severity out keeps the analysis clean."

    Leaving it out leaves the next steroid decision confounded: sicker patients keep the steroid and also die more often, so the steroid carries their risk.

    Fix: Severity has to be used, just not held fixed: IPW uses it to ask how likely each patient's treatment was.

  • "Any variable between a treatment and the outcome calls for an MSM."

    With a treatment given once, $A \rightarrow X \rightarrow Y$ is ordinary mediation.

    Fix: Reach for MSM + IPW when treatment is repeated and the variable that guides the next decision was changed by the earlier one.

Glossary

time-varying confounder (ตัวกวนที่เปลี่ยนตามเวลา)
A variable measured during follow-up, such as severity on day 2, that affects later treatment and the outcome and may itself be changed by earlier treatment.
treatment strategy
A rule that fixes the treatment at every decision point, such as continuing the steroid at every decision; also called a regime.
inverse probability weighting
Weighting each patient by one over the probability of the treatment actually received, given the measured history, multiplied over the decisions.
pseudo-population (ประชากรเสมือน (pseudo-population))
The weighted population in which treatment assignment no longer depends on the measured severity history.
marginal structural model (แบบจำลองโครงสร้างระดับประชากร (marginal structural model, MSM))
A model for the outcome under each treatment strategy, averaged over the time-varying confounders rather than conditioned on them, fitted in the weighted population.
potential outcome (ผลลัพธ์ที่อาจเกิดขึ้น (potential outcome))
The outcome a patient would have had under a given treatment strategy; only the one for the strategy actually followed is observed.
mediator (ตัวแปรสื่อกลาง (mediator))
A variable on the causal path from a treatment to the outcome, through which part of the effect passes.

References

  1. Daniel RM, Cousens SN, De Stavola BL, Kenward MG, Sterne JAC. Methods for dealing with time-dependent confounding. Stat Med. 2013;32(9):1584-1618. doi:10.1002/sim.5686 https://doi.org/10.1002/sim.5686
  2. Robins JM, Hernán MA, Brumback B. Marginal structural models and causal inference in epidemiology. Epidemiology. 2000;11(5):550-560. doi:10.1097/00001648-200009000-00011 https://doi.org/10.1097/00001648-200009000-00011
  3. Hernán MA, Robins JM. Causal inference: what if [Internet]. Boca Raton: Chapman & Hall/CRC; 2020. https://miguelhernan.org/whatifbook
  4. Cole SR, Hernán MA. Constructing inverse probability weights for marginal structural models. Am J Epidemiol. 2008;168(6):656-664. doi:10.1093/aje/kwn164 https://doi.org/10.1093/aje/kwn164

Key takeaways

  • MSM + IPW estimates the total effect of a treatment that changes over time without being misled by a time-varying confounder.
  • Severity on day 2 is changed by the day-1 steroid and drives both the next steroid decision and death, so leaving it out confounds the next decision and adjusting for it cuts away part of the effect.
  • IPW asks how likely each patient was to receive the treatment actually received, given severity, and reweights patients into a pseudo-population in which severity no longer decides treatment.
  • The MSM, fitted in that weighted population, answers the strategy question: the average difference if everyone followed strategy A throughout versus strategy B throughout.
  • A single treatment with a mediator is ordinary mediation; MSM + IPW pays off when the variable is an effect of the old drug and a confounder of the new one.

Related in the wiki: [[inverse-probability-weighting-treatment-censoring-selection]] [[extreme-propensity-weights-stabilization-truncation-trimming]]

0
Message for International and Thai ReadersUnderstanding My Medical Context in ThailandRead more →Message for International and Thai ReadersUnderstanding My Broader Content Beyond MedicineRead more →

Comments

No comments yet. Be the first to share your thoughts.

Sign in to comment