Why Draw a Selection Diagram?
A polygenic score can predict a phenotype in one sample and perform differently in another. The difference may reflect real changes in the target population, but it can also arise because covariates are distributed differently or because study participation depends on variables related to the score and phenotype. A directed acyclic graph (DAG) makes the assumed relationships explicit and helps identify which paths are affected by conditioning on covariates or inclusion in a study.
A DAG does not establish that its arrows are true. It is a compact statement of assumptions about how variables are related, often informed by subject-matter knowledge and the study design. Its value is diagnostic: it shows what would follow if those assumptions were reasonable.
In this tutorial, \(S\) denotes a polygenic score, \(Y\) a phenotype, \(C\) measured covariates, and \(R\) study participation. We may also draw \(G\) for genetic variants contributing to the score and phenotype, \(A\) for ancestry or population structure, and \(U\) for other causes not fully measured. The nodes and arrows should be chosen for the scientific question; there is no single DAG that applies to every genetic prediction study.
Reading Arrows and Paths
An arrow from \(G\) to \(S\) can represent that the score is calculated from genetic variants. An arrow from \(G\) to \(Y\) can represent effects of those variants on the phenotype. This does not mean that intervening on the numerical score itself would change the phenotype: the score is a summary of genetic information, not generally a manipulable cause. A score can predict \(Y\) because it captures genetic variation related to \(Y\), even when the graph does not contain an arrow \(S \to Y\).
A path is a sequence of connected arrows, followed either along or against their directions. A path is open or closed relative to the variables on which we condition. A non-collider on a path—such as the middle node in a chain \(A \to B \to C\), or a fork \(A \leftarrow B \to C\)—blocks that path when conditioned on. A collider, where two arrowheads meet as in \(A \to B \leftarrow C\), blocks the path unless we condition on the collider or one of its descendants; conditioning can then open the path.
For example, \(A \to S\) and \(A \to Y\) form a fork. If ancestry \(A\) is a common cause of score variation and phenotype differences, this path can contribute to an observed score–phenotype association. Conditioning on an adequate measure of \(A\) blocks that path. By contrast, in \(S \to R \leftarrow Y\), participation \(R\) is a collider. Restricting analysis to \(R=1\) can open a path between \(S\) and \(Y\), even if they are independent in the target population.
Worked Example: A Shared Cause of Score and Phenotype
Suppose, hypothetically, that a standardized ancestry contrast \(A\) is related to both a score \(S\) and a phenotype \(Y\). Consider the simple model \(S=0.4A+\varepsilon_S\) and \(Y=2A+\varepsilon_Y\), where \(A\), \(\varepsilon_S\), and \(\varepsilon_Y\) are mutually independent, each has mean zero, and \(\operatorname{Var}(A)=1\). Let the error terms also be independent of one another. The graph contains \(A \to S\) and \(A \to Y\), but no direct score-to-phenotype arrow.
In the target population, the covariance is
The covariance is \(0.8\) score-standard-deviation units times phenotype units. It arises entirely from the common cause \(A\): the cross-covariances involving the independent errors are zero. Within levels of \(A\), the residuals are independent, so the conditional covariance is zero. Thus, this hypothetical marginal prediction signal would not be evidence that the score has an independent relationship with the phenotype after accounting for \(A\). In an actual study, whether ancestry adjustment is adequate depends on how well the relevant population structure is measured and modeled.
Conditioning on Participation
Study participation is often represented by \(R\), with \(R=1\) for individuals included in the analysis. The graph matters because selection can depend on the score, the phenotype, or causes of either. If participation is influenced by both \(S\) and \(Y\), the structure \(S \to R \leftarrow Y\) makes \(R\) a collider. The association observed after restricting to participants can therefore differ from the association in the target population.
The probability law makes the distinction explicit. For discrete \(Y\), provided the denominator is positive,
For continuous \(Y\), the corresponding expression uses conditional densities, not point probabilities. If the normalizing integral is positive, then
These expressions show that the participant distribution weights the target distribution according to the participation probability. If participation depends on \(Y\) differently at different values of \(S\), the score–phenotype relationship can change. If selection probabilities vary only with \(Y\), the distribution of \(Y\) among participants can still change substantially; the resulting effect on a prediction measure depends on the measure and model being used.
Worked Example: A Collider Creates an Association
Consider hypothetical binary variables \(S\) and \(Y\), each equal to 0 or 1, and assume they are independent in the target population, with probability \(0.5\) for each value. Suppose study participation is more likely when their values match: \(P(R=1\mid S=Y)=0.9\) and \(P(R=1\mid S\ne Y)=0.1\). Before selection, \(P(Y=1\mid S=1)=P(Y=1\mid S=0)=0.5\), so the score indicator does not predict the phenotype.
For each of the four \((S,Y)\) combinations, the target joint probability is \(0.25\). After weighting by participation, the unnormalized probabilities are \(0.225\) for each matching pair and \(0.025\) for each nonmatching pair. Their total is \(0.5\), so among participants the probabilities for \((1,1)\) and \((0,0)\) are each \(0.45\), and those for \((1,0)\) and \((0,1)\) are each \(0.05\). Therefore,
The participant-only risk difference is \(0.90-0.10=0.80\), although the target-population risk difference is \(0.50-0.50=0\). The graph \(S \to R \leftarrow Y\) explains how restricting to participants can create an association. The numerical example demonstrates a possibility, not a claim that every selected genetic study has this pattern.
Covariates Can Block or Open Paths
A covariate is not automatically a variable that should be adjusted for. Its role in the graph matters. If \(C\) is a common cause of \(S\) and \(Y\), as in \(S \leftarrow C \to Y\), conditioning on \(C\) blocks that backdoor path. If \(C\) is instead a mediator on a path \(S \to C \to Y\), conditioning on it blocks part of that path. The adjusted relationship then answers a different question from the unadjusted relationship. In prediction, adjustment may be useful for a specified prediction target, but it should not be described as removing bias without clarifying the target and assumptions.
Conditioning can also open a collider path. For example, if \(S \to C \leftarrow U \to Y\), then \(C\) is a collider on the path between \(S\) and \(U\). Conditioning on \(C\) opens that path, which can transmit association from \(S\) to \(Y\) through \(U\). An adjustment set should therefore be assessed against the full set of plausible paths, not chosen solely because its variables predict the outcome.
Worked Example: Adjustment Blocks a Common-Cause Path
Suppose, hypothetically, that a measured clinical covariate \(C\) causes both score-related variation and the phenotype, with \(S=0.5C+\varepsilon_S\) and \(Y=3C+\varepsilon_Y\). Let \(C\) and the two errors be independent with mean zero, \(\operatorname{Var}(C)=1\), and \(\operatorname{Cov}(\varepsilon_S,\varepsilon_Y)=0\). The errors are also independent of \(C\). The graph is \(S \leftarrow C \to Y\).
The marginal covariance is
After conditioning on \(C\), the residuals are \(\varepsilon_S\) and \(\varepsilon_Y\), whose covariance is zero by assumption. In this model, adjustment blocks the common-cause path and removes the marginal covariance. This conclusion depends on the stated model: if \(C\) were measured with substantial error, or if other open paths remained, conditioning on recorded \(C\) need not remove the observed association.
A Practical Path-Tracing Workflow
A diagram is most useful when it is drawn for a clearly defined target population and prediction question. Use a systematic sequence rather than adding arrows after seeing a surprising result.
Specify the population in which prediction is intended, the phenotype \(Y\), the score \(S\), relevant covariates \(C\), and the participation indicator \(R\).
Include genetic inputs to the score, causes of the phenotype, shared causes such as ancestry or clinical factors, and causes of participation. Label assumptions clearly.
Record whether the analysis conditions on covariates, participation, or both. A participant-only analysis conditions on \(R=1\), even if participation is not included as a regression predictor.
Identify open common-cause paths, paths blocked by adjustment, and collider paths opened by conditioning. State which paths remain under the proposed analysis.
Describe the score–phenotype relationship in the analyzed sample and explain whether the graph supports carrying that relationship to the target population. A DAG alone does not establish transportability.
Interpretation and Limits
A selection diagram separates three questions that are easy to conflate: what predicts the phenotype in the target population, what predicts it among participants, and whether the score itself has a causal effect. The first two are distributional prediction questions. The third is a causal question and generally cannot be answered by treating a computed polygenic score as if it were an intervention.
The arrows are assumptions, not estimated facts. An omitted common cause can leave a path open even when the drawn graph suggests independence. A coarse covariate may not adequately represent the construct it is intended to control, and different plausible diagrams can imply different consequences of adjustment. DAGs help expose these assumptions; they do not replace study-design knowledge or empirical checks.
- Do not read an arrow as a measured association. It states an assumed direct causal relation, not its magnitude or certainty.
- Do not assume adjustment is always beneficial. It can block a common-cause path, block a mediated path, or open a collider path.
- Do not treat participant results as automatically representative. Conditioning on \(R=1\) can change the score–phenotype distribution.
- Do not infer causation from prediction. A score can predict through shared causes or genetic inputs without being a manipulable cause.
Check Your Understanding
For each question, identify the relevant path or assumption and explain your reasoning.
- In \(S \leftarrow A \to Y\), what role does \(A\) play, and what does conditioning on \(A\) do to this path?
- Suppose study participation is represented by \(S \to R \leftarrow Y\). Why can restricting analysis to \(R=1\) produce an association between \(S\) and \(Y\)?
- In \(S \to C \to Y\), what can happen to the score–phenotype relationship when analysis conditions on \(C\)?
- Why does an arrow \(G \to S\) together with \(G \to Y\) not establish that changing the numerical score would change the phenotype?
- For a continuous phenotype, why is a selection formula based on \(P(Y=y\mid S=s)\) and a sum over \(y\) inappropriate, and what replaces it?