| L | A | n | Deaths (Y=1) | Pr[Y=1 | A, L] |
|---|---|---|---|---|
| 0 (female) | 0 (untreated) | 8 | 0 | 0.0 |
| 1 (male) | 0 (untreated) | 2 | 1 | 0.5 |
| 0 (female) | 1 (treated) | 2 | 0 | 0.0 |
| 1 (male) | 1 (treated) | 8 | 4 | 0.5 |
In Chapter 6 we described causal diagrams and showed how to read independence relations from them using d-separation. We also identified three structural sources of bias—confounding, selection bias, and measurement bias—and introduced the backdoor criterion as the graphical condition for eliminating confounding. This chapter examines confounding in greater depth. We show that confounding is equivalent to the absence of marginal exchangeability, characterize it through the structure of the causal diagram, and relate the structural (graphical) definition to the traditional epidemiological criteria for identifying confounders. We close with an introduction to Single-World Intervention Graphs (SWIGs), which embed counterfactual variables directly in a causal diagram.
In a marginally randomized experiment (Chapter 2), the treated and untreated groups have the same distribution of potential outcomes because treatment was assigned independently of any pre-existing characteristics. As a result, the crude association between treatment \(A\) and outcome \(Y\) equals the average causal effect:
\[\Pr[Y = 1 \mid A = 1] - \Pr[Y = 1 \mid A = 0] = \Pr[Y^{a=1} = 1] - \Pr[Y^{a=0} = 1]\]
In an observational study, however, the distribution of pre-existing characteristics typically differs between the treated and untreated. If some of those characteristics affect the outcome, the crude association will not equal the causal effect. This discrepancy is confounding.
Consider a hypothetical observational study of the causal effect of a cholesterol-lowering drug (\(A\): 1 = treated, 0 = untreated) on 5-year mortality (\(Y\): 1 = died, 0 = survived), where sex (\(L\): 1 = male, 0 = female) affects both treatment assignment and mortality. The hypothetical data for 20 individuals are shown below.
| L | A | n | Deaths (Y=1) | Pr[Y=1 | A, L] |
|---|---|---|---|---|
| 0 (female) | 0 (untreated) | 8 | 0 | 0.0 |
| 1 (male) | 0 (untreated) | 2 | 1 | 0.5 |
| 0 (female) | 1 (treated) | 2 | 0 | 0.0 |
| 1 (male) | 1 (treated) | 8 | 4 | 0.5 |
Within each sex stratum, the mortality rate is the same for treated and untreated individuals:
\[\Pr[Y = 1 \mid A = 1, L = 1] = \Pr[Y = 1 \mid A = 0, L = 1] = 0.50\] \[\Pr[Y = 1 \mid A = 1, L = 0] = \Pr[Y = 1 \mid A = 0, L = 0] = 0.00\]
Within strata of \(L\), the association equals the causal effect (null). But the crude (marginal) association is non-null:
\[\Pr[Y = 1 \mid A = 1] = \tfrac{4}{10} = 0.40 \neq \Pr[Y = 1 \mid A = 0] = \tfrac{1}{10} = 0.10\]
The crude risk difference of \(0.30\) is entirely due to confounding: males are more frequently treated (\(8/10\)) and have higher baseline mortality (\(0.50\)) than females.
In the causal diagram framework, confounding arises when there is an open backdoor path from \(A\) to \(Y\). In the example above, sex \(L\) is a common cause of treatment \(A\) and mortality \(Y\):
The path \(A \leftarrow L \rightarrow Y\) is a backdoor path from \(A\) to \(Y\). Because \(L\) is a non-collider on this path and has not been conditioned on, the path is open. Confounding bias exists whenever at least one backdoor path from \(A\) to \(Y\) is open.
Definition 1 (Confounding (Structural Definition)) Confounding of the effect of \(A\) on \(Y\) is present when the observed (crude) association between \(A\) and \(Y\) differs from the causal effect of \(A\) on \(Y\):
\[\Pr[Y = 1 \mid A = 1] - \Pr[Y = 1 \mid A = 0] \neq \Pr[Y^{a=1} = 1] - \Pr[Y^{a=0} = 1]\]
In structural terms, confounding exists when there is at least one open backdoor path from \(A\) to \(Y\) in the causal diagram.
Confounding is mathematically equivalent to the failure of marginal exchangeability. Recall from Chapter 2 that marginal exchangeability holds when:
\[Y^a \perp\!\!\!\perp A \quad \text{for all } a\]
This means the treated and untreated groups have the same distribution of potential outcomes: \(\Pr[Y^a = 1 \mid A = 1] = \Pr[Y^a = 1 \mid A = 0] = \Pr[Y^a = 1]\).
When marginal exchangeability holds, association equals causation:
\[\Pr[Y = 1 \mid A = 1] - \Pr[Y = 1 \mid A = 0] = \Pr[Y^{a=1} = 1] - \Pr[Y^{a=0} = 1]\]
No confounding is equivalent to marginal exchangeability. When confounding is present, marginal exchangeability fails: \(Y^a \not\perp\!\!\!\perp A\), and the treated and untreated differ in their potential outcomes.
Even when marginal exchangeability fails, we can often achieve conditional exchangeability by adjusting for the measured confounders \(L\):
\[Y^a \perp\!\!\!\perp A \mid L \quad \text{for all } a\]
This means that within each stratum of \(L\), the treated and untreated are exchangeable. In the drug example:
Under conditional exchangeability and positivity, the standardization (g-formula) identifies the causal effect:
\[\Pr[Y^{a} = 1] = \sum_l \Pr[Y = 1 \mid A = a, L = l] \, \Pr[L = l]\]
Applying standardization to the data in Table 7.1:
\[\Pr[Y^{a=1} = 1] = 0.50 \times 0.50 + 0.00 \times 0.50 = 0.25\] \[\Pr[Y^{a=0} = 1] = 0.50 \times 0.50 + 0.00 \times 0.50 = 0.25\]
The standardized risk difference is zero, correctly recovering the null causal effect.
The backdoor criterion (Chapter 6) provides a graphical condition for identifying sets of variables \(L\) that suffice to eliminate confounding by adjustment.
Definition 2 (Backdoor Criterion) A set of variables \(L\) satisfies the backdoor criterion for the effect of \(A\) on \(Y\) in a causal diagram if:
When \(L\) satisfies the backdoor criterion, adjusting for \(L\) (via standardization, IP weighting, or regression) eliminates confounding and identifies the average causal effect.
Different causal structures imply different sets of variables that satisfy the backdoor criterion.
Structure I (\(L \to A\), \(L \to Y\), \(A \to Y\)):
Structure II (\(U \to L \to A\), \(U \to Y\), \(L \to Y\), \(A \to Y\), \(U\) unmeasured):
Structure III (\(U \to A\), \(U \to Y\), \(L \to A\), \(L \to Y\), \(A \to Y\), \(U\) unmeasured):
When the only common cause of \(A\) and \(Y\) is an unmeasured variable \(U\) (shown in gray), there is no measured set that satisfies the backdoor criterion. Standard adjustment methods cannot identify the causal effect without additional assumptions (e.g., instrumental variables, Chapter 16).
Fine Point 7.1: Do Not Adjust for Descendants of Treatment
A fundamental rule for constructing valid adjustment sets is: never include a descendant of treatment \(A\) in the adjustment set.
Why not? There are two distinct ways that adjusting for a post-treatment variable \(C\) (a descendant of \(A\)) can introduce bias:
Blocking part of the causal effect: If \(A \to C \to Y\) (so \(C\) is a mediator), conditioning on \(C\) removes part of the causal effect we are trying to estimate. We would estimate only the direct effect \(A \to Y\), not the total effect through \(C\).
Collider stratification bias: If \(A \to C \leftarrow U\) and \(U \to Y\) (so \(C\) is a collider on the path \(A \to C \leftarrow U \to Y\)), conditioning on \(C\) opens this previously blocked path and introduces a spurious association between \(A\) and \(Y\) via \(U\), even if \(U\) is unmeasured.
The second scenario is particularly insidious because the bias may not be obvious without drawing the causal diagram. The practical implication: when selecting variables to include in the adjustment set, first verify using the causal diagram that no candidate variable is a descendant of \(A\).
The term confounder is commonly used in epidemiology to refer to a variable that should be adjusted for to eliminate confounding. However, the traditional criteria used to identify confounders differ from the structural (DAG-based) definition—and the two do not always agree.
In the traditional approach, a variable \(C\) is labeled a confounder of the \(A\)–\(Y\) association if it satisfies three criteria:
These criteria are assessed from the data (criteria 1 and 2) and from prior knowledge (criterion 3).
The traditional criteria have two important limitations:
Problem 1: A variable can satisfy all three criteria without being a structural confounder.
If \(C\) is a collider on a non-causal path between \(A\) and \(Y\) (e.g., \(A \to C \leftarrow Y\)), then \(C\) may be associated with both \(A\) and \(Y\) in some data sets yet is not on any backdoor path. Including \(C\) in the adjustment set could introduce collider stratification bias rather than removing confounding.
Problem 2: A structural confounder may fail one of the traditional criteria.
A variable \(L\) that opens a backdoor path from \(A\) to \(Y\) might fail criterion 1 (not associated with \(A\) in the data) if its effects on \(A\) and \(Y\) cancel in a specific population. In that population, adjusting for \(L\) is still required to eliminate structural confounding, but the traditional criteria would not flag it as a confounder.
Definition 3 (Structural Confounder vs. Traditional Confounder) A variable \(L\) is a structural confounder of the effect of \(A\) on \(Y\) if it opens at least one backdoor path from \(A\) to \(Y\) in the causal diagram. The structural definition depends on the causal structure, not on observed associations.
The traditional epidemiological definition of confounder depends on observed associations (criteria 1 and 2) and may disagree with the structural definition in specific populations.
Best practice: Use the causal diagram (DAG) to identify the structural confounders and the appropriate adjustment set via the backdoor criterion.
Fine Point 7.2: Limitations of Association-Based Confounder Criteria
The traditional association-based criteria for confounding are population-dependent: a variable \(L\) may satisfy criteria 1 and 2 in one population but not in another, even though the causal structure is identical. This means the decision about whether \(L\) is a “confounder” depends on the study population, not on the underlying causal mechanism.
In contrast, the structural (DAG-based) definition is population-independent: if \(L\) opens a backdoor path in the causal diagram, it is a structural confounder regardless of the population distribution.
This distinction has practical implications. When planning a study, one should identify the structural confounders using subject-matter knowledge and causal diagrams—not by testing associations in the current dataset. Adjusting for structural confounders is necessary to eliminate confounding bias across all populations satisfying the assumed causal structure.
The causal diagrams introduced in Chapter 6 represent relationships among observed variables (\(A\), \(L\), \(Y\), etc.). They do not directly represent counterfactual variables (\(Y^a\), \(L^a\), etc.). Single-World Intervention Graphs (SWIGs), developed by Richardson and Robins (2014), extend causal diagrams to include counterfactual variables explicitly.
A SWIG for the intervention \(A = a\) is obtained from the original causal diagram by the following operation:
The key result is that in the SWIG, counterfactual independence can be read off using d-separation, just as ordinary independence is read from a standard DAG.
Example 1 (SWIG for the Standard Confounding Structure) Consider the original DAG: \(L \to A \to Y\), \(L \to Y\).
The SWIG for the intervention \(do(A = a)\) has nodes \(\{L,\; a \mid A,\; Y^a\}\):
In the SWIG, the counterfactual \(Y^a\) is d-separated from the natural value \(A\) given \(L\), because the only path from \(A\) to \(Y^a\) would go through \(a\), but \(A\) and \(a\) are split. This d-separation corresponds directly to the conditional exchangeability condition:
\[Y^a \perp\!\!\!\perp A \mid L\]
SWIGs thus provide a graphical proof of conditional exchangeability whenever \(L\) satisfies the backdoor criterion.
Standard DAGs allow us to determine which variables to adjust for (via the backdoor criterion) but cannot directly show that \(Y^a \perp\!\!\!\perp A \mid L\), because \(Y^a\) is not a node in the DAG. SWIGs resolve this by making counterfactual variables explicit:
This chapter examined confounding in depth, providing both an intuitive numerical example and a formal structural definition.
Key concepts:
Confounding is present when the crude (marginal) association between \(A\) and \(Y\) differs from the average causal effect. Structurally, confounding exists when at least one backdoor path from \(A\) to \(Y\) is open.
Confounding = lack of marginal exchangeability: \(Y^a \not\perp\!\!\!\perp A\). The treated and untreated groups have different distributions of potential outcomes.
Conditional exchangeability (\(Y^a \perp\!\!\!\perp A \mid L\)) can restore identifiability when \(L\) satisfies the backdoor criterion. Under conditional exchangeability and positivity, the causal effect is identified by standardization.
The backdoor criterion provides a graphical sufficient condition for valid adjustment. A set \(L\) satisfies the criterion if it (i) contains no descendants of \(A\) and (ii) blocks all backdoor paths from \(A\) to \(Y\).
Structural vs. traditional confounders: The traditional association-based criteria for confounders can disagree with the structural (DAG-based) definition—either flagging colliders as confounders (causing harm from adjustment) or missing structural confounders. The DAG approach is preferred.
SWIGs embed counterfactual variables in a causal diagram and provide a graphical proof of conditional exchangeability whenever the backdoor criterion is satisfied.