Skip to content

Confounding, mediation and collider bias: what to adjust for

Which variables belong in a model is a question about causal structure, not about which ones reach significance. Adjusting for the wrong one introduces bias that was not there before.

By
Ahmed Khaled, MD
Published
September 2, 2026
min read
2 min read

The habit of screening variables univariably and keeping whatever reaches p < 0.2 is common, convenient, and wrong. It answers a statistical question when the question is causal.

Three roles a variable can play, and only one of them should be adjusted for.

Confounder: adjust

A common cause of both the exposure and the outcome. It creates an association between them that is not causal, and leaving it out biases the estimate.

Age in a study of a treatment given preferentially to older patients is the standard example. Adjusting removes a distortion.

Mediator: usually do not adjust

A variable on the causal pathway from exposure to outcome — the exposure changes it, and it changes the outcome.

Adjusting for a mediator removes the part of the effect that travels through it. If a drug lowers mortality by lowering blood pressure, adjusting for blood pressure removes most of the effect you were trying to measure, and the result will look like the drug does nothing.

This is only appropriate when the direct effect is genuinely the question, and it should be stated as such.

Collider: never adjust

A variable caused by both the exposure and the outcome, or by their causes. Conditioning on one creates an association between things that were independent.

The classic form is selection: if hospital admission is caused both by the exposure and by the outcome, a study restricted to admitted patients has conditioned on a collider, and an association will appear that does not exist in the population.

This bias is invisible in the output. Nothing in the model tells you it happened.

How to decide

Draw the assumed causal structure before fitting anything — a directed acyclic graph on paper is enough. Mark for each candidate variable whether it is a common cause, a step on the pathway, or a consequence of both.

Then adjust for the confounders. The set is chosen from clinical knowledge and stated in the protocol, so that a reader can disagree with the assumptions rather than having to guess them.

What to report

Say which variables were adjusted for and why. "Adjusted for age, sex and comorbidity" tells a reader nothing about whether the adjustment set was right. Naming the assumed structure lets them evaluate it.

Frequently asked questions

Which variables should I adjust for?

Confounders — common causes of both the exposure and the outcome. Not mediators, which sit on the causal pathway and whose adjustment removes part of the effect you are measuring. Never colliders, which are caused by both and whose adjustment creates an association that does not exist.

Should I select confounders by univariable significance?

No. Which variables confound a relationship is a question about causal structure, answered from clinical knowledge. A p-value screen answers a statistical question when the question is causal, and can select mediators and colliders alongside genuine confounders.

What is collider bias?

Bias introduced by conditioning on a variable caused by both the exposure and the outcome. The classic form is selection: restricting to hospitalised patients when admission depends on both creates an association absent in the population. Nothing in the model output indicates it happened.

References

  1. Hernán MA, Hernández-Díaz S, Robins JM. A structural approach to selection bias. Epidemiology. 2004;15(5):615-625.

    https://doi.org/10.1097/01.ede.0000135174.63482.43
  2. VanderWeele TJ. Principles of confounder selection. Eur J Epidemiol. 2019;34(3):211-219.

    https://doi.org/10.1007/s10654-019-00494-6

Related services

Tell us about your study

Send the scope and we will come back with a written quote. No account needed.