Why Draw a Causal Diagram?
A genetic association can reflect more than a causal effect of genotype on phenotype. For example, ancestry can influence genotype frequencies and can also be related to environmental exposures that affect the phenotype. The resulting association may therefore arise along a noncausal route. Adjusting for a suitable variable can block that route, but adjusting without considering the causal structure can introduce bias or change the effect being estimated.
A causal diagram makes these possible routes explicit. It is not a picture of correlations alone: each arrow represents a proposed direct causal influence, based on the scientific question and assumptions. The diagram helps identify what a proposed adjustment would block, and what it might open or remove.
For this tutorial, let \(A\) denote ancestry, \(G\) genotype, \(E\) an environmental exposure, and \(Y\) a phenotype. The roles of these variables depend on the question. In a genetic association question, genotype is often the exposure whose effect is of interest, and phenotype is the outcome. An environmental variable could be a cause of phenotype, a consequence of genotype, or a collider-related variable, depending on the causal model.
Backdoor Paths and Ancestry-Related Confounding
A path from genotype to phenotype is a backdoor path if its first arrow points into genotype. Such a path can create an association between \(G\) and \(Y\) without representing a causal effect of \(G\) on \(Y\). A common structure in population stratification is a shared cause: ancestry affects genotype frequencies and also affects the phenotype, directly or through environmental exposures.
In this diagram, the path \(G \leftarrow A \to E \to Y\) is a backdoor path. The two arrows from \(A\) make ancestry a common cause of genotype and the environmental route to phenotype. Conditioning on \(A\) blocks this path: once ancestry is held fixed, the fork through \(A\) no longer transmits an association between \(G\) and \(Y\). If the diagram includes other ancestry-related routes to \(Y\), adjusting only for \(E\) might not block all of them. The choice must follow the full proposed graph, not just one visible route.
The adjustment question is about a particular causal effect. For a total effect of genotype, a standard sufficient strategy is to adjust for variables that block all relevant backdoor paths without conditioning on descendants of genotype. This is not a guarantee that the diagram is correct or that the variables are measured well. It states what the adjustment would accomplish if the causal assumptions represented by the diagram were adequate.
Worked Example: Ancestry Creates a Pooled Association
Consider a hypothetical sample of 200 people from two ancestry groups, with 100 people in each group. Within each group, genotype has no effect on a binary phenotype: the phenotype risk is 0.10 in group \(A=0\) and 0.30 in group \(A=1\), for both genotype values. Genotype frequencies differ by ancestry: in \(A=0\), 20 people have \(G=1\) and 80 have \(G=0\); in \(A=1\), 80 have \(G=1\) and 20 have \(G=0\). The diagram includes \(A \to G\) and \(A \to Y\), with the latter possibly operating through \(E\).
In group \(A=0\), the expected observed counts are 2 phenotype cases among the 20 people with \(G=1\), and 8 cases among the 80 with \(G=0\). Both risks are 0.10. In group \(A=1\), the corresponding counts are 24 cases among 80 people with \(G=1\), and 6 among 20 with \(G=0\). Both risks are 0.30. Thus, within each ancestry group, the risk difference comparing \(G=1\) with \(G=0\) is \(0\).
Pooling the groups gives 26 cases among 100 people with \(G=1\), and 14 cases among 100 with \(G=0\). The pooled risks and their difference are
The pooled data show a 12-percentage-point risk difference even though the within-group differences are both zero. The diagram explains the discrepancy: ancestry is associated with genotype and phenotype, so the pooled comparison follows the backdoor path \(G \leftarrow A \to Y\). Comparing genotype groups within ancestry strata blocks that path in this example. This is a hypothetical illustration, not evidence about any real population.
What Conditioning Does to a Path
A useful way to read a DAG is to ask which paths remain open after conditioning on a proposed adjustment set. On a noncollider path, conditioning on an intermediate variable blocks the path. This applies to a chain, such as \(G \to E \to Y\), and to a fork, such as \(G \leftarrow A \to Y\). A collider behaves differently: without conditioning, the path through a collider is blocked; conditioning on the collider, or on certain descendants of it, can open the path.
These rules concern the path shown, not every possible path in a larger graph. An adjustment variable is useful only if it blocks the unwanted routes without opening other routes that connect genotype and phenotype. It is therefore not enough to label a variable a “confounder” in isolation; its position in the graph matters.
Worked Example: Conditioning on Selection Opens a Collider Path
Suppose a hypothetical source population contains 300 people. Genotype \(G\) and exposure \(E\) are independent binary variables, and each of the four \((G,E)\) combinations occurs 75 times. A person enters the analyzed sample, \(S=1\), if either \(G=1\) or \(E=1\). The outcome is determined by exposure: \(Y=E\), so genotype has no causal effect on \(Y\). The diagram is \(G \to S \leftarrow E \to Y\).
Selection removes only the 75 people with \(G=0,E=0\). Among the 225 selected people, the three remaining combinations each have 75 people: \((G=0,E=1)\), \((G=1,E=0)\), and \((G=1,E=1)\). Among selected people with \(G=0\), all 75 have \(E=1\), so the phenotype risk is \(75/75=1\). Among selected people with \(G=1\), 75 have \(E=1\) and 75 have \(E=0\), so the risk is \(75/150=0.50\).
The selected sample therefore has a large negative genotype–phenotype association, despite there being no genotype effect in the source population. Conditioning on selection \(S\), a collider caused by both \(G\) and \(E\), associates genotype with exposure. Since exposure causes phenotype, this induced association continues to \(Y\). The example shows why analyzing only participants who meet a selection rule can create bias if selection is a collider.
Adjustment Depends on the Effect You Want
An environmental variable is not automatically a confounder. If genotype affects an environmental exposure and that exposure affects phenotype, it is a mediator on a causal path from genotype to phenotype. Adjusting for it blocks that mediated path. For a total effect, that is overadjustment: the total effect includes both any direct effect and any effect transmitted through the mediator. A direct effect that excludes the mediated route is a different target and needs its own assumptions.
Worked Example: Adjusting for a Mediator Changes the Target
Imagine a hypothetical cohort with 100 people at each genotype value. Genotype influences an exposure \(E\): among \(G=0\), 20 people have \(E=1\) and 80 have \(E=0\); among \(G=1\), 80 have \(E=1\) and 20 have \(E=0\). The phenotype risk is 0.50 when \(E=1\) and 0.10 when \(E=0\), regardless of genotype. The diagram is \(G \to E \to Y\), with no other causes of \(G\) and \(Y\) in this simplified example.
For \(G=0\), the expected number of cases is \(20(0.50)+80(0.10)=10+8=18\), giving a risk of \(18/100=0.18\). For \(G=1\), it is \(80(0.50)+20(0.10)=40+2=42\), giving a risk of \(42/100=0.42\). The total risk difference is \(0.42-0.18=0.24\), or 24 percentage points.
Within each exposure level, however, the phenotype risks are equal across genotype values: both are 0.50 when \(E=1\), and both are 0.10 when \(E=0\). Adjusting for \(E\) therefore removes the association transmitted by \(G \to E \to Y\) and targets no remaining genotype effect in this constructed example. That does not mean the unadjusted total effect was spurious; the difference is entirely mediated by \(E\). This example is hypothetical and illustrates why the target effect must be specified before choosing adjustment variables.
A Practical Diagram-Based Decision Process
A disciplined adjustment decision can be made in a few explicit steps. The diagram is a causal hypothesis, not a result produced automatically by the data. Write down the scientific assumptions before interpreting an adjusted estimate.
State whether the question concerns the total genotype effect or a more restricted effect that excludes a mediated pathway. Identify the phenotype and the genotype contrast.
Include ancestry, environmental exposures, genotype, phenotype, and selection variables when relevant. Draw arrows only for proposed direct causal influences.
For each path from genotype to phenotype that begins with an arrow into genotype, identify the common causes or intermediate variables that keep it open.
Check whether it blocks a backdoor path, opens a collider path, or blocks a causal path that belongs to the target effect.
Explain which assumptions make the adjustment adequate, including whether the chosen variable captures the relevant confounding structure and whether selection may have affected the analyzed sample.
When an Adjustment Set Has a Causal Interpretation
For a discrete adjustment set \(C\), the usual standardization formula expresses the phenotype risk under genotype level \(g\) as a weighted average of risks within levels of \(C\):
Here, \(do(G=g)\) denotes setting genotype to level \(g\) in the causal model, and the sum ranges over the levels \(c\) of \(C\). Interpreting this formula causally requires, among other conditions, that \(C\) blocks the relevant backdoor paths, that the compared genotype levels are possible within the relevant \(C\) strata (positivity), and that the observed variables represent the causal variables as intended. The formula is not justified merely because an analysis includes several covariates. In genetics, ancestry may be represented imperfectly, and unmeasured structure or selection can leave paths open. The diagram makes those assumptions visible; it cannot verify them by itself.
Common Mistakes
- Adjusting for every predictor. A variable that predicts phenotype is not necessarily a confounder. If it is a collider or a mediator, conditioning on it can create bias or change the target effect.
- Treating ancestry as a single, perfectly measured cause. A diagram may show \(A\) as one node for clarity, but a measured ancestry label may not capture all relevant structure. The adjustment is only as adequate as the assumptions and measurements allow.
- Assuming stratification always solves confounding. Comparisons within ancestry strata block only the paths actually blocked by the chosen strata. Other common causes, measurement limitations, or selection mechanisms may remain.
- Calling every adjusted association a direct effect. Adjustment for a mediator can remove a mediated route, but interpreting the remaining contrast as a direct causal effect requires additional assumptions.
- Ignoring who entered the analysis. If participation or inclusion is caused by genotype-related and phenotype-related factors, conditioning on the analyzed sample can open a collider path.
Check Your Understanding
For each question, use the arrows and paths in the stated diagram to explain your reasoning.
- In \(A \to G\) and \(A \to Y\), what backdoor path connects genotype and phenotype, and what does conditioning on \(A\) do to that path?
- In \(G \to S \leftarrow E \to Y\), why can restricting analysis to \(S=1\) create a genotype–phenotype association?
- If the target is the total effect and the diagram is \(G \to E \to Y\), what part of the effect is removed by adjusting for \(E\)?
- Why is a variable's predictive association with phenotype not, by itself, enough reason to adjust for it?
- Name two assumptions or limitations that should be considered when ancestry is used to control confounding.