Ask Mallard

Directed acyclic graphs

A directed acyclic graph (DAG) is a diagram of assumed causal relationships that can help researchers reason about confounding, mediation, selection bias, and covariate adjustment.

What question does this help answer?

“Which variables should or should not be adjusted for if the goal is to estimate a particular causal effect?”

Why it matters

Regression software cannot determine causal structure from the dataset alone. DAGs make assumptions visible so investigators can debate them before choosing an adjustment set.

How it works in plain language

Variables are shown as nodes and hypothesized causal effects as arrows. Paths between exposure and outcome reveal causal routes and noncausal routes. Researchers try to block relevant noncausal backdoor paths without blocking the causal pathway of interest or opening biasing collider paths.

Forks, chains and colliders

Three small causal diagrams side by side. A fork, where B causes both A and C: conditioning on B closes the path. A chain, where A causes B and B causes C: conditioning on B closes the path. A collider, where A and C both cause B: conditioning on B opens a path that was closed.Fork: B is a common causeBACConditioning on B closes the pathbetween A and C.Chain: B is a mediatorABCConditioning on B closes the pathbetween A and C.Collider: B is a common effectACBConditioning on B opens a pathbetween A and C.Conditioning means restricting to, selecting on, or adjusting for B.
Conceptual diagram. It shows the structure of the idea, not data from any study.

How Mallard may use this concept

Mallard may recommend a DAG when the plan involves observational causal inference, complex covariate selection, mediators, time-varying relationships, or concern about overadjustment.

Good practice

  • Build the DAG from substantive knowledge, not from p-values.
  • Include variables needed to represent important common causes, even if some are unmeasured.
  • State the causal estimand.
  • Distinguish confounders, mediators, colliders, and instruments.
  • Treat the DAG as an explicit set of assumptions, not proof of causality.
  • Revise it through multidisciplinary discussion.

Common mistake

A DAG does not discover the truth from data. Incorrect causal assumptions can still produce a misleading adjustment set.

Clinical example

For the effect of a medication on hospitalization, baseline severity may be a confounder; post-treatment symptom improvement may be a mediator. Adjusting for both would generally target a different effect than adjusting only for baseline severity.

Recent studies that used this
Searching PubMed…
Part of the learning path Make a causal claim carefully (step 1 of 7).
Related Learn pages
Sources & further reading
  1. Tutorial on directed acyclic graphs (opens in a new tab) · J Clin Epidemiol · doi 10.1016/j.jclinepi.2021.08.001
  2. Directed acyclic graphs for clinical research: a tutorial (opens in a new tab) · J Minim Invasive Surg · doi 10.7602/jmis.2023.26.3.97
Last source review: 2026-09-05
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.