Tutorials › Marginal Structural Models › Deriving Regime Contrasts From Treatment-History Effects

Time-Varying Treatments and Confounder Feedback · Tutorial 20 of 501

Deriving Regime Contrasts From Treatment-History Effects

Learn to derive a two-visit sustained-treatment contrast from treatment-history effects and identify when it combines more than one regression coefficient.

Intermediate 11 min read

What You'll Learn

  • Express a two-visit regime contrast as a difference between mean potential outcomes.
  • Decompose the contrast into treatment-history increments along a specified path.
  • Derive the contrast under additive and interaction models.
  • Calculate a regime contrast when an intermediate covariate transmits an earlier treatment effect.
  • Distinguish a conditional regression coefficient from a marginal regime contrast.
  • Check the identification assumptions needed to interpret the contrast causally.

From Treatment-History Effects to a Regime Contrast

With treatment at two visits, “the effect of treatment” can refer to several comparisons. It might mean changing the first treatment while holding the second fixed, changing the second treatment after a particular first-visit history, or assigning treatment at both visits rather than at neither. These are different contrasts. A coefficient attached to one treatment variable need not equal the effect of a sustained regime.

Write \(A_1,A_2\in\{0,1\}\) for treatment at visits 1 and 2. Let \(Y(a_1,a_2)\) be the outcome that would be observed under the treatment history \((a_1,a_2)\), and define its marginal mean by \(\mu(a_1,a_2)=E[Y(a_1,a_2)]\). The sustained-treatment versus no-treatment contrast is

$$ \Delta_{\mathrm{reg}}=\mu(1,1)-\mu(0,0). $$

This is a marginal contrast between two complete treatment histories. It includes all pathways through which the assigned treatments affect the outcome, including pathways through an intermediate covariate affected by earlier treatment. The notation here identifies the estimand; its causal interpretation from observed data requires assumptions stated below.

Definition: A treatment-history effect compares mean outcomes under two specified histories, such as \(\mu(1,0)-\mu(0,0)\). A regime contrast compares the mean outcomes under two specified treatment strategies. In this tutorial, the regime contrast is \(\mu(1,1)-\mu(0,0)\).

Decomposing the Contrast Along a Treatment Path

The contrast can be decomposed by changing one visit at a time. One path first changes visit 1 while visit 2 remains untreated, then changes visit 2 after visit 1 has been set to treatment:

$$ \begin{aligned} \mu(1,1)-\mu(0,0) &=\{\mu(1,0)-\mu(0,0)\} +\{\mu(1,1)-\mu(1,0)\}. \end{aligned} $$

This equality follows by adding and subtracting \(\mu(1,0)\). The first increment is the effect of changing \(A_1\) when \(A_2=0\); the second is the effect of changing \(A_2\) after setting \(A_1=1\). Neither increment is generally the same as the other. Reversing the order gives another valid decomposition, with different component contrasts but the same total.

Result: For any four finite treatment-history means, the sustained-treatment versus no-treatment contrast equals the sum of the treatment-history increments along either path from \((0,0)\) to \((1,1)\). In particular, $$ \mu(1,1)-\mu(0,0) =\{\mu(1,0)-\mu(0,0)\}+\{\mu(1,1)-\mu(1,0)\}. $$ Proof: The right-hand side is \(\mu(1,0)-\mu(0,0)+\mu(1,1)-\mu(1,0)\). The two occurrences of \(\mu(1,0)\) cancel, leaving \(\mu(1,1)-\mu(0,0)\). The equality does not require a linear model or absence of interaction. \(\square\)

Worked Example: History-Specific Effects With an Interaction

Suppose the four mean outcomes under treatment histories are \(\mu(0,0)=10\), \(\mu(1,0)=13\), \(\mu(0,1)=12\), and \(\mu(1,1)=18\). Find the sustained-treatment contrast and its increments along the path that changes visit 1 first.

The regime contrast is \(18-10=8\). The first increment is \(13-10=3\), and the second is \(18-13=5\). Their sum is \(3+5=8\), as required.

Changing visit 2 when visit 1 is untreated instead gives \(12-10=2\). Changing visit 1 after visit 2 has been set to treatment gives \(18-12=6\). This alternative path also sums to \(2+6=8\). The difference between the visit-specific increments reflects interaction: the effect associated with changing one treatment depends on the other treatment history.

What a Linear Treatment-History Model Implies

A useful parameterization of the four marginal means is a saturated model for two binary treatments:

$$ \mu(a_1,a_2)=\theta_0+\theta_1a_1+\theta_2a_2+\theta_{12}a_1a_2. $$

Here \(\theta_1\) is the change from \((0,0)\) to \((1,0)\); \(\theta_2\) is the change from \((0,0)\) to \((0,1)\); and \(\theta_{12}\) captures how the joint-history mean differs from what the additive terms alone predict. Substituting the two regimes gives the following result.

Result: Under the saturated marginal mean model above, $$ \mu(1,1)-\mu(0,0)=\theta_1+\theta_2+\theta_{12}. $$ Derivation: At \((1,1)\), the model gives \(\theta_0+\theta_1+\theta_2+\theta_{12}\). At \((0,0)\), it gives \(\theta_0\). Subtracting cancels \(\theta_0\), leaving the stated sum. Thus, even in this simple model, the regime contrast is generally not a single treatment coefficient. If there is no interaction, \(\theta_{12}=0\), the contrast is still \(\theta_1+\theta_2\), not either coefficient alone. \(\square\)

Worked Example: Reading the Contrast From Model Coefficients

Suppose a marginal mean model is \(\mu(a_1,a_2)=50+4a_1+3a_2+2a_1a_2\). Calculate both regime means and the contrast.

For no treatment, \(\mu(0,0)=50+4(0)+3(0)+2(0)(0)=50\). For sustained treatment, \(\mu(1,1)=50+4+3+2=59\). Therefore the contrast is \(59-50=9\), which also equals \(4+3+2=9\).

The effect of changing visit 2 after visit 1 is untreated is \(\mu(0,1)-\mu(0,0)=53-50=3\). After visit 1 is treated, it is \(\mu(1,1)-\mu(1,0)=59-54=5\). The interaction term accounts for the difference. Reporting only the visit-2 coefficient, 3, would not report the sustained-treatment contrast.

Intermediate Covariates and Total Effects

A further distinction arises when an intermediate covariate \(L_1\) is affected by \(A_1\), predicts \(Y\), and also helps determine \(A_2\). Consider the following structural mean equations, with baseline covariates suppressed for simplicity:

$$ \begin{aligned} L_1(a_1)&=\alpha_0+\alpha_Aa_1+U_L,\\ Y(a_1,a_2)&=\beta_0+\beta_1a_1+\beta_2a_2+\beta_LL_1(a_1)+U_Y. \end{aligned} $$

Assume the error terms have finite expectations that do not change under the interventions, and that the equations correctly describe the relevant counterfactual means. The coefficient \(\beta_1\) describes the effect of \(A_1\) in the outcome equation holding \(L_1\) fixed. It does not include the change in outcome transmitted through \(L_1\). To obtain the regime contrast, substitute each intervention into both equations and take expectations.

Worked Example: Adding the Path Through an Intermediate Covariate

Suppose \(\alpha_A=2\), \(\beta_1=1\), \(\beta_2=3\), and \(\beta_L=0.5\). Calculate the sustained-treatment versus no-treatment contrast under the structural equations, assuming the error means are unchanged across regimes.

Under sustained treatment, \(L_1(1)=\alpha_0+2+U_L\), so \(E[Y(1,1)]=\beta_0+1+3+0.5(\alpha_0+2+E[U_L])+E[U_Y]\). Under no treatment, \(L_1(0)=\alpha_0+U_L\), so \(E[Y(0,0)]=\beta_0+0+0+0.5(\alpha_0+E[U_L])+E[U_Y]\).

Subtracting cancels the common terms. The remaining contrast is \(1+3+0.5(2)=5\). Equivalently, it is \(\beta_1+\beta_2+\beta_L\alpha_A=1+3+1=5\). The covariate pathway contributes 1 to the total contrast. The two treatment coefficients alone sum to 4, so they do not give the full regime contrast when the first treatment changes \(L_1\) and \(L_1\) affects the outcome.

When the Contrast Has a Causal Interpretation

A model-based calculation is a causal regime contrast only if the observed data identify the counterfactual means and the model is adequate for the calculation. For a two-visit setting, the key identification conditions can be stated briefly. Let \(L_0\) denote baseline covariates and \(L_1\) the measured covariates between treatment visits.

  • Consistency: a person's observed outcome equals \(Y(a_1,a_2)\) when that person's observed treatment history is \((a_1,a_2)\); the observed intermediate covariate under \(A_1=a_1\) equals \(L_1(a_1)\).
  • Sequential exchangeability: conditional on \(L_0\), first-visit treatment is unconfounded for the relevant counterfactuals; conditional on \(L_0,A_1,L_1\), second-visit treatment is unconfounded for the relevant counterfactual outcomes.
  • Positivity: each treatment level required by the regimes has positive probability for covariate histories that occur with positive probability under those regimes.
  • No interference: one person's treatment does not change another person's outcome, as required for the individual counterfactual contrast to represent the intervention of interest.

Under these assumptions and integrability of the outcome, the longitudinal g-formula identifies the regime mean:

$$ E[Y(a_1,a_2)] = \int E[Y\mid L_0=l_0,A_1=a_1,L_1=l_1,A_2=a_2]\, dF(l_1\mid L_0=l_0,A_1=a_1)\,dF(l_0). $$

The intermediate covariate is averaged over its distribution under the specified first treatment, not held fixed at a common value across regimes. This is why a conditional outcome coefficient adjusted for \(L_1\) need not equal the marginal regime contrast. The formula identifies a mean; estimating it well additionally requires suitable models or other valid estimation procedures, adequate data support, and an outcome scale appropriate to the stated contrast.

Derivation: Under consistency and the sequential exchangeability conditions, within each baseline stratum and first-treatment history, the observed conditional distribution of \(L_1\) and the observed conditional mean of \(Y\) at the specified second treatment represent their corresponding counterfactual quantities. Iterated expectation first averages the outcome mean over \(L_1\) under \(A_1=a_1\), then averages over the baseline distribution. This yields the displayed formula. Positivity ensures that the conditional quantities required by the formula are observed rather than extrapolated beyond treatment support. Subtracting the formula for \((0,0)\) from that for \((1,1)\) gives the identified regime contrast. \(\square\)

Common Pitfall, Diagnostics, and Limits

Common mistake: “The regression coefficient for \(A_2\) is 3, so the effect of sustained treatment is 3.” This reasoning treats a single conditional coefficient as though it compared the complete histories \((1,1)\) and \((0,0)\). It is wrong unless the model and estimand make that coefficient exactly equal to the desired contrast. In the saturated mean model, the contrast is \(\theta_1+\theta_2+\theta_{12}\); with an intermediate covariate, it can also include an indirect pathway such as \(\beta_L\alpha_A\). The correction is to calculate both regime means under the chosen model and subtract them.

Useful checks are to evaluate the model at \((0,0)\) and \((1,1)\) explicitly, verify the contrast using a path decomposition, and inspect whether interactions or treatment-induced covariates have been included appropriately. Also check whether the covariate histories required for each regime have treatment support. If the model omits interactions, misspecifies the outcome mean, or extrapolates into histories with little or no support, a numerically precise contrast may still be misleading.

A history-regression coefficient is useful for a conditional comparison specified by that regression. A marginal mean model directly parameterizes regime means and makes the target contrast explicit. Standardizing conditional predictions over the appropriate covariate distributions can also produce marginal regime means, provided the identification assumptions and models are adequate. These approaches answer different questions when coefficients are conditional, effects vary across histories, or covariates evolve under treatment. No algebraic rearrangement can repair unmeasured confounding, a positivity failure, or a poorly specified model.

Worked Example: Standardizing Across Baseline Groups

Suppose a population has two equally common baseline groups. In group 1, the mean outcome is 20 under \((0,0)\) and 22 under \((1,1)\). In group 2, the corresponding means are 30 and 36. Calculate the population regime contrast.

The no-treatment mean is \(0.5(20)+0.5(30)=25\). The sustained-treatment mean is \(0.5(22)+0.5(36)=29\). Thus the marginal contrast is \(29-25=4\).

The group-specific contrasts are \(22-20=2\) and \(36-30=6\). Their population-weighted average is \(0.5(2)+0.5(6)=4\), matching the difference of the standardized means. A coefficient that represents only one group's contrast would not generally equal this population-average regime contrast.

Check Your Understanding

Use the treatment-history means or models specified in each question. Solutions are included below.

  1. If \(\mu(0,0)=5\), \(\mu(1,0)=8\), and \(\mu(1,1)=12\), decompose the regime contrast along the path that changes visit 1 first.
  2. For \(\mu(a_1,a_2)=7+2a_1+4a_2-a_1a_2\), calculate the sustained-treatment versus no-treatment contrast.
  3. In the structural covariate model, suppose \(\alpha_A=3\), \(\beta_1=2\), \(\beta_2=1\), and \(\beta_L=2\). What is the regime contrast if error means are unchanged?
  4. In one sentence, explain why adjusting for an intermediate covariate can make an outcome-regression coefficient differ from the total regime contrast.

Solutions. 1. The contrast is \(12-5=7\). The first increment is \(8-5=3\); the second is \(12-8=4\); \(3+4=7\). 2. The no-treatment mean is 7 and the sustained-treatment mean is \(7+2+4-1=12\), so the contrast is 5. Equivalently, \(2+4-1=5\). 3. The contrast is \(\beta_1+\beta_2+\beta_L\alpha_A=2+1+(2)(3)=9\). 4. Conditioning on the intermediate covariate holds part of the pathway from earlier treatment to outcome fixed, so the conditional coefficient can omit that pathway even though it contributes to the total regime contrast.

Clinical Biostats