Drawing and Reading Causal DAGs
A practical guide to confounders, mediators, colliders, d-separation, and choosing adjustment sets without accidentally opening the wrong path.
A DAG is a picture of causal assumptions
DAG stands for Directed Acyclic Graph. Variables are shown as nodes and arrows encode assumed causal directions.
One arrow means one causal claim
If you draw X → Y, you are asserting that changing X could causally change Y, directly or as part of the represented system.
Confounder, mediator, collider
Confounder
C → Y
C causes both exposure X and outcome Y. This creates a back-door path between X and Y.
Mediator
M lies on the causal pathway from X to Y. Adjusting for M changes the estimand from total effect toward a direct effect.
Collider
C is caused by both X and Y. Conditioning on a collider can create an association that was not there before.
Not every path transmits association
Open unless you condition on M.
Open unless you condition on C.
Closed by default. Conditioning on C can open it.
The graphical rule for blocking paths
Two variables are d-separated by a set Z when every path between them is blocked according to the DAG rules. In causal inference, we use this idea to decide whether a proposed adjustment set blocks noncausal paths without opening new ones.
A path is blocked when...
You condition on a non-collider along a chain or fork.
A collider path can become open when...
You condition on the collider itself or, in general, on one of its descendants.
What should you adjust for?
The aim is to block noncausal back-door paths between exposure and outcome while leaving the causal pathway of interest intact.
The front-door idea
If important confounding between X and Y is unmeasured, a valid back-door adjustment set may not exist.
Under stronger structural assumptions, a measured mediator M can sometimes identify the causal effect through a front-door strategy.
Canonical pattern
The front-door criterion requires more than merely observing a mediator: the relevant paths involving X, M, and Y must satisfy the required graphical conditions.
Represent a DAG with dagitty
In this simple DAG, C is a confounder. A valid adjustment set contains C because it blocks the back-door path X ← C → Y.
What students most often get wrong
What to remember
Confounder
Common cause. Usually block it.
Mediator
On the causal pathway. Adjust only if your estimand calls for it.
Collider
Common effect. Usually leave it alone.