Why Covariate Adjustment Needs a Timeline
In longitudinal studies, information accumulates while treatment decisions are being made. A severity score recorded before treatment may help explain why treatment was started. A later score may partly reflect that treatment, yet also help determine the next treatment decision. Treating both scores as interchangeable “confounders” can change the causal question or introduce bias.
The central error is not simply including too many or too few variables. It is adjusting without first asking when each variable was measured, which treatment decision it could precede, and how prior treatment may have affected it. A regression can compute a coefficient even when its adjustment set does not support the intended causal interpretation.
A total effect of an initial treatment includes all pathways through which that treatment changes the outcome, including pathways through later covariates and later treatment. A regression coefficient adjusted for a treatment-affected covariate generally does not automatically equal that total effect. Depending on the causal structure, adjustment can block part of the effect, induce bias, or do both.
Error 1: Adjusting for Every Recorded Variable
A common shortcut is to put every available variable into one regression on the theory that more adjustment must remove more bias. That reasoning is incorrect. Some variables are not causes of treatment and outcome; some lie on causal pathways from treatment to outcome; and some are colliders, variables caused by two other variables. Conditioning on these different types of variables has different consequences.
The following hypothetical data illustrate how adjusting for a treatment-affected mediator can change the estimand even when treatment assignment itself is unconfounded. Suppose treatment \(A\) is randomized, \(M\) is measured afterward, and \(Y\) is an outcome measured in points. The entries below are group sizes and mean outcomes.
| Treatment | Post-treatment \(M=0\) | Post-treatment \(M=1\) | Total |
|---|---|---|---|
| \(A=0\) | 80 people; mean \(Y=10\) | 20 people; mean \(Y=20\) | 100 people |
| \(A=1\) | 20 people; mean \(Y=14\) | 80 people; mean \(Y=24\) | 100 people |
Worked Example: Adjustment Changes the Treatment Contrast
Suppose randomization makes the two treatment groups comparable before treatment, and assume the displayed group means are the relevant population means. Treatment changes the distribution of \(M\), and \(M\) is measured after treatment. First calculate the unadjusted mean difference, which in this randomized setting represents the total treatment contrast.
For \(A=0\), the mean outcome is \(0.80(10)+0.20(20)=8+2=12\) points. For \(A=1\), it is \(0.20(14)+0.80(24)=2.8+19.2=22\) points. Thus the total mean difference is \(22-12=10\) points.
Now compare treatment groups within levels of \(M\). When \(M=0\), the mean difference is \(14-10=4\) points. When \(M=1\), it is \(24-20=4\) points. A correctly specified additive regression adjusting for \(M\) would therefore give a conditional treatment contrast of 4 points, not the total contrast of 10 points.
The arithmetic shows what the adjustment has done: it compares treatments at a fixed value of a variable whose distribution treatment changed. In this example, the total contrast includes the outcome differences associated with the shift in \(M\); the within-\(M\) contrast does not capture that distribution shift. The 4-point coefficient is not an arithmetic mistake. It answers a different, conditional comparison and should not be reported as the total effect.
This example assumes random treatment assignment and uses a simple additive pattern for the within-\(M\) contrasts. In observational data, \(M\) may also be affected by unmeasured causes of \(Y\); conditioning on it can then introduce additional bias. The key diagnostic is not “never adjust for a post-treatment variable.” It is that adjusting for one needs a causal justification tied to the target effect and the full treatment history.
Error 2: Treating a Post-Treatment Measure as a Baseline Covariate
A covariate does not become a baseline measure because an analysis file labels it “baseline” or because it is the first value available in a particular table. Baseline is a temporal relation: the measure must be obtained before the treatment decision for which it is being used. A value collected after treatment starts may reflect treatment response, disease progression, or both.
Consider a hypothetical clinical study. At 08:00 on day 1, a clinician records severity \(L_0\). Initial treatment \(A_0\) is given at 09:00. Severity \(L_1\) is measured at 16:00. A second treatment \(A_1\) is chosen at 08:00 on day 2, and the outcome \(Y\) is recorded later. The elapsed time from the first treatment to \(L_1\) is \(16-9=7\) hours. The elapsed time from \(L_1\) to the second decision is \(24-16+8=16\) hours.
Worked Example: A “Baseline” Column Recorded After Treatment
An analyst calls the 16:00 severity score “baseline severity” and adjusts for it when estimating the effect of the 09:00 treatment \(A_0\). Check the chronology rather than relying on the variable label.
The relevant time difference is \(16{:}00-09{:}00=7\) hours after \(A_0\). Therefore \(L_1\) was not measured before \(A_0\), and cannot serve as a pre-treatment confounder for that initial decision. It may have been affected by \(A_0\), so adjusting for it can remove part of the effect of \(A_0\) or create bias.
For the later decision \(A_1\), the order is different: \(L_1\) was measured 16 hours before that decision. It could be relevant to why \(A_1\) was selected and to the later outcome. Its role for \(A_1\) does not make it a baseline covariate for \(A_0\). The same measurement is post-treatment for one decision and pre-decision for another.
The correct conclusion is not that \(L_1\) must always be included or always be excluded. The analyst must state which treatment effect is being estimated and examine the measure’s timing and causes in relation to that treatment decision. Calling it “baseline” cannot repair the chronology.
This distinction matters especially when a prior treatment changes a covariate that then predicts later treatment and outcome. Omitting that covariate can leave confounding of the later treatment comparison; adjusting for it in an ordinary regression can also block part of the earlier treatment’s effect. A single adjustment instruction—“include severity”—does not resolve this feedback.
Error 3: Ignoring Treatment-Decision Timing
A treatment is not merely a value attached to a study period. It is a decision made at a particular time, using information available at that time. A covariate measured after a decision cannot explain that decision as a cause, though it may be associated with earlier severity or may help explain a later decision. Likewise, a value measured before a later decision may be relevant for that later decision even if it is already affected by earlier treatment.
A useful notation makes the ordering explicit: \(L_0\) precedes \(A_0\), while \(L_1\) follows \(A_0\) and precedes \(A_1\). It is then possible for \(L_1\) to be a consequence of \(A_0\) and a predictor of \(A_1\). This is the central treatment-confounder feedback pattern. An ordinary regression that adjusts for \(L_1\) while trying to represent the total effect of \(A_0\) may condition away part of that effect; a regression that omits \(L_1\) may fail to account for differences relevant to \(A_1\).
The next example shows why a time label is not a cosmetic detail. The issue is whether the recorded covariate was available before the treatment decision, not whether its date falls within the same study “wave.”
Worked Example: A Covariate Attached to the Wrong Treatment Wave
In a hypothetical record, a symptom score is entered at 18:00 on day 3. The treatment decision \(A_1\) occurred at 15:00 that day; the next decision \(A_2\) occurs at 09:00 on day 4. An analyst links the 18:00 score to both treatment decisions as though it preceded each one.
For \(A_1\), the score was recorded \(18-15=3\) hours after the decision. It cannot be treated as information that caused or guided that decision. For \(A_2\), it was recorded \(24-18+9=15\) hours before the decision, so it was available beforehand and could have informed \(A_2\).
The correct audit therefore gives two different answers for the same recorded score: it is post-decision relative to \(A_1\), but pre-decision relative to \(A_2\). If the study instead had a score at 14:00 on day 3, that score would precede \(A_1\) by \(15-14=1\) hour. Confusing these timestamps can reverse the presumed ordering and lead to an invalid adjustment set.
Why Conditioning on “Helpful” Variables Can Create Bias
Not every variable that predicts the outcome is a confounder. In particular, conditioning on a collider can create an association between its causes even when those causes were independent before conditioning. If one cause is treatment and the other predicts the outcome, that induced association can make treatment and outcome appear related for the wrong reason.
Worked Example: Conditioning on a Collider Creates an Association
Let \(A\) and \(U\) be independent binary variables, each with probability \(0.5\) of being 1. Let \(C=1\) whenever \(A=1\) or \(U=1\), and let the binary outcome be \(Y=U\). Thus \(C\) is caused by both \(A\) and \(U\), while \(U\) determines the outcome. Assume, for this illustration, that \(A\) has no causal effect on \(Y\).
Before conditioning, independence gives \(P(Y=1\mid A=1)=P(U=1)=0.5\) and \(P(Y=1\mid A=0)=P(U=1)=0.5\). The treatment-group risk difference is \(0.5-0.5=0\).
Now restrict the comparison to \(C=1\). The equally likely pairs \((A,U)\) compatible with \(C=1\) are \((1,0)\), \((0,1)\), and \((1,1)\). Among those with \(A=1\), two pairs remain, and one has \(Y=1\), so \(P(Y=1\mid A=1,C=1)=1/2=0.5\). Among those with \(A=0,C=1\), only \((0,1)\) remains, so \(P(Y=1\mid A=0,C=1)=1\). The conditional risk difference is \(0.5-1=-0.5\).
The apparent 50-percentage-point lower risk under \(A=1\) is entirely induced by conditioning on \(C\); the treatment has no effect in the construction. In a real longitudinal analysis, an “extra predictor” may play a collider role that is not obvious from a spreadsheet. Predictive strength alone is not a sufficient reason to adjust for a variable.
A Practical Audit Before Fitting the Model
Before interpreting a longitudinal regression coefficient causally, write down the treatment decisions and covariate measurements in chronological order. Then ask what effect the analysis is intended to estimate. This short audit does not itself supply a method for every treatment-confounder feedback problem, but it can reveal when a conventional adjustment set is not adequate for the stated target.
State which treatment decision or treatment history is being compared and whether the goal is a total effect or a conditional contrast.
Record when each covariate was measured relative to each treatment decision and the outcome. Do not use a file label as a substitute for chronology.
For every post-treatment measure, consider whether earlier treatment may have changed it and whether it lies on a pathway to the outcome.
Distinguish a plausible common cause of treatment and outcome from a mediator, collider, or variable included merely because it is available or predictive.
If the adjustment may block part of the total effect or leave later confounding unresolved, do not describe the resulting coefficient as the total causal effect without further justification.
Common Mistakes
- “Adjusting for everything is safest.” More covariates do not guarantee less bias. Conditioning on mediators or colliders can change the estimand or create bias.
- “The first measurement in the file is baseline.” Baseline is defined relative to the treatment decision. A measurement after treatment begins is not baseline for that treatment merely because it is the earliest recorded value.
- “A post-treatment variable is never useful.” It may precede and help determine a later treatment decision. Its role must be evaluated separately for each decision.
- “A regression coefficient is the total effect.” A coefficient adjusted for treatment-affected covariates is a conditional model contrast; its causal meaning requires additional justification.
- “If a covariate predicts the outcome, it must be adjusted for.” Prediction does not establish that adjustment is appropriate. The variable’s causal role and timing matter.
Check Your Understanding
For each question, explain the role of timing or causal structure in your answer.
- A severity measure is recorded after an initial treatment but before a second treatment. Why can its role differ for the two treatment decisions?
- In the mediator example, calculate the total mean difference and the within-mediator treatment differences. Why are they not the same contrast?
- Why does conditioning on the collider \(C\) in the binary example produce a treatment–outcome association when the unconditioned association is zero?
- A score is measured at 10:00, and treatment is given at 11:00. What additional information would you need before calling the score a confounder for that decision?
- Give one reason why adding a strong outcome predictor to a longitudinal regression could make a causal interpretation less credible rather than more credible.