Tutorials › Causal Inference › Lagged Outcomes As Time-Varying Confounders

Time-Varying Treatments and Confounding · Tutorial 697 of 972

Lagged Outcomes As Time-Varying Confounders

Identify when a lagged outcome is relevant to a later treatment effect, and distinguish ordinary confounding from confounding created by earlier treatment.

Intermediate 10 min read

What You'll Learn

  • Define a lagged outcome relative to a later treatment decision
  • Distinguish prognostic prediction from causal relevance to treatment assignment and potential outcomes
  • Recognize how earlier treatment can affect a lagged outcome that then confounds a later treatment effect
  • Read treatment and outcome patterns within levels of a prior outcome
  • Explain why a covariate may be a confounder for one treatment effect but not another
  • Identify when a prior outcome is prognostic but not a confounder

Why a Previous Outcome Can Matter at the Next Treatment Decision

In longitudinal studies, an outcome measured at one visit may also inform treatment at the next visit. A clinician may change a dose after a patient’s symptoms worsen; a worsening symptom measure may also indicate greater risk of a later adverse outcome. The measurement is then more than a record of what happened earlier: it may be relevant to the comparison of later treatment options.

The timing is essential. The outcome measurement must occur before the later treatment decision to be a candidate confounder of that treatment’s effect. But timing and prediction do not settle the causal question. A measurement may forecast later treatment or outcome without being causally relevant to their relationship. The causal structure and the prior history being considered determine whether it is a confounder.

Definition: Let \(A_0\) denote an earlier treatment, \(Y_1\) an outcome measured after \(A_0\) but before a later treatment decision \(A_1\), and \(Y_2\) a subsequent outcome. Relative to \(A_1\), \(Y_1\) is a lagged outcome. It is a confounder for the effect of \(A_1\) on \(Y_2\) when, given the relevant past history, it is causally relevant to treatment assignment and to the potential outcomes for \(Y_2\). If \(A_0\) also affects \(Y_1\), then \(Y_1\) is a treatment-affected time-varying confounder, a setting that creates treatment-confounder feedback. Being affected by \(A_0\) is not required for \(Y_1\) to confound the later treatment effect.

Here, “causally relevant to treatment assignment” means that the measurement helps determine which treatment is given, not merely that it happens to be statistically associated with treatment. Similarly, being prognostic for \(Y_2\) is not, by itself, sufficient for confounding. The relevant question is whether the causal structure makes \(Y_1\) relevant to both the later treatment assignment and the potential outcomes under that treatment, after accounting for the past history under consideration.

A Causal Map for the Feedback Case

A common structure is \(A_0 \rightarrow Y_1 \rightarrow A_1 \rightarrow Y_2\), with an additional arrow \(Y_1 \rightarrow Y_2\). The first arrow represents an effect of earlier treatment on the lagged outcome. The arrow from \(Y_1\) to \(A_1\) represents treatment decisions responding to that outcome. The arrow from \(Y_1\) to \(Y_2\) represents a causal contribution of the earlier outcome to the later one.

In this structure, the path \(A_1 \leftarrow Y_1 \rightarrow Y_2\) links later treatment and later outcome through a pre-treatment common cause. Comparing people given different values of \(A_1\) without accounting for \(Y_1\) can therefore mix the effect of treatment with differences in their earlier outcome. In contrast, \(Y_1\) is not a confounder for \(A_1\) merely because it predicts \(Y_2\): it must also be relevant to treatment assignment in the causal structure.

The role of \(Y_1\) depends on which treatment effect is being studied. It may be a confounder for the effect of \(A_1\) and, at the same time, lie on a pathway from \(A_0\) to \(Y_2\). Therefore, its role in a later-treatment comparison does not automatically make it an appropriate adjustment variable for estimating the total effect of the earlier treatment. The treatment and outcome whose causal effect is the target must always be specified.

Worked Example: Severity Guides Treatment and Predicts the Endpoint

Consider a hypothetical cohort of 200 patients. Each receives an earlier treatment \(A_0\), has disease severity measured as high or low at the next visit (\(Y_1\)), then receives a later treatment \(A_1\). The endpoint \(Y_2\) is whether the disease worsens by the following visit. Suppose the clinical mechanism is that \(A_0\) can change severity, clinicians use severity when choosing \(A_1\), and severity itself causally affects later worsening.

The hypothetical data show that severity is high for 30 of 100 patients with \(A_0=0\), and for 70 of 100 patients with \(A_0=1\). Thus the high-severity proportions are \(30/100=0.30\) and \(70/100=0.70\), respectively. Under the stated mechanism, earlier treatment affects the distribution of \(Y_1\).

Across the cohort, the treatment and endpoint counts by severity are as follows:

Severity \(Y_1\)\(A_1=1\), totalWorsened with \(A_1=1\)\(A_1=0\), totalWorsened with \(A_1=0\)
High80202010
Low202808

Among high-severity patients, the observed worsening risks are \(20/80=0.25\) with \(A_1=1\) and \(10/20=0.50\) with \(A_1=0\). Among low-severity patients, they are \(2/20=0.10\) and \(8/80=0.10\). The pooled risks are \(22/100=0.22\) for \(A_1=1\) and \(18/100=0.18\) for \(A_1=0\). Thus the crude comparison makes treatment appear associated with a 0.04 higher risk, while the within-severity comparisons show a lower observed risk in the high-severity group and equal risks in the low-severity group.

This pattern illustrates why the severity measurement matters: it guides later treatment and, under the stated causal mechanism, affects later outcomes. The crude contrast compares treatment groups with different severity distributions. The calculations alone do not prove that \(A_1\) caused the differences; causal interpretation would require appropriate control of other relevant causes and assumptions about the treatment comparison. Because \(A_0\) also affects \(Y_1\), this is the feedback case: earlier treatment changes a variable that confounds the later treatment effect.

Prediction Is a Clue, Not a Causal Definition

In practice, researchers often first notice that a lagged outcome predicts subsequent treatment, future outcomes, or both. Such patterns can help identify measurements worth investigating. They do not establish the causal arrows. For example, a third variable could cause both the measured outcome and the later endpoint, or a clinical decision rule could use another variable that is associated with the outcome measurement. The causal interpretation therefore depends on subject-matter knowledge and the timing and structure of the measurements, not on predictive performance alone.

Potential outcomes make the distinction precise. Write \(Y_2(a_0,a_1)\) for the endpoint that would be observed under the treatment sequence \(a_0,a_1\). A lagged outcome is relevant to confounding of the \(A_1\) effect when, after accounting for the past history, it is relevant both to which \(A_1\) is received and to the potential outcomes being compared. A predictive association between \(Y_1\) and observed \(Y_2\) does not itself show that \(Y_1\) causally affects those potential outcomes. Nor does an association between \(Y_1\) and \(A_1\) by itself establish that clinicians’ decisions are causally responding to \(Y_1\).

Worked Example: A Lagged Outcome Confounds Without Being Treatment-Affected

Suppose a hypothetical study records a symptom score \(Y_1\) before a second treatment decision \(A_1\). In this setting, the earlier treatment \(A_0\) has no causal effect on the symptom score. However, the symptom score itself influences the later treatment decision and causally affects the risk of the later endpoint \(Y_2\). Among 200 patients, 80 have high symptoms and 120 have low symptoms.

Suppose 60 of the 80 high-symptom patients receive \(A_1=1\), while 20 of the 120 low-symptom patients receive \(A_1=1\). The treatment proportions are \(60/80=0.75\) in the high-symptom group and \(20/120=0.167\) in the low-symptom group. The score is therefore strongly related to later treatment assignment in this hypothetical mechanism.

Suppose the endpoint occurs in 32 of the 80 high-symptom patients and 6 of the 120 low-symptom patients. The risks are \(32/80=0.40\) and \(6/120=0.05\), respectively. Under the stated causal mechanism, symptom severity is also relevant to potential outcomes for \(Y_2\). It is therefore a confounder candidate for the effect of \(A_1\), even though \(A_0\) does not affect it. It is not a treatment-affected confounder in this example, because the earlier treatment does not cause \(Y_1\).

The arithmetic establishes different observed distributions of treatment and endpoint across symptom groups; it does not establish the causal mechanism. The example’s causal conclusion follows from its explicitly stated assumptions that symptoms affect treatment choice and future outcomes. Without those assumptions, the same observed associations would not be enough to classify the score as a confounder.

When a Lagged Outcome Is Only Prognostic

A variable that predicts a future outcome is often called prognostic. Prognostic information can be valuable for prediction and may sometimes improve precision in an analysis. But prognosis alone does not make a variable a confounder of a particular treatment effect. If treatment assignment does not depend on the variable, directly or through a relevant causal pathway, then it does not create the treatment-outcome imbalance that defines confounding in that comparison.

Worked Example: A Prognostic Outcome That Does Not Confound

In a hypothetical study, a prior measurement \(Y_1\) classifies 100 patients as high and 100 as low. A randomized procedure assigns exactly 50 patients in each group to \(A_1=1\) and 50 to \(A_1=0\). The endpoint occurs in 30 high-measurement patients and 5 low-measurement patients. Thus the observed endpoint risks are \(30/100=0.30\) and \(5/100=0.05\).

The measurement is prognostic: it marks groups with different endpoint risks. But randomization means treatment assignment does not depend on \(Y_1\). Under this design, \(Y_1\) is not a confounder of the effect of \(A_1\), despite its strong association with the endpoint. It may still be useful for describing risk or for a suitably specified precision-improving analysis, but that is a different reason to include it.

The defining distinction is not whether \(Y_1\) predicts \(Y_2\); it is whether the causal structure makes \(Y_1\) relevant to both assignment of \(A_1\) and the potential outcomes for \(Y_2\). This example states randomization explicitly because equal treatment counts alone would not prove that assignment was independent of the measurement.

A Practical Causal Check

For each outcome measured before a treatment decision, ask what role it has for that decision and for the outcome whose effect is being studied. A concise way to keep the reasoning organized is to state the time order, target treatment effect, and causal claims separately.

1
Place the measurement in time.
Confirm that \(Y_1\) is measured after the earlier history and before \(A_1\). A measurement made after \(A_1\) cannot be a pre-treatment confounder of that treatment decision.
2
Specify the target comparison.
Name the later treatment \(A_1\) and endpoint \(Y_2\). The same \(Y_1\) can have different roles for different treatment effects.
3
Assess causal relevance to assignment and outcomes.
Ask whether \(Y_1\) helps determine \(A_1\) and whether it is causally relevant to the potential outcomes for \(Y_2\), given the relevant past history. Do not substitute predictive association for either causal assessment.
4
Check whether earlier treatment affects the measurement.
If \(A_0\) causes or changes \(Y_1\), then \(Y_1\) is treatment-affected and the setting has feedback. If not, it may still confound the later treatment effect, but it is not treatment-affected by \(A_0\).

Common Mistake

A frequent error is to define every time-varying confounder as a variable affected by prior treatment. That condition describes an important subtype, not all confounders. A prior outcome can confound a later treatment effect even if the earlier treatment did not change it. The reverse error is also common: a researcher sees that an outcome predicts both treatment and endpoint and concludes it must be a confounder. Prediction is evidence to investigate, not proof of the causal relationships. State which causal links are assumed or supported, and distinguish treatment-affected confounding from ordinary confounding.

Key takeaway: A lagged outcome is a confounder for a later treatment effect when it is causally relevant to both later treatment assignment and the corresponding potential outcomes, given the past history under consideration. Prior treatment affecting that outcome makes it a treatment-affected confounder and creates feedback; it is not a requirement for confounding in general.

Check Your Understanding

For each question, distinguish what follows from timing or prediction from what requires a causal assumption.

  1. Why must \(Y_1\) be measured before \(A_1\) to be a confounder of the effect of \(A_1\) on \(Y_2\)?
  2. A lagged outcome predicts \(Y_2\), but treatment is randomized independently of it. Is it a confounder of the treatment effect? Explain.
  3. If \(A_0\) does not affect \(Y_1\), can \(Y_1\) still confound the effect of \(A_1\)? State the relevant conditions.
  4. What additional feature makes a confounder a treatment-affected time-varying confounder in the sequence \(A_0,Y_1,A_1,Y_2\)?
  5. Why do associations of \(Y_1\) with both \(A_1\) and \(Y_2\) fail, on their own, to prove that \(Y_1\) is a confounder?
Clinical Biostats