Introduction
Definition
A directed acyclic graph (DAG) is a causal diagram in which each variable is drawn as a node and each arrow points one way, from a possible cause to its effect.12 An arrow states a known or suspected causal relationship, and variables with no direct causal link are left unconnected, so every missing arrow is a claim as well.32 The word acyclic means that no chain of arrows leads back to its starting variable, so a feedback loop is drawn as separate variables at separate times.3 The rules that read the graph, often called causal algebra, turn the drawing into answers.4
Context
In 1999, Greenland, Pearl, and Robins brought causal diagrams, then developed formally for expert systems and robotics, into epidemiology. They showed that a diagram can identify which variables must be measured and controlled for an unconfounded estimate.5 Pearl later placed the diagrams inside the structural causal model, a mathematical basis for answering questions about interventions, counterfactuals, and direct and indirect effects.4
Scope
This entry describes the parts of a DAG, the causal algebra that reads one, evidence that diagrams change results, and how to build, check, and report a diagram. It follows one worked example, sitting and heart disease, from the SciencEye post on finding research gaps with a DAG.
Detailed Explanation
Components
Every DAG has two building blocks: nodes, which stand for variables, and arrows (also called edges), which stand for causal relationships between them.3 DAG components can show who receives a treatment or exposure, the mechanisms through which it acts, and the other factors that influence the outcome or decide which people are included in an analysis.3 A path is any run of arrows that links two nodes, whatever direction the arrows point along the way. A node’s children are the nodes its arrows point into, and its descendants are everything reached by following arrows forward; its parents and ancestors are found by tracing arrows backward.2 Read together, the arrows give a blueprint of the exposure and outcome relation and the other variables that play a role in it, which is what lets the diagram guide an analysis.1
Three small structures account for almost everything a DAG can do, and Figure 1 draws each one. In a chain, the exposure affects an intermediate variable, a mediator, which affects the outcome. Controlling for a mediator blocks part of the effect being studied, and Schisterman and colleagues define this control for an intermediate variable on the causal path as overadjustment bias.36 In a fork, one variable causes both exposure and outcome, and that shared cause is the source of confounding.7 In a collider, exposure and outcome both cause a third variable. Conditioning on that common effect produces selection bias, a structure that also covers inappropriate control selection in case-control studies and informative censoring in cohorts.7
Real diagrams are larger than these patterns. Among the 234 articles in the review by Tennant and colleagues, the largest DAG in each averaged 12 nodes and 29 arrows; 37% included variables that were not measured, and 17% used super-nodes, single nodes that stand for more than one variable.8 Two nodes carry the question itself. The exposure is the possible cause, and the outcome is the effect of interest; every other node matters only through the paths it opens or closes between them.
A worked case shows how a node earns its role. In the 24-hour activity cycle model of Stoner and colleagues, poor sleep can confound the body’s responses to the next day’s activity.9 On a diagram, that claim becomes two arrows: one from sleep into the next day’s activity, and one from sleep into the cardiovascular measure. Sleep then sits in a fork, and an analysis of activity and arterial stiffness that ignored it would leave a non-causal path open. The same variable could be a mediator in another question, which is why roles belong to positions in a particular diagram, not to variables in general.
Roles of this kind come from the diagram, and statistical rules alone cannot find them. Greenland and colleagues showed that the traditional criteria for confounding have shortcomings when several potential confounders are considered together, and that the diagram can correct them.5 Hernán and colleagues reached the same conclusion in practice: a statistically chosen confounder set produced an invalid estimate that causal knowledge, written as a diagram, caught.10 The six-step method of Shrier and Platt was designed for this reason, to give investigators a tool simple enough to use with complicated diagrams instead of falling back on traditional practice.2
| Component | Description | Role in the analysis |
|---|---|---|
| Node | A variable, measured or not | Something that can cause, or be caused by, another variable |
| Arrow (edge) | A one-way link from a possible cause to its effect | States a direct causal claim; a missing arrow states the absence of one |
| Path | Any run of arrows linking two nodes, in either direction | Carries association; open paths bias an estimate unless they are causal |
| Exposure and outcome | The possible cause and the effect of interest | Define the question every other node is judged against |
| Mediator | A node on a causal path from exposure to outcome | Adjusting for it blocks part of the effect being estimated |
| Shared cause (confounder) | A node with arrows into both exposure and outcome | Opens a non-causal path that adjustment must close |
| Collider | A node that two arrows on a path point into | Blocks the path, until it or its descendant is adjusted for |
| Unmeasured node | A variable in the diagram but not in the data | Shows which paths cannot be closed with the data in hand |
Table 1. The parts of a DAG and the role each plays.
Variations
Several kinds of DAG share the same rules. A selection diagram adds a node for who is analyzed, because Hernán and colleagues showed that selection bias in its many forms has one causal structure: conditioning on a common effect of two variables, one linked to the exposure and the other to the outcome.7 A time-indexed DAG splits one measure into several nodes, one per occasion, so that weight at age 50 can cause stroke at age 60 without breaking the rule against loops.3
Evidence-synthesis DAGs come from the literature rather than from one team’s judgment. The Evidence Synthesis for Constructing Directed Acyclic Graphs (ESC-DAGs) protocol maps each study’s conclusions into its own diagram, checks and corrects those diagrams against causal inference principles, and merges them into one or more integrated DAGs.11 Sultana and colleagues applied ESC-DAGs to 35 studies of tobacco cessation and found that digital access and culturally tailored interventions were underexplored pathways, while structural factors such as socioeconomic disadvantage, digital inequities, and rurality exerted substantial influence on cessation outcomes.12 Dijk and colleagues go a step further and propose that a DAG be created and registered before a systematic review or meta-analysis begins, so it can sharpen the inclusion criteria and the items extracted.13
These evidence-based diagrams change what a review produces. A conventional review pools what studies found, while an integrated DAG records how the variables connect, so the arrows that no study has tested become visible on the page.1113
A further variation adds sufficient-component causes to the graph. VanderWeele and Robins showed that drawing these causes reveals independencies within strata of a conditioned variable that a plain DAG hides, can fix the sign of the association created by conditioning on a common effect, and allows interactions to be represented on the graph. The extension also brings several different causal frameworks together on one graph.14
A last distinction is between a sketch and a checked diagram. Sketches record a team’s working assumptions. A checked diagram has been tested against data, which the R package dagitty does by asking whether the dataset is consistent with the graph and by listing the graphs that fit the data equally well.15 SciencEye labels any figure that has not passed those tests “Sketch, not a validated DAG”.
Statistical Basis
Causal algebra: why a DAG needs it
A diagram on its own is a picture of assumptions; the rules that read it, often called causal algebra, turn those assumptions into answers. The rules are needed because data alone cannot carry causal claims. Pearl separates associational concepts, such as correlation and “controlling for”, which can be defined from the distribution of observed variables, from causal concepts, such as effect and confounding, which cannot. Every causal claim therefore rests on causal premises, and probability calculus alone has no notation to state them.4 A DAG supplies the premises; the algebra derives what follows from them. Without it, two things go wrong. Errors in the diagram stay hidden, because no arrow can be tested on its own.4 And a correct diagram can still yield a wrong estimate when the adjustment set is chosen by statistical habit, as the folic acid case in the Evidence section shows.10
Three rules do most of the work. The first, d-separation, decides whether a path carries association. A set of variables S blocks a path if the path contains an arrow-emitting node that is in S, or a collision node (a collider) that is outside S and has no descendant in S; if S blocks every path between X and Y, the two are independent given S.4 This is the rule behind Cole and colleagues’ fever example: adjusting for a collider unblocks a path that was closed.16 It also gives a DAG its testable implications. The missing arrows together predict independencies that can be checked against data, which the dagitty software does automatically.415
The second rule, the back-door criterion, picks what to adjust for. A set S is admissible if no member is a descendant of the exposure X and the set blocks every back-door path, meaning every path from X to Y that ends with an arrow pointing into X. Back-door paths carry spurious association, and paths that follow the arrows from X to Y carry the causal association; once S blocks the former, stratifying on S removes all confounding bias.4 Shrier and Platt’s six steps reach the same answer by hand.2
The third tool, the do-calculus, handles the cases adjustment cannot. Its do(x) operator represents an intervention: it deletes the equation that normally sets X and replaces it with the constant x, leaving the rest of the model unchanged. The rules of the calculus rewrite an interventional quantity such as P(y | do(x)) into an expression free of do(); when that rewrite exists, the effect is identifiable from observational data.4 When no admissible set exists, an effect can sometimes still be estimated in two steps through a mediator.4 Huang and Valtorta proved the calculus complete: if an effect is identifiable, some sequence of its three rules will find the expression.17 So the algebra returns one of three verdicts for any question: adjust for this set, estimate in steps, or the data cannot answer it.
| Notation | Read it as | What it tells you |
|---|---|---|
| X ⊥⊥ Y | S | X is independent of Y given S | Holds whenever S blocks every path between X and Y in the graph (d‑separation) |
| P(y | x) | The chance of y among people seen with x | An association: back-door paths are included |
| P(y | do(x)) | The chance of y if everyone were set to x | The causal effect of an intervention |
| ∑s [P(Y=1 | X=1, S=s) − P(Y=1 | X=0, S=s)] P(S=s) | The risk difference within each stratum of S, averaged over the strata | Equals P(Y=1 | do(X=1)) − P(Y=1 | do(X=0)) when S is admissible |
Table 2. How to read the notation of causal algebra. Capital letters are variables; lowercase letters are their values. Source: Pearl.4
A worked example: sitting and heart disease
Figure 2 asks whether sitting causes heart disease in a cohort that measured age, sitting, arterial stiffness, and heart disease, but not psychological stress. Each arrow rests on a source. Pulse wave velocity, a measure of arterial stiffness, rises with age.18 Sedentary behavior is linked with stress, though 65% of 144 studies were cross-sectional, so which comes first is untested.19 Acute stress raised central pulse wave velocity (standardized mean difference 0.51, 95% confidence interval [CI] 0.34 to 0.68), and high perceived stress raised the risk of coronary heart disease (risk ratio 1.27, 95% CI 1.12 to 1.45).2021 Three hours of sitting raised carotid-femoral pulse wave velocity by 0.30 m/s in a randomized crossover trial, which places arterial stiffness on the path as the mediator.229 Sedentary time and aortic stiffness both predict cardiovascular disease (hazard ratios 1.143, 95% CI 1.002 to 1.729, and 1.30, 95% CI 1.18 to 1.43).2324
Reading the map with the algebra takes four steps, shown in Figure 3. First, the question is written as P(heart disease | do(sitting)), the effect of setting sitting, not the association P(heart disease | sitting). Second, every path from sitting to heart disease is listed: two follow the arrows and carry the effect, and four enter sitting through age or stress and are back-door paths. Third, the back-door criterion is applied. The set {age, stress} blocks all four back-door paths and contains no descendant of sitting, so it is admissible; arterial stiffness is a descendant, and adding it would block part of the effect.46 Fourth, measurement is checked. Stress was not measured, so no admissible set exists in this cohort, and the two-step route fails too, because stress also opens a back-door path from sitting into arterial stiffness. The verdict is that the data cannot answer the question, however large the sample.
The algebra also hands the next study two checkable claims. With stress measured, adjusting for age and stress identifies the effect, provided the drawn arrows are right. And because no arrow joins age and stress and every path between them passes through a collider, d-separation predicts that the two are unassociated; a cohort that measured both could test that claim, and an association would reveal a missing arrow or shared cause.4
| Arrow | What the evidence shows | Source |
|---|---|---|
| Age to arterial stiffness | Supported: pulse wave velocity rises with age in reference data | RVAS 201018 |
| Age to sitting; age to heart disease | Assumed; no source checked for this entry | None |
| Stress to sitting | Linked in most studies; which comes first is untested | Chauntry 202619 |
| Stress to arterial stiffness | Laboratory studies of acute stress: stiffness rises | Zieff 202520 |
| Stress to heart disease | Pooled cohorts: high perceived stress, more coronary heart disease | Richardson 201221 |
| Sitting to arterial stiffness | Randomized crossover trial: 3 hours of sitting raised aortic stiffness | Evans 201922; Stoner 20239 |
| Sitting to heart disease (the question) | Pooled cohorts, mostly self-reported sitting | Biswas 201523 |
| Arterial stiffness to heart disease | Stiffness predicts cardiovascular events | Ben-Shlomo 201424 |
Long description of Figure 2: each drawn arrow, its evidence in plain words, and its source, from abstracts checked on 10 November 2026.
Evidence
Diagrams have changed reported estimates. In a case-control study of folic acid and neural tube defects, statistically chosen confounders gave an adjusted odds ratio of 0.80 (95% CI 0.62 to 1.21); causal knowledge encoded in a diagram showed that estimate was invalid and that the crude odds ratio of 0.65 (95% CI 0.46 to 0.94) applied.10 Overadjustment bias arises from a different causal structure from confounding, and it does not shrink as samples grow.6 Westreich and Greenland’s “Table 2 fallacy” warns that covariate coefficients from one model are not total effects and may be confounded even when the exposure estimate is not.25
| Study | Finding | Link |
|---|---|---|
| Greenland 1999 | Causal diagrams identify which variables must be controlled for an unconfounded estimate | PubMed |
| Hernán 2002 | A diagram showed a statistically chosen adjusted odds ratio (0.80) was invalid; the crude 0.65 applied | DOI |
| Hernán 2004 | Selection bias shares one structure: conditioning on a common effect | DOI |
| Schisterman 2009 | Adjusting for a mediator causes overadjustment bias, a structure distinct from confounding | DOI |
| Westreich 2013 | Covariate coefficients in one model are not total effects and may be confounded | DOI |
| Tennant 2021 | 234 articles: 21% stated their estimand, 48% their adjustment set | DOI |
Table 3. Key studies on how causal diagrams change estimates and reporting.
Current understanding
The method is now established in epidemiology, but its reporting lags behind. In the review by Tennant and colleagues, 62% of articles made at least one DAG available, and 48% reported the adjustment set their diagram implied.8 The dagitty package lists the statistically equivalent graphs that differ in their causal claims and finds adjustment sets that stay valid across them.15 Digitale and colleagues stress that DAGs are not infallible, because prior knowledge is incomplete. Several alternative diagrams are often plausible, and researchers should test whether their results change across them and report that uncertainty.3
Practical Applications
Relevance
The first use of a DAG is the analysis plan of an observational study. Etminan and colleagues show how causal diagrams help in the design and interpretation of observational studies in pulmonary, critical care, sleep, and cardiovascular medicine, and how they reveal the structure of confounding, selection bias, overadjustment bias, and detection bias.1 For a reader of such studies, the same diagram explains why two well-run cohorts can disagree: they may have adjusted for different nodes. A cohort that adjusts for a mediator, or that analyses only people selected on the outcome, can report a biased effect for structural reasons rather than chance.67
The collider studies carry a warning for any analysis restricted to people who completed a protocol or attended a clinic. Selection of that kind conditions on a common effect whenever both the exposure and the outcome influence who is included, and it can create an association in the analyzed sample that does not exist in the population.716
The second use is planning. Stoner and colleagues built a working model for the 24-hour activity cycle in which prolonged sitting raises arterial stiffness through venous pooling, and in which poor sleep can confound the body’s responses to next-day activity.9 A model of that kind can be written as a DAG and its arrows checked one by one. Evidence and gap maps show where effectiveness studies are missing across interventions and outcomes.26 A DAG built from the same literature through ESC-DAGs can then direct the primary data analysis.11 Reading which gaps on that map a given dataset could close, and which need a new measure first, turns a list of missing studies into a ranked research agenda; the SciencEye post on missing arrows walks through the ranking.
Building and checking a DAG
Building a DAG is a short sequence, each step with its own check. The question comes first, because only 21% of the articles Tennant and colleagues reviewed stated the effect they aimed to estimate.8 Next come the variables and arrows, ideally from the literature rather than memory, as ESC-DAGs does.11 The adjustment set follows from the graph, by Shrier and Platt’s six steps or by software.215 Then the graph is tested against the data, and the analysis is repeated under the plausible alternatives.153
| Step | What it does | Tool or source |
|---|---|---|
| 1. State the question | Names the exposure, the outcome, and the effect to estimate | Tennant and colleagues |
| 2. Gather the variables | Lists causes of exposure and outcome from the evidence | ESC-DAGs |
| 3. Draw and source the arrows | Records each arrow with its evidence; leaves out arrows on purpose | Your evidence table |
| 4. Mark what is missing | Flags unmeasured nodes and who is analyzed | Selection node |
| 5. Derive the adjustment set | Finds the variables that block every non-causal path | Six-step method; DAGitty |
| 6. Test against the data | Checks the implied independencies hold | R package dagitty |
| 7. Repeat under alternatives | Shows whether the result depends on contested arrows | Sensitivity analysis |
Table 4. Steps for building and checking a DAG.
Good practice
A DAG reported well can be checked by a reader. Tennant and colleagues found that most applied articles left out at least one of three items: the effect being estimated, the diagram itself, and the adjustment set it implied.8 Reporting all three lets a reader see which arrows the conclusions depend on. Results tables need the same care. Westreich and Greenland advise distinguishing total from direct effects for every coefficient shown, and fitting separate models when a covariate’s own total effect is of interest.25 Where knowledge is too thin for a full diagram, VanderWeele’s working rule gives a defensible starting set.27 For readers new to the area, the SciencEye guides to causality and study design and propensity score matching show the designs that use these adjustment sets.
Drawing a diagram is only half the method. A diagram that is drawn but not reported cannot be checked by a reader, and an adjustment set that is chosen but not derived from the diagram may undo the work the diagram was meant to do.82
Complete knowledge of the diagram is rare. When it is available, graphical rules decide which covariates to control; when it is not, VanderWeele proposes a working rule: control for each covariate that causes the exposure, the outcome, or both, exclude any known instrumental variable, and include a proxy for any unmeasured common cause of exposure and outcome.27 Either way, the diagram does not remove assumptions. Shrier and Platt put it plainly: every causal inference from a statistical model rests on a causal structure, and a DAG makes that structure explicit.2 Pearl’s account of causal inference likewise places the assumptions behind every causal claim at the center.4
Figures deserve the same care as text. Only about a third of the diagrams in the Tennant review were laid out so that their arrows flowed in one direction, which makes the others harder to check.8 Placing time from left to right, marking unmeasured nodes with dashed outlines, and stating that a missing arrow is a claim, as Figure 2 does, lets a reader find the assumptions without decoding the drawing.
Diagram size is a practical issue in its own right. The median diagram in the Tennant review contained almost half of all possible arrows, and sizes ranged up to 28 nodes and up to 99 arrows.8 A graph that dense is hard to read and easy to get wrong. Two tools answer the two halves of that problem: dagitty checks the logic of a large graph, and ESC-DAGs makes each arrow traceable to a study.1511
Controversies and Limitations
Debates
The sharpest debate concerns effect modification. A DAG conveys no information about the size or functional form of a causal relationship, so it is not an ideal tool for representing effect-measure modification, which has to be tested with data.3 Shrier and Platt likewise note that effect modifiers are not marked as such in a standard DAG.2
The sitting example shows why this matters. In a trial in active adults, prior aerobic exercise lowered femoral-ankle pulse wave velocity before sitting but did not protect against its rise during sitting.28 In another, neither cardiorespiratory fitness nor habitual Physical Activity was associated with the arterial response to 2 hours of sitting.29 Both are questions about whether one factor changes another’s effect, and a plain DAG cannot draw either. Reference data on arterial stiffness give a third example: pulse wave velocity rose with age, and the rise was steeper in higher blood pressure categories.18 A diagram can carry an arrow from age and an arrow from blood pressure into stiffness, but not the fact that each strengthens the other.
| A DAG does not show | Why it matters | What to use instead |
|---|---|---|
| Effect modification or interaction | The size of an effect may differ across groups | Stratified or interaction analysis |
| Size or shape of an effect | Arrows carry direction, not magnitude | The fitted model |
| Which of several equivalent graphs is true | Some graphs fit the data equally well | Subject knowledge and sensitivity analyses |
Table 5. What a DAG cannot show.
Limitations
A DAG depends on the knowledge behind it, and prior knowledge is often incomplete enough that several diagrams remain plausible.3 Data can reject some diagrams, but statistically equivalent graphs make the same predictions about the data, so no dataset can choose between them.15 What a diagram can always do is state its assumptions where others can see them and argue with them.2

Leave a Reply