Tutorials › Causal Inference › Why Adjusting For Affected Confounders Can Bias Total Effects

Time-Varying Treatments and Confounding · Tutorial 689 of 972

Why Adjusting For Affected Confounders Can Bias Total Effects

See why adjusting for a treatment-affected confounder can help with later treatment comparisons yet remove part of an earlier treatment’s total effect.

Intermediate 11 min read

What You'll Learn

  • Identify when a time-varying covariate is both affected by prior treatment and a confounder of later treatment.
  • Trace how adjustment for that covariate can block part of an earlier treatment’s causal effect.
  • Distinguish a total effect from a conditional or controlled comparison.
  • Calculate total and adjusted contrasts in additive and binary-outcome examples.
  • Recognize when adjustment for a treatment-affected covariate is relevant to a later treatment effect.

Why the Adjustment Problem Arises

In a longitudinal study, treatment at one time can change a patient’s condition, and that condition can influence both later treatment and the outcome. For example, an initial therapy may change disease severity; severity may then guide a second treatment and also predict the final outcome. Severity is therefore relevant to the later treatment comparison. But because the first therapy can change severity, severity also lies on a causal route from the first therapy to the outcome.

This creates a genuine adjustment dilemma. Leaving severity uncontrolled may leave confounding when comparing patients who did and did not receive the later treatment. Controlling for severity can address that later-treatment confounding, but it also compares people at the same severity and so removes the part of the earlier treatment’s effect that operated by changing severity. The central lesson is not that adjustment is always wrong. It is that an adjustment appropriate for one causal contrast may not estimate a different contrast, such as the total effect of an earlier treatment strategy.

Definition: A treatment-affected confounder is a covariate measured after an earlier treatment that is affected by that treatment and is also a cause (or a proxy for causes) of a later treatment and the outcome. It can be a confounder of the later treatment–outcome relationship while also mediating part of the earlier treatment’s effect.

Use \(A_1\) for the first treatment, \(L_2\) for the covariate measured afterward, \(A_2\) for the later treatment, and \(Y\) for the final outcome. A simple causal structure includes \(A_1 \to L_2 \to Y\) and \(L_2 \to A_2 \to Y\), as well as possible direct paths from \(A_1\) to \(Y\). Since \(L_2\) precedes \(A_2\), it can help control confounding in a comparison of \(A_2\). Since \(A_1\) can change \(L_2\), conditioning on \(L_2\) can block the path \(A_1 \to L_2 \to Y\).

Which Causal Effect Is the Target?

A total effect compares outcomes under treatment strategies while allowing the covariates to take the values that would arise under each strategy. For example, \(Y^{1,1}\) denotes the outcome under a strategy setting both treatments to 1, and \(Y^{0,0}\) the outcome under a strategy setting both to 0. Their population mean difference is a total effect of those strategies: it includes every causal route through which the strategies affect the outcome, including routes through \(L_2\).

$$ \text{Total effect} = E[Y^{1,1}] - E[Y^{0,0}] $$

By contrast, a comparison that holds \(L_2\) fixed asks what the outcome difference would be if treatment changed while the covariate were set to the same value. This is a conditional or controlled comparison, not generally the total effect. In a regression, including \(L_2\) asks the model to compare observations with the same measured \(L_2\), rather than retaining the differences in \(L_2\) created by earlier treatment.

The distinction matters even if the regression is correctly fitted and all relevant confounding is controlled. A model can estimate a conditional association accurately while answering the wrong question for a total-effect target. The issue is not a defect in regression arithmetic; it is a mismatch between the adjustment set and the causal contrast being sought.

A Short Derivation: The Mediated Part Is Removed

Consider a simple additive structural model for the covariate and outcome, with later treatment held fixed at \(a_2\):

$$ L_2 = \alpha_0 + \alpha_1 A_1 + \varepsilon_L, \qquad Y = \beta_0 + \beta_1 A_1 + \beta_2 L_2 + \beta_3 a_2 + \varepsilon_Y. $$

Suppose the conditional means of the errors are zero under the interventions being compared, the equations are correctly specified, and there are no treatment–covariate interactions. Changing \(A_1\) from 0 to 1 changes the mean of \(L_2\) by \(\alpha_1\). Substituting the covariate equation into the outcome equation gives:

$$ Y = \beta_0 + \beta_1 A_1 + \beta_2(\alpha_0+\alpha_1 A_1+\varepsilon_L) + \beta_3 a_2+\varepsilon_Y. $$

Taking the mean difference between interventions \(A_1=1\) and \(A_1=0\), with \(A_2=a_2\) in both, yields:

$$ E[Y^{1,a_2}] - E[Y^{0,a_2}] = \beta_1 + \beta_2\alpha_1. $$

The term \(\beta_1\) is the contrast for changing \(A_1\) while holding \(L_2\) fixed. The term \(\beta_2\alpha_1\) is the change in outcome transmitted through the change in \(L_2\). Thus a regression coefficient for \(A_1\) that conditions on \(L_2\) captures the first term in this model, not their sum. This derivation concerns the pathway through \(L_2\); if the later treatment also changes under the strategies being compared, further causal routes may contribute to the total effect.

Worked Examples

Worked Example: An Additive Model With a Treatment-Affected Covariate

Suppose hypothetical data follow the equations

$$ L_2 = 1 + 2A_1 + \varepsilon_L, \qquad Y = 5 + 3A_1 + 4L_2 + 2A_2 + \varepsilon_Y. $$

Assume the errors have mean zero under the treatment strategies, the model is additive with no interactions, and treatment assignment is unconfounded for the contrasts considered. To isolate the effect of the first treatment, compare \(A_1=1\) with \(A_1=0\) while setting \(A_2=0\) in both strategies. The mean of \(L_2\) is 3 when \(A_1=1\), and 1 when \(A_1=0\):

$$ E[L_2\mid do(A_1=1)] = 1+2(1)=3, \qquad E[L_2\mid do(A_1=0)] = 1+2(0)=1. $$

The expected outcomes under the two strategies are therefore:

$$ E[Y^{1,0}] = 5+3(1)+4(3)+2(0)=20, \qquad E[Y^{0,0}] = 5+3(0)+4(1)+2(0)=9. $$

The total effect is \(20-9=11\) outcome units. If instead \(L_2\) is held fixed, the \(A_1\) term in the outcome equation gives a contrast of 3 outcome units. The other 8 units are the mediated contribution: \(4 \times (3-1)=8\). Adjusting for \(L_2\) removes that contribution from the comparison. If larger \(Y\) is worse, the total strategy effect is an 11-unit increase in the outcome, whereas the fixed-\(L_2\) contrast is a 3-unit increase.

The calculation illustrates the adjustment issue, not a guarantee that an observed regression coefficient has a causal interpretation. That interpretation also requires suitable control of confounding and adequate data for the treatment comparisons.

Worked Example: A Binary Covariate and Outcome

Consider a hypothetical setting in which \(L_2\) is a binary severity indicator and \(Y\) is an adverse outcome. Suppose the probability of severe status under the first treatment is 0.80, compared with 0.20 without it. For this example, later treatment is set to 0 in both strategies. Assume the following outcome-risk model is correct under intervention:

$$ P(Y=1\mid do(A_1=a_1,L_2=l),do(A_2=0)) =0.10+0.20a_1+0.30l. $$

The risks in the four relevant combinations are 0.10 for \(A_1=0,L_2=0\), 0.40 for \(A_1=0,L_2=1\), 0.30 for \(A_1=1,L_2=0\), and 0.60 for \(A_1=1,L_2=1\). Averaging over the severity distribution that each first-treatment strategy produces gives:

$$ P(Y^{1,0}=1)=0.20(0.30)+0.80(0.60)=0.54, $$
$$ P(Y^{0,0}=1)=0.80(0.10)+0.20(0.40)=0.16. $$

The total risk difference is \(0.54-0.16=0.38\), or 38 percentage points. By contrast, comparing the two treatments at the same value of \(L_2\) gives a risk difference of \(0.20\) in either severity stratum. That conditional contrast omits the additional \(0.30(0.80-0.20)=0.18\) risk difference transmitted through the treatment-induced change in severity. The total is \(0.20+0.18=0.38\).

This example assumes the stated risks and severity distributions represent the relevant intervention-specific quantities. In observed data, estimating them causally requires appropriate exchangeability, consistency, and positivity conditions. The arithmetic shows why averaging over each strategy’s own covariate distribution differs from comparing at a common covariate value.

Worked Example: Adjustment Can Be Useful for the Later Treatment

Now focus on the later treatment, \(A_2\), rather than the total effect of \(A_1\). In a hypothetical population, suppose outcome risks within levels of \(L_2\) are as follows. Assume that within each severity stratum there is no unmeasured confounding of \(A_2\) and \(Y\), and that both treatment options occur in each stratum.

Severity \(L_2\)Later treatment \(A_2\)Number of peopleAdverse outcomesRisk
1180480.60
1020100.50
012040.20
008080.10

The crude risk among those treated later is \((48+4)/(80+20)=0.52\). Among those not treated, it is \((10+8)/(20+80)=0.18\). The crude risk difference is \(0.52-0.18=0.34\). But severity is distributed very differently between the treatment groups, and it predicts the outcome.

For a target population with equal proportions at each severity level, standardize the risks using weights of 0.50 and 0.50. The treatment risk is \(0.50(0.60)+0.50(0.20)=0.40\). The no-treatment risk is \(0.50(0.50)+0.50(0.10)=0.30\). The standardized risk difference is \(0.40-0.30=0.10\), or 10 percentage points. Here, adjustment for \(L_2\) is useful for the later-treatment comparison under the stated assumptions.

That does not mean the same adjustment estimates the total effect of \(A_1\). If \(A_1\) changed the distribution of severity, a comparison that conditions on severity would not retain the earlier treatment’s effect through that change. Whether adjustment is appropriate depends on the treatment contrast and target effect, not on a rule that every prognostic covariate should always be included.

Assumptions and Interpretation

The examples separate a structural reason for bias from the assumptions needed to learn causal effects from observed data. The structural reason is the blocked pathway: if treatment changes \(L_2\), and \(L_2\) changes \(Y\), holding \(L_2\) fixed removes that route from an earlier-treatment comparison. A causal interpretation of observed comparisons additionally requires, among other conditions, that the relevant treatment groups be comparable after accounting for measured history, that treatment strategies be well-defined and consistent with observed treatment, and that there be a positive chance of each treatment being observed for histories included in the comparison.

These conditions do not make a conditional contrast equal to a total effect. They support interpretation of the contrast that was actually defined. For a total effect, the comparison must preserve the treatment-induced covariate distributions that are part of the causal process. For a later-treatment effect, adjustment for pre-treatment \(L_2\) can be needed because \(L_2\) helps explain why later treatment was assigned and also predicts the outcome. Those are different estimands with different roles for the same variable.

Common Mistake

Wrong reasoning: “Severity predicts the outcome and influences the second treatment, so I should adjust for it in every model; then the treatment coefficient is the total effect.”

Correction: Severity’s role depends on which treatment effect is being estimated. It may need to be controlled to compare later treatment options fairly. But if earlier treatment changed severity, controlling for severity removes the part of the earlier treatment’s total effect that passes through severity. State the target contrast first, then interpret an adjusted coefficient as conditional unless the model and estimand justify a total-effect interpretation.

Key takeaway: A covariate affected by earlier treatment can be both a confounder for later treatment and a mediator of earlier treatment. Adjusting for it can address one comparison while excluding part of another treatment’s total effect.

Check Your Understanding

Answer these questions by identifying the treatment contrast and the causal role of the covariate.

  1. A first treatment changes a biomarker, which predicts the outcome and guides a second treatment. Why can the biomarker be a confounder for the second treatment but a mediator of the first treatment?
  2. In the additive model, let \(\alpha_1=1.5\) and \(\beta_2=2\). How much of the first treatment’s effect is transmitted through \(L_2\), under the model assumptions?
  3. Why does a regression comparison holding \(L_2\) fixed generally differ from a total-effect comparison that allows \(L_2\) to respond to treatment?
  4. In the binary example, what was the total risk difference, and what was the fixed-severity risk difference?
  5. Under what kind of target question can adjustment for a treatment-affected covariate be useful rather than inappropriate?
Clinical Biostats