Tutorials › Marginal Structural Models › Treatment-Confounder Feedback as a Directed Acyclic Graph

Causal Diagrams for Longitudinal Data · Tutorial 67 of 501

Treatment-Confounder Feedback as a Directed Acyclic Graph

Learn to represent treatment-confounder feedback in a time-ordered DAG and derive how a treatment-outcome association can differ from the causal effect.

Intermediate 12 min read

What You'll Learn

  • Draw the longitudinal DAG with an arrow from the later covariate \(L_2\) to both \(A_2\) and \(Y\).
  • Explain how \(A_1\) can change the distribution of \(L_2\), which in turn predicts later treatment and outcome.
  • Check that the proposed arrows respect temporal order and that the graph is acyclic.
  • Derive the difference between a marginal treatment-outcome contrast and a causal effect in an additive outcome model.
  • Recognize why omitting the \(L_2 \to Y\) arrow can misrepresent the study’s causal assumptions.

Why Treatment-Confounder Feedback Needs a Longitudinal Graph

In a longitudinal study, an earlier treatment can change a covariate measured later, and that covariate can influence both subsequent treatment and the outcome. A graph with only baseline covariates cannot show this sequence. A useful minimal representation is \(A_1 \to L_2 \to A_2 \to Y\), augmented by \(L_2 \to Y\). The additional arrow matters: it represents the possibility that \(L_2\) affects the outcome apart from its effect through \(A_2\).

Here \(A_1\) is treatment at the first time point, \(L_2\) is a covariate measured after \(A_1\) and before the next treatment, \(A_2\) is treatment at the second time point, and \(Y\) is the outcome. The arrows describe hypothesized direct causal effects, not merely chronological order or observed association. The graph is a compact summary of those assumptions; it does not establish them from data.

Definition: In this tutorial, the treatment-confounder feedback graph has nodes \(A_1,L_2,A_2,Y\) and directed edges \(A_1 \to L_2\), \(L_2 \to A_2\), \(L_2 \to Y\), and \(A_2 \to Y\). The feedback is longitudinal: \(A_1\) affects a later covariate \(L_2\), and \(L_2\) affects the later treatment-outcome process. In this graph, \(L_2\) is a common cause of \(A_2\) and \(Y\), while also being affected by the earlier treatment.

The phrase “feedback” does not mean that an arrow points backward in time. It names a sequence in which treatment changes a later covariate, and the changed covariate then helps determine subsequent treatment. A measured variable may also predict an outcome without being a cause of it; an arrow in this graph is a causal assumption. Use the study’s scientific knowledge to decide whether each proposed arrow is appropriate.

Drawing and Checking the Minimal DAG

Start with the timeline, then place the variables at the time they are measured. Draw \(A_1 \to L_2\) when earlier treatment can affect the later covariate. Draw \(L_2 \to A_2\) when the covariate can affect subsequent treatment, and \(L_2 \to Y\) when it can affect the outcome. Finally, include \(A_2 \to Y\) when later treatment can affect the outcome. The resulting edge list is

$$ A_1 \to L_2,\qquad L_2 \to A_2,\qquad L_2 \to Y,\qquad A_2 \to Y. $$

Thus the main chain is \(A_1 \to L_2 \to A_2 \to Y\), with an additional direct arrow \(L_2 \to Y\). This is a minimal graph for the specified feedback structure, not a claim that these are the only plausible causes in every study. Baseline variables, direct effects of \(A_1\), or unmeasured causes may need additional nodes and arrows in a real application.

Result: If every arrow in a longitudinal graph goes from an earlier measurement time to a later one, the graph is acyclic. To see why, assign each node its measurement time. Following any directed path strictly increases time at every edge. A directed cycle would have to return to its starting time, contradicting this strict increase. In the graph above, the order \(A_1,L_2,A_2,Y\) therefore rules out a directed cycle. This check assumes that the stated measurement times are well defined and that no arrow connects a variable to itself at the same time.

Worked Example: Translating a Study Timeline Into the Feedback Graph

Suppose patients receive an initial treatment \(A_1\). At a later visit, clinicians measure disease severity \(L_2\). Severity influences whether a second treatment \(A_2\) is given, and it can also influence the eventual outcome \(Y\). The second treatment may affect that outcome.

Step 1: Order the variables. The study measures \(A_1\), then \(L_2\), then \(A_2\), then \(Y\). This gives the temporal order needed for drawing the graph.

Step 2: Add arrows for the stated causal assumptions. If initial treatment can change later severity, draw \(A_1 \to L_2\). If severity affects the second-treatment decision and the outcome, draw both \(L_2 \to A_2\) and \(L_2 \to Y\). If the second treatment can affect the outcome, draw \(A_2 \to Y\).

Step 3: Check what the graph says. The graph represents that initial treatment may change the later severity distribution, while severity may affect both subsequent treatment and outcome. It does not imply that every patient’s severity increases after treatment, or that treatment must change severity in every individual. It records a causal possibility at the population level, not a deterministic rule.

Step 4: Check the timing. Each arrow goes forward in the stated order, so no directed cycle is present. If severity were actually measured after the second-treatment decision, the proposed \(L_2 \to A_2\) arrow would conflict with the recorded order and the timeline would need clarification.

How the Graph Can Produce a Misleading Marginal Contrast

The graph alone does not give a numerical bias. A model is needed to calculate one. The following result uses a simple additive conditional mean model to show exactly how an association between \(A_2\) and \(Y\) can differ from the effect of setting \(A_2\). Assume \(A_2\) is binary and

$$ E[Y \mid A_2,L_2]=\beta_0+\beta_A A_2+\beta_L L_2. $$

Assume this conditional mean is correctly specified, and that the structural outcome equation has mean-zero error under interventions on \(A_2\). Also assume this equation contains no direct \(A_1\) term. These assumptions are for the calculation, not consequences of the DAG.

Derived result: Provided \(P(A_2=a)>0\) for \(a=0,1\) and the relevant expectations are finite, the marginal observed mean difference is
$$ E[Y \mid A_2=1]-E[Y \mid A_2=0] = \beta_A+\beta_L\{E[L_2 \mid A_2=1]-E[L_2 \mid A_2=0]\}. $$

By contrast, under the stated structural outcome model, setting \(A_2=1\) rather than \(A_2=0\), while holding the same \(L_2\) fixed, changes the conditional mean outcome by \(\beta_A\). The extra term in the marginal comparison arises because the groups receiving different values of \(A_2\) can have different distributions of \(L_2\).

Derivation. By the law of iterated expectation and the assumed conditional mean model,

$$ E[Y \mid A_2=a] =E\{E[Y \mid A_2=a,L_2]\mid A_2=a\} =\beta_0+\beta_A a+\beta_L E[L_2\mid A_2=a]. $$

Subtract the expression for \(a=0\) from the expression for \(a=1\). The \(\beta_0\) terms cancel, leaving the displayed marginal contrast. In the structural equation, holding \(L_2=l\) fixed gives means \(\beta_0+\beta_A+\beta_L l\) under \(A_2=1\) and \(\beta_0+\beta_L l\) under \(A_2=0\); their difference is \(\beta_A\). This proves the result under the stated assumptions. \(\square\)

Worked Example: Calculating the Marginal Contrast

Let \(A_1\) be Bernoulli with probability \(0.5\). Suppose

$$ P(L_2=1\mid A_1=1)=0.8,\qquad P(L_2=1\mid A_1=0)=0.2, $$

and

$$ P(A_2=1\mid L_2=1)=0.7,\qquad P(A_2=1\mid L_2=0)=0.1. $$

Let \(Y\) be binary, with outcome risk

$$ P(Y=1\mid A_2,L_2)=0.05+0.30A_2+0.40L_2. $$

These risks range from \(0.05\) to \(0.75\), so they are valid probabilities. First calculate the marginal distribution of \(L_2\):

$$ P(L_2=1)=0.5(0.8)+0.5(0.2)=0.5. $$

Then \(P(A_2=1)=0.5(0.7)+0.5(0.1)=0.4\). The joint probability \(P(L_2=1,A_2=1)=0.5(0.7)=0.35\), so

$$ P(L_2=1\mid A_2=1)=0.35/0.4=0.875. $$

Similarly, \(P(L_2=1,A_2=0)=0.5(0.3)=0.15\), and \(P(A_2=0)=0.6\), giving \(P(L_2=1\mid A_2=0)=0.15/0.6=0.25\). Therefore,

$$ E[Y\mid A_2=1]=0.05+0.30+0.40(0.875)=0.70, $$
$$ E[Y\mid A_2=0]=0.05+0.40(0.25)=0.15. $$

The observed marginal difference is \(0.70-0.15=0.55\). The structural effect of setting \(A_2\) from 0 to 1 at fixed \(L_2\) is \(0.30\), since the \(0.30A_2\) term changes by \(0.30\). The difference between these quantities is \(0.25\), which agrees with

$$ 0.40\{0.875-0.25\}=0.25. $$

Here the graph’s \(L_2 \to A_2\) and \(L_2 \to Y\) arrows correspond to a substantial difference in severity between the observed treatment groups. The arithmetic illustrates how that difference can enlarge the marginal contrast beyond the model’s treatment effect.

Why the \(L_2 \to Y\) Arrow Must Be Considered

A chain \(A_1 \to L_2 \to A_2 \to Y\) alone says that \(L_2\) affects \(Y\) only through \(A_2\). That is a stronger assumption than the feedback setup in this tutorial. If \(L_2\) can also affect the outcome directly, the graph must include \(L_2 \to Y\). The next example shows that this is a substantive modeling choice, not a decorative addition.

Worked Example: Comparing Two Outcome Assumptions

Keep the same treatment and covariate process as in the preceding example. Compare two possible outcome models. In Model I, let

$$ P(Y=1\mid A_2,L_2)=0.10+0.40A_2. $$

At fixed \(A_2\), changing \(L_2\) does not change the outcome risk, so this model does not include a causal \(L_2 \to Y\) effect. In Model II, let

$$ P(Y=1\mid A_2,L_2)=0.10+0.20A_2+0.40L_2. $$

This model does include such an effect. Its risks range from \(0.10\) to \(0.70\), so they are valid probabilities. At \(A_2=0\), Model I gives risk \(0.10\) for either value of \(L_2\). Model II gives risk \(0.10\) when \(L_2=0\) and \(0.50\) when \(L_2=1\). Thus the models make different predictions even when later treatment is held fixed.

The given treatment process makes \(L_2\) associated with \(A_2\): as calculated above, \(P(L_2=1\mid A_2=1)=0.875\), while \(P(L_2=1\mid A_2=0)=0.25\). Under Model I, this difference in \(L_2\) does not contribute an outcome-mean difference through a direct effect of \(L_2\). Under Model II, it does. If the scientific knowledge supports an effect of severity on outcome apart from the second treatment, the graph should include \(L_2 \to Y\); omitting it would encode a different model.

Diagnostics, Alternatives, and Limits

A DAG is an explicit record of causal assumptions, not a diagnostic test that certifies them. Still, several checks can reveal a graph that is internally inconsistent or poorly matched to the study:

  • Check measurement order. Confirm that \(L_2\) is measured before the decision represented by \(A_2\). If not, the proposed \(L_2 \to A_2\) arrow may reverse the actual order or conceal a more complicated process.
  • Check each arrow’s meaning. Ask whether the claim is causal or merely predictive. Prediction alone does not justify a causal arrow.
  • Check the omitted causes. If baseline factors, direct effects, or unmeasured causes are important, the four-node graph is incomplete. Add the relevant nodes and arrows rather than treating the minimal graph as exhaustive.
  • Check the outcome model separately. The graph does not guarantee the additive conditional mean used in the derivation. Nonlinearity, effect modification, or a different outcome distribution changes the numerical calculation.
  • Check support and data quality. If some relevant treatment-covariate histories are absent or poorly measured, a graph cannot supply the missing information. Empirical treatment frequencies and covariate measurement should be inspected alongside the causal assumptions.

A timeline is useful for establishing temporal order but does not display causal assumptions. A static graph containing only baseline covariates can omit the way earlier treatment changes later covariates. A regression comparison may summarize observed outcomes, but by itself it does not communicate which causal arrows are assumed; the calculation above shows why an unadjusted marginal contrast need not equal a treatment effect. The graph is therefore a design and reasoning aid, not a substitute for an identification argument or an estimation method.

The minimal graph has important limits. It does not prove that all common causes were measured, establish that the arrows are correct, or determine whether a causal effect is identifiable from the observed data. Nor does it specify how to estimate an effect when a treatment-affected covariate also predicts later treatment and outcome. Those questions require additional assumptions and methods. The graph’s immediate contribution is narrower and essential: it makes the feedback structure visible so that subsequent reasoning does not silently treat \(L_2\) as an ordinary baseline covariate.

Common pitfall: It is tempting to adjust for \(L_2\) as though it were a baseline covariate because it predicts \(A_2\) and \(Y\). But \(L_2\) occurs after \(A_1\) and may itself be affected by \(A_1\). Ignoring that timing erases the feedback structure. The correction is to draw the time-ordered graph first, including \(A_1 \to L_2\), \(L_2 \to A_2\), and \(L_2 \to Y\), and then assess an estimation strategy under the assumptions of the particular problem.

Check Your Understanding

Answer each question using the graph and assumptions developed above. Short solutions follow.

  1. In the minimal graph, which two arrows make \(L_2\) a common cause of later treatment and outcome?
  2. Why is \(A_1 \to L_2 \to A_2 \to Y\) not by itself the full graph when \(L_2\) can affect \(Y\) apart from \(A_2\)?
  3. Under the additive conditional mean model, what is the marginal difference if \(\beta_A=0.2\), \(\beta_L=0.5\), and \(E[L_2\mid A_2=1]-E[L_2\mid A_2=0]=0.4\)?
  4. Suppose \(L_2\) is measured after the \(A_2\) decision. What should be checked before drawing \(L_2 \to A_2\)?

Solutions. (1) The arrows are \(L_2 \to A_2\) and \(L_2 \to Y\). (2) The chain asserts only the route from \(L_2\) to \(Y\) through \(A_2\); an additional \(L_2 \to Y\) arrow is needed to represent a direct effect. (3) The marginal difference is \(0.2+0.5(0.4)=0.4\). (4) Check the actual measurement and treatment-decision timeline. A variable measured after the decision cannot straightforwardly be treated as its cause; the timing or causal story must be clarified.

Clinical Biostats