Causal Foundations intermediate 8 min read 8 flashcards

DAGs, Confounders and Colliders

A causal graph turns "which variables should I control for" into a question with a mechanical answer, and shows why conditioning on the wrong variable creates bias rather than removing it.

The standard advice is to control for everything you can measure. It is wrong, and the graph shows exactly why. Some variables must be conditioned on to remove bias, some must not be conditioned on because doing so creates bias, and telling them apart requires knowing the causal structure, which no amount of data reveals on its own.

A directed acyclic graph encodes assumptions: an arrow \(X \to Y\) says \(X\) is a direct cause of \(Y\). The graph is not learned from the data; it is a statement of subject-matter belief, and its value is that it makes that belief checkable and its implications computable (Pearl, 2009, Causality, 2nd ed.).

Three structures, three behaviours

Every path between two variables is built from three junction types, and each behaves differently under conditioning.

Chain: \(X \to M \to Y\). \(M\) is a mediator. The path is open, so \(X\) and \(Y\) are associated; conditioning on \(M\) blocks it. If you control for a mediator while estimating a total effect, you remove exactly the part of the effect you were trying to measure.

Fork: \(X \leftarrow C \to Y\). \(C\) is a confounder. The path is open and creates association between \(X\) and \(Y\) with no causal link between them; conditioning on \(C\) blocks it. This is the case the standard advice has in mind.

Collider: \(X \to C \leftarrow Y\). The path is closed by default, so \(X\) and \(Y\) are unassociated through it. Conditioning on \(C\), or on any descendant of \(C\), opens it and creates a spurious association.

The collider is the one that reverses the intuition. If two independent causes both influence an outcome and you look only at cases where the outcome occurred, learning that one cause was absent implies the other was present. Restricting to hospitalised patients, to users who converted, or to accepted applicants is conditioning on a collider, and the resulting correlations are manufactured by the selection.

The backdoor criterion

A set \(Z\) is sufficient to identify the effect of \(X\) on \(Y\) if it blocks every path from \(X\) to \(Y\) that begins with an arrow into \(X\) (the backdoor paths), and contains no descendant of \(X\). Given a graph, checking this is mechanical, and software does it.

Two consequences are worth stating plainly. Adjusting for more variables is not safer: adding a collider to the adjustment set introduces bias that was not there. And a variable can be a confounder in one graph and a collider in another with the same variables, so "is age a confounder here?" has no answer without the structure.

Bad controls

Several common adjustments are actively harmful.

Controlling for a mediator when the total effect is the target removes the indirect path. Controlling for a descendant of the outcome conditions on a collider. Controlling for a variable that is a cause of treatment only (an instrument) does not reduce bias, amplifies any residual bias from unmeasured confounding, and inflates variance. Controlling for a post-treatment variable in an experiment discards the randomisation.

The default of "throw everything in the regression" produces all four.

When it breaks

The graph is an assumption, and it is the strongest one you make. Two analysts with different graphs get different adjustment sets and different answers from identical data, and the data cannot adjudicate. Causal discovery algorithms recover only an equivalence class of graphs, and that class is often large.

Unmeasured confounding is invisible on the graph you drew. The backdoor criterion is satisfied relative to the assumed structure. A confounder you did not draw is not detected; it is simply absent from the analysis. Sensitivity analysis, asking how strong an unmeasured confounder would have to be to overturn the conclusion, is the standard response and belongs in any observational report.

Selection into the sample is a collider you cannot condition away. If the population you observe was filtered by something the treatment and outcome both affect, the bias is baked into the dataset before any analysis, and no adjustment set repairs it.

Blocking a path is not the same as estimating the effect well. Satisfying the backdoor criterion gives identification, meaning the effect is a function of observable distributions. Estimating that function still requires overlap, correct functional form or a flexible estimator, and enough data, none of which the graph addresses.

Check yourself

8 flashcards for this concept

Click a card to reveal the answer.

Drill the whole track