Causal inference: confounding and colliders
Full available lesson: about 5 min to read
See more Biostats Cluecards · Do more Biostats questions
Trace confounders and colliders, diagnose biased treatment comparisons, align longitudinal follow-up, and apply prevention guidance to real-world decisions.
Why can a treatment look protective without preventing an outcome? Trace common causes, mediators, and colliders to explain the mechanism. Then diagnose the bias, choose a comparable treatment contrast, and align follow-up before using evidence in care. Longitudinal appraisal asks what happens after treatment changes or patients stop attending; real-world protocol work adds guideline thresholds, prevention dosing, counseling, and referral when the data cannot support the decision.
Define the effect before choosing variables
Imagine a shift-work cohort in which age and habitual caffeine intake both precede the schedule and predict hypertension. Why might night shifts appear to raise risk even without a shift effect? The common-cause mechanism explains the distortion; clinical appraisal determines which comparisons support treatment decisions and follow-up; a registry protocol checks how those decisions were recorded in real practice. Begin with a target effect: eligible population, exposure, comparator, outcome, and follow-up. A total effect includes every route from exposure to outcome; a direct effect excludes a specified intervening route. The same measured variable can play different roles for different questions. A directed acyclic graph (DAG) is a drawing of assumed causal arrows, not a diagram of measured correlations. Confounding confuses the comparison, but association alone is not enough: for the stated question, the variable must leave a noncausal path open, usually because it is a common cause or a proxy for one. Acyclic means that following arrows cannot take you back to where you started. [1,2,11]
Choose control by causal role
| Structure | What control changes | Total-effect decision |
|---|---|---|
| X ← C → Y: common cause | Closes a noncausal path | Control C or a sufficient set that blocks that path |
| X → M → Y: mediator | Blocks part of the causal effect | Leave M uncontrolled for the total effect |
| X → S ← Y: collider | Opens a previously closed path | Avoid selecting or adjusting on S or its descendants |
Use the nearby three-path diagram to point to each arrowhead before choosing a control variable. The table separates causal role from predictive strength. A laboratory result can predict the outcome very well and still be a mediator or a collider for the current question. In the shift-work example, age belongs before both the schedule and hypertension. A blood-pressure response caused by the schedule belongs after exposure. Controlling these two variables has different consequences even if both improve prediction of hypertension. [1,2]
Trace each arrow before adjustment
For exposure X and outcome Y, a pretreatment variable C with arrows C to X and C to Y is a confounder: X and Y can appear related along X ← C → Y without an effect of X. A mediator M lies on X → M → Y; adjusting for M removes part of the total effect. A collider S receives X → S ← Y; this path is ordinarily closed, but selecting or adjusting on S can open it. These are roles determined by timing and arrows, not permanent labels attached to laboratory values. [1,2,12]
Try classifying age, a post-treatment biomarker, and admission in that order. First draw whether each precedes or follows X; then ask whether controlling it closes a noncausal path (a route linking exposure and outcome without transmitting the exposure's effect), blocks the effect you want, or opens a shared consequence. Adjusting for pretreatment age in the shift-work example can reduce distortion; adjusting for an intermediate blood-pressure response instead asks a different question. The adjustment decision follows the graph, not the strength of a variable's association with Y.
A post-treatment biomarker may mediate the current treatment's effect and also affect the next treatment decision. Thus 'adjust for every prognostic variable' fails even in a well-measured cohort. State your assumed arrows before interpreting the model, then compare the broader catalog of design pitfalls in Bias and Study Design. [1,13]