03 · What You Need to Know
How Temporal Ordering Affects Confounding and Causal Inference
What Makes a Variable a Confounder?
Confounding occurs when the association between an exposure and an outcome is distorted by other causal relationships. In a simple causal structure, a confounder influences both exposure and outcome, creating a noncausal path between them.
For example, students with stronger prior academic preparation may be more likely to enroll in an optional advanced learning program and may also achieve higher subsequent examination scores. If researchers compare participants with nonparticipants without addressing prior preparation, the estimated program effect may partly reflect differences that existed before enrollment.
Confounder identification nevertheless requires more than finding variables associated with both exposure and outcome. A variable's role depends on the underlying causal structure. Some variables associated with both are not appropriate adjustment variables, while certain variables needed for confounding control may not be obvious from simple statistical associations.
Researchers should use substantive knowledge, relevant evidence, and explicit causal assumptions rather than selecting adjustment variables solely through significance testing.
Why Is Pre-Exposure Measurement Usually Preferable?
A pre-exposure measurement helps establish that the recorded value was not itself caused by the exposure under investigation.
Suppose a researcher measures student motivation before participation in an online tutoring program. If motivation plausibly influences program enrollment and later academic performance, the initial measurement may help address confounding.
If motivation is measured only after students have participated for several weeks, its interpretation becomes more complicated. The program may have increased or decreased motivation, meaning the measured variable could partly reflect a consequence of participation.
Adjusting for that later measurement could remove part of the intervention's effect or introduce other biases, depending on the causal structure.
This is why selecting baseline variables should involve determining not only what to measure but also the temporal relationship between each variable and the exposure.
Distinguish Confounders From Mediators and Colliders
Three concepts are particularly important when deciding whether a variable belongs in an adjustment model.
| Causal role |
Illustrative relationship |
Adjustment implication |
| Confounder |
Prior achievement influences both program enrollment and later achievement. |
May need adjustment to estimate the causal effect of program participation. |
| Mediator |
Program participation increases study engagement, which subsequently improves achievement. |
Adjustment may remove part of the total program effect. |
| Collider |
Program participation and an unmeasured determinant of achievement both influence a later variable. |
Conditioning on that variable may open a noncausal association and introduce bias. |
These categories are determined by causal relationships, not by the variable's name or the fact that it was measured at baseline or follow-up.
A variable can occupy different roles in different causal questions. Motivation, for instance, might be a pre-existing confounder of voluntary program enrollment, a mediator of an instructional intervention, or a time-varying variable affected by earlier participation that influences subsequent participation.
Directed acyclic graphs, commonly called DAGs, can help researchers make these assumptions explicit. A DAG represents hypothesized causal relationships using directed arrows and can clarify which adjustment strategies are appropriate.
What Is Post-Treatment Bias?
Post-treatment bias can arise when researchers condition on variables affected by the exposure or intervention in ways that distort the causal effect of interest.
Consider a study investigating the total effect of a digital learning intervention on examination performance. Suppose the intervention increases students' study time, and increased study time improves examination performance.
Study time measured during the intervention lies on a possible causal pathway from intervention to achievement. If the researcher adjusts for that study time, the analysis may no longer estimate the total effect of the intervention.
Instead, it may attempt to compare intervention groups at the same level of an intermediate variable, a comparison that requires additional causal assumptions to interpret.
Post-exposure adjustment can also introduce collider bias when the adjusted variable is influenced by both exposure and another cause of the outcome.
Watch Out
Do not assume that including more variables in a regression model makes the estimate less biased. Adjustment for an exposure-induced mediator or collider can introduce bias or change the estimand, even when the variable strongly predicts the outcome.
Does Measuring a Variable After Exposure Automatically Make It Unusable?
No. The date on which information is collected is not always the same as the time to which the information refers.
A researcher might ask participants after enrollment about their highest educational qualification completed several years earlier. If the information accurately describes a genuinely pre-exposure characteristic, its retrospective collection does not automatically make it post-treatment information.
However, retrospective reporting can introduce recall error or differential reporting if exposure influences how participants remember or describe earlier experiences.
Similarly, some relatively stable characteristics may remain unaffected by the exposure even when measured afterward. Their use still requires a defensible argument about temporal stability and measurement validity.
The central question is whether the value being used represents a characteristic that preceded the relevant exposure, not merely whether the questionnaire was administered before a particular calendar date.
What Happens When Confounders Change Over Time?
Longitudinal studies often involve variables that change during follow-up and influence subsequent exposure and outcomes.
For example, a student's academic confidence may affect whether they continue using an optional learning platform. Earlier platform use may also influence academic confidence. Confidence may then affect later achievement.
In this situation, academic confidence can be both a consequence of earlier exposure and a confounder of the relationship between later exposure and the outcome.
This is called time-varying confounding affected by prior exposure.
Conventional regression adjustment for such variables may not estimate the desired total effect of a sustained exposure strategy. Depending on the research question and assumptions, researchers may consider methods such as marginal structural models with inverse probability weighting, the parametric g-formula, or other appropriate longitudinal causal methods.
These methods require careful specification and adequate data. They do not automatically eliminate unmeasured confounding, measurement error, or model misspecification.
How Does Confounder Timing Differ Between Randomized and Observational Studies?
In a properly randomized trial, treatment assignment is independent of pre-randomization characteristics in expectation. Baseline confounder measurement is therefore not generally needed to establish the initial exchangeability created by randomization.
Nevertheless, measuring prognostic baseline characteristics can improve precision, support descriptive reporting, and contribute to planned subgroup or implementation analyses.
In observational research, exposure is not assigned randomly. Pre-exposure confounder information is often central to the credibility of causal comparisons.
There are additional complications when analyzing treatment received rather than randomized assignment, when participants deviate from assigned interventions, or when subsequent treatment decisions depend on changing participant characteristics.
The distinction between randomized and observational research therefore matters, but it does not eliminate the need to consider causal timing.
How Early Should Confounders Be Measured?
Earlier is not automatically better. The ideal measurement reflects the relevant pre-exposure state while remaining sufficiently current for the causal question.
Prior educational attainment may be reasonably stable over a particular interval, while motivation, psychological symptoms, financial circumstances, or access to resources may change rapidly.
For changing variables, measurements taken too far before exposure may poorly represent the conditions influencing exposure selection.
The appropriate interval between baseline assessment and intervention should reflect the variable's expected stability, the timing of exposure decisions, and practical constraints.
In studies involving repeated exposures, researchers may need multiple measurements rather than relying on a single baseline snapshot.
Can Baseline Outcome Measurements Also Be Confounders?
Sometimes, particularly in observational research, a pre-exposure value of the outcome may be a common cause of exposure selection and subsequent outcome.
For example, students with lower initial achievement may be more likely to seek tutoring, while initial achievement also predicts later performance. Baseline achievement may therefore be an important adjustment variable.
In randomized trials, the same measurement may primarily serve as a prognostic covariate that improves precision.
Whether the primary outcome should be measured at baseline depends on its scientific and analytical value, rather than an assumption that it always plays the same causal role.
What Should Be Documented in the Research Protocol?
Researchers should specify the exposure definition, the start of the relevant exposure period, the timing of each potential confounder, and the intended adjustment strategy.
Where feasible, a causal diagram or equivalent written causal rationale should identify the assumptions supporting variable selection.
The protocol should also explain how researchers will handle measurements obtained after the intended baseline date, missing confounder data, and variables whose values may change during follow-up.
These decisions are best made before examining outcome associations, when the temptation to select variables according to favorable statistical results is lower.
04 · A Practical Example
Measuring Motivation Before and After an Online Tutoring Program
Hypothetical Example
Voluntary Participation in Digital Tutoring
A university investigates whether students who voluntarily participate in an eight-week online tutoring program achieve higher examination scores than students who do not participate.
Participation is not randomized. Researchers suspect that students' prior achievement and academic motivation influence both program enrollment and later examination performance.
Before enrollment decisions.
Researchers assess prior achievement and academic motivation. These measurements are candidates for confounding adjustment because they precede participation and may influence both enrollment and subsequent achievement.
During program participation.
Researchers measure motivation again after four weeks. This measurement may now reflect earlier tutoring experiences as well as other influences.
At the end of eight weeks.
Examination achievement is measured using a common assessment procedure.
During analysis.
The researchers use a prespecified causal rationale to select appropriate pre-enrollment adjustment variables. They do not automatically include week-four motivation in a conventional regression estimating the total effect of participation.
Suppose the tutoring program increases motivation, and that increased motivation contributes to achievement. Adjusting for week-four motivation could remove part of the effect the researchers intended to estimate.
However, if students can start, stop, or intensify tutoring throughout the eight weeks, motivation may also influence later participation. The study then requires a more detailed exposure history and potentially a longitudinal causal analysis.
The example illustrates why the same variable can require different treatment depending on when it is measured and which causal effect is being estimated.