Week 2: Causal Diagrams: Five Elementary Structures

Slides

Optional Readings

Key concepts for the test(s)

  • Internal validity
  • External validity
  • Causal directed acyclic graph (causal DAG)
  • Five elementary causal structures
  • Confounding
  • d-separation
  • Backdoor path
  • Conditioning
  • Fork
  • Chain
  • Collider bias
  • Mediator bias
  • Four rules of confounding control

Lab 2 setup

Use Lab 2: Install R and Set Up Your IDE for this week's practical work. The optional script is here: Download the R script for Lab 02.


Seminar

Motivating example: the Salk vaccine

The 1954 field trial of the Salk polio vaccine was a multi-site study conducted across many communities in the United States (Dublin, 1955; Francis Jr., 1955). Two protocols were used in different participating areas. In the observed-control protocol, second-grade children whose parents consented received the vaccine. Children in the first and third grades served as controls. In the placebo-controlled protocol, children were randomised to vaccine or placebo under double-blind conditions.

The placebo-controlled protocol supported a causal conclusion. The vaccine reduced paralytic polio (Francis Jr., 1955). The observed-control protocol did not support the same conclusion, because parental consent shaped vaccine assignment.

Parents who consented tended to have higher socioeconomic status, and socioeconomic status also predicted baseline susceptibility to paralytic polio. The observed-control comparison was therefore confounded: vaccination status and polio risk differed for reasons other than the vaccine itself.

Same question. Different assignment mechanism. Different estimate, different reliability.

Salk later reported on the 1956 vaccination campaign (Salk, 1957).

Why this week matters

In Week 1 we defined causal questions. This week we learn how to represent structural assumptions using a causal directed acyclic graph (causal DAG): a diagram in which nodes represent variables and arrows represent assumed causal directions, with no cycles. A causal DAG does not create causal knowledge. It makes assumptions explicit, checkable, and discussable.

A simple map for week 2

For test purposes, most week 2 questions reduce to three steps.

How to read a DAG

  1. Identify the path structure: fork, chain, or collider.
  2. Ask whether the path is open or blocked as drawn.
  3. Ask what conditioning would do: close the path or open it.

If you can do those three things, you can usually explain the bias logic in words.

Independence language

Do not let the notation do more work than it should. It is just shorthand.

  • $A \coprod Y(a)$: $A$ and $Y(a)$ are independent.
  • $A \cancel\coprod Y(a)$: $A$ and $Y(a)$ are dependent.
  • $A \coprod Y(a)\mid L$: $A$ and $Y(a)$ are independent once we condition on $L$.

Conditioning means restricting attention to observations that share the same value of a variable (or, equivalently, adjusting for that variable in an analysis). In a causal DAG, a conditioned variable is drawn inside a box.

Randomisation and exchangeability

Under random assignment,

$$ Y(a) \coprod A. $$

This condition is unconditional exchangeability. Under this condition, a difference in means identifies the average treatment effect (ATE):

$$ \widehat{\text{ATE}}=\hat{\mathbb{E}}[Y\mid A=1]-\hat{\mathbb{E}}[Y\mid A=0]. $$

In observational studies, this condition usually fails without adjustment.

Working definitions

Internal validity concerns whether the study contrast estimates the target causal contrast in the study population.

External validity concerns whether that causal contrast transports to the target population.

These are design properties, not instrument properties. Measurement validity (Week 1) is a precondition, not a synonym.

Confounding bias exists when treatment groups differ systematically in ways that affect the outcome, so that the observed association between $A$ and $Y$ does not equal the causal effect. In graph terms, confounding corresponds to an open non-causal path from $A$ to $Y$ (a "backdoor path," formalised below in the four rules of confounding control).

Causal DAG notation and elements

Our variable naming conventions (adapted from Bulbulia, 2023)

  • $A$: treatment or exposure.
  • $Y$: outcome.
  • $Y(a)$: potential outcome under intervention level $a$.
  • $L$: measured confounder set.
  • $U$: unmeasured cause.
  • $M$: mediator.
  • $\bar{X}$: sequence of variables.
  • $\mathcal{R}$: chance mechanism, including randomisation.

Nodes, edges, and conditioning conventions (adapted from Bulbulia, 2023)

  • Arrows encode assumed causal direction.
  • Boxes indicate conditioning.
  • Open red paths indicate biasing pathways.

Five elementary structures

Five elementary structures (adapted from Bulbulia, 2023)

  1. No causal relation: $A \coprod B$. The variables are statistically independent.
  2. Direct causation: $A\to B$. The variables are statistically dependent: $A \cancel\coprod B$.
  3. Fork: $A\to B$ and $A\to C$. Because $A$ causes both $B$ and $C$, they are associated. Conditioning on $A$ removes that association: $B \coprod C \mid A$.
  4. Chain: $A\to B\to C$. Because $B$ mediates the effect of $A$ on $C$, they are associated. Conditioning on $B$ blocks the path: $A \coprod C \mid B$.
  5. Collider: $A\to C\leftarrow B$. Because $A$ and $B$ both cause $C$ but do not cause each other, they are marginally independent. Conditioning on $C$ opens a spurious association: $A \cancel\coprod B \mid C$.

These five structures generate all patterns of conditional independence and dependence in a causal DAG. Understanding which structures block and which transmit association is the basis for confounding control.

Three questions for any path

  • Is this path causal or non-causal?
  • Is it open or blocked right now?
  • What would conditioning on the middle variable do?

Pair exercise: naming the structure

For each scenario, name the elementary structure, state whether the two end variables are marginally associated, and predict what conditioning does.

  1. Socioeconomic status (SES) causes both neighbourhood quality and health outcomes. What structure links neighbourhood and health? What happens if you condition on SES?
  2. A drug reduces inflammation, and inflammation causes pain. What structure links the drug to pain? What happens if you condition on inflammation?
  3. Genetics affects blood pressure and diet affects blood pressure, but genetics and diet do not cause each other. What structure links genetics and diet through blood pressure? What happens if you condition on blood pressure?

Three identification assumptions

Assumption 1: Causal consistency

If person $i$ receives $A_i=a$, then $Y_i=Y_i(a)$.

Assumption 2: Conditional exchangeability

After conditioning on an adequate set $L$,

$$ Y(a) \coprod A \mid L. $$

Assumption 3: Positivity

For all treatment levels and covariate strata used for inference,

$$ P(A=a\mid L=l)>0. $$

Pair exercise: checking assumptions against a causal DAG

  1. Draw a causal DAG for the Salk vaccine example. Include: parental consent ($L$), vaccine assignment ($A$), polio outcome ($Y$), and socioeconomic status ($U$) as an unmeasured common cause of $L$ and $Y$.
  2. In the observational design (assignment by parental consent), check exchangeability: is $Y(a) \coprod A$? Trace the open backdoor path.
  3. In the randomised design, check exchangeability: is $Y(a) \coprod A$? Explain why the path is now blocked.
  4. Check positivity in each design. In which design is a positivity violation more probable, and why?

Four rules of confounding control

Four rules of confounding control

  1. Condition on common causes (or defensible proxies). If $L$ causes both $A$ and $Y$, the fork $A \leftarrow L \to Y$ opens a backdoor path. Conditioning on $L$ closes it. When $L$ is unmeasured, conditioning on a measured proxy can reduce, though not eliminate, confounding.
  2. Do not condition on mediators when estimating total effects. If $A \to M \to Y$, conditioning on $M$ blocks part of the causal path we want to estimate.
  3. Do not condition on colliders. If $A \to C \leftarrow Y$, conditioning on $C$ opens a spurious path between $A$ and $Y$. The "control for everything" instinct is unsafe for this reason.
  4. Treat descendants carefully. Conditioning on a descendant of a variable is akin to partially conditioning on that variable. A descendant of a collider can transmit collider bias; a descendant of a confounder can partially reduce confounding.

A short rulebook for the test

  • Common cause: usually condition.
  • Mediator: do not condition if you want the total effect.
  • Collider: do not condition.
  • Descendant: ask what it is downstream of before you adjust for it.

A note on the generality of d-separation

Two variables are d-separated ("directionally separated") in a causal DAG when every path between them is blocked. In practice, this means that the DAG implies conditional independence once the relevant conditioning set is stated. The rules above focus on confounding, but d-separation is more general than confounding control. It is the reason the same DAG logic can later be used for collider bias, mediator bias, and measurement problems.

Return to the opening example

The Salk example is a structural lesson about assignment. The observed-control design produced a biased effect estimate because socioeconomic status confounded the comparison. The randomised design blocked that path. Causal DAGs help us state this lesson before analysis. First we define the question. Then we draw assumptions. Then we choose an adjustment set. Then we estimate.

Where do causal assumptions come from?

A causal DAG encodes assumptions. Those assumptions do not come from the data. They come from prior knowledge: theory, mechanism, previous studies, and domain expertise. This dependence on existing knowledge might seem circular. If we need knowledge to draw a causal DAG, and a causal DAG is required for causal inference, where do we start?

Otto Neurath's metaphor of the ship at sea captures the answer:

We are like sailors who on the open sea must reconstruct their ship but are never able to start afresh from the bottom. Where a beam is taken away a new one must at once be put there, and for this the rest of the ship is used as support. In this way, by using the old beams and driftwood, the ship can be shaped entirely anew, but only by gradual reconstruction. (Neurath, 1973, p. 199)

Causal diagrams are planks in Neurath's boat. We build them from the best available knowledge, test their implications, and revise when evidence warrants. The alternative, letting data alone determine causal structure, is not available. Data reveal associations. Associations are compatible with many causal structures. Without assumptions, the data do not tell us which structure generated them.

Next week we apply these structures to the specific problem of confounding bias: the patterns that open backdoor paths and the strategies for closing them.

Epilogue: avoid "within-person" and "between-person"

  1. Students often describe designs as "within-person" or "between-person". These labels feel intuitive, but they hide the causal object. "Between-person" in particular can mislead because it sounds like we compare two different populations. In an experiment we have one population, which we project into two potential states under two intervention levels. Randomisation lets two groups stand in for those two projected states.

In this course we instead name a target population, two intervention regimes, an outcome, and the time that we measure that outcome.

  1. This framing works even when the target population contains one unit. Let the population be Alice. Define two regimes over time: $a=1$ means Alice doom-scrolls for two hours nightly for four weeks, and $a=0$ means she studies for two hours nightly for four weeks. Let the outcome be her life satisfaction, measured after each four-week period. The causal contrast for Alice is $\delta_{\text{Alice}}=Y_{\text{Alice}}(1)-Y_{\text{Alice}}(0)$.

  2. Week 1 shows why this contrast is inaccessible from observation alone. Alice can follow regime $a=1$ or regime $a=0$, but not both in the same period. We therefore observe only one of $Y_{\text{Alice}}(1)$ or $Y_{\text{Alice}}(0)$. This missing counterfactual is not a statistical inconvenience. It is a logical constraint.

  3. Week 2 adds a second lesson. Even when we target a population-level average, we still need a defensible assignment story. Causal DAGs let us state, and critique, the assumptions that connect the observed data to the causal contrast. They do not rescue imprecise language. They force us to say what we compare, for whom, and why.

Pair exercise: Neurath's ship and your own causal DAG

  1. Draw a causal DAG from your own discipline or research interest with at least four variables.
  2. Identify one fork and one chain in your causal DAG.
  3. Swap with your partner. Your partner plays sceptic: challenge one arrow by proposing an alternative causal direction or an omitted common cause.
  4. Revise your causal DAG in response. State what changed and why.

Further reading

The identification assumptions and randomisation framework are treated in Hernán & Robins (2025) (chapters 1-2) and Bulbulia (2024a). See also Bulbulia (2024b).


Lab materials: Lab 2: Install R and Set Up Your IDE

Barrett, M. (2023). Ggdag: Analyze and create elegant directed acyclic graphs. https://github.com/malcolmbarrett/ggdag

Bulbulia, J. A. (2024a). Methods in causal inference part 1: Causal diagrams and confounding. Evolutionary Human Sciences, 6, e40. https://doi.org/10.1017/ehs.2024.35

Bulbulia, J. A. (2024b). Methods in causal inference part 4: Confounding in experiments. Evolutionary Human Sciences, 6, e43. https://doi.org/10.1017/ehs.2024.34

Dublin, T. D. (1955). 1954 poliomyelitis vaccine field trial: Plan, field operations, and follow-up observations. JAMA, 158(14), 1258–1265. https://doi.org/10.1001/jama.1955.02960140020003

Francis Jr., T. (1955). Evaluation of the 1954 poliomyelitis vaccine field trial: Further studies of results determining the effectiveness of poliomyelitis vaccine (salk) in preventing paralytic poliomyelitis. JAMA, 158(14), 1266–1270. https://doi.org/10.1001/jama.1955.02960140028004

Hernán, M. A., & Robins, J. M. (2025). Causal inference: What if. Chapman & Hall/CRC. https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/

Neurath, O. (1973). Anti-spengler. In M. Neurath & R. S. Cohen (Eds.), Empiricism and sociology (pp. 158–213). Springer Netherlands. https://doi.org/10.1007/978-94-010-2525-6_6

Salk, J. E. (1957). Poliomyelitis vaccination in the fall of 1956. American Journal of Public Health and the Nation’s Health, 47(1), 1–18. https://doi.org/10.2105/AJPH.47.1.1