Why Covariate Selection Is a Causal Decision
When a clinical trial uses external controls, the treatment groups may differ before treatment begins. A more severe disease state, for example, can influence which treatment a patient receives and can also predict the outcome. If it is not addressed, the observed outcome difference may combine a treatment effect with the consequences of that baseline imbalance. The key question is not simply which variables differ between groups. It is which variables must be controlled to support the causal comparison of interest.
A candidate covariate should be selected using clinical knowledge, the study timeline, and a causal structure such as the confounding diagram introduced in the earlier material on drawing a confounding diagram for external controls. Statistical associations can help describe the data, but they do not by themselves establish whether a variable is a confounder, a mediator, or a collider. Those roles have different consequences for adjustment.
In a directed acyclic graph (DAG), an arrow represents a direct causal effect under the graph’s assumptions. A common confounding pattern is \(A \leftarrow C \rightarrow Y\): the path from treatment to outcome through \(C\) is noncausal and is open unless \(C\) is controlled. The backdoor criterion describes a sufficient way to choose covariates: an adjustment set must block every path from \(A\) to \(Y\) that begins with an arrow into \(A\), and it must not include a descendant of \(A\). The criterion is evaluated against a scientifically credible graph, not selected mechanically from a list of observed correlations.
A variable is not a confounder merely because it predicts the outcome, differs between treatment groups, or is associated with treatment. A baseline prognostic factor that does not cause treatment assignment may still be useful for precision in some analyses, but it is not needed to close a backdoor path on that account alone. Conversely, a cause of treatment and outcome can matter even if its observed association with one of them is weak in a particular sample.
A Numerical Illustration of Confounding
Worked Example: Baseline Severity as a Confounder
Suppose a hypothetical comparison concerns a new therapy and 30-day mortality. Clinicians are more likely to give the therapy to patients with severe disease, and severity also raises mortality risk. Assume that the following mortality risks are observed within the two severity groups and that the values are compatible with the causal structure being considered.
| Severity | Therapy group: mortality risk | Control group: mortality risk |
|---|---|---|
| High | 0.30 | 0.40 |
| Low | 0.00 | 0.10 |
The therapy group is 80% high severity and 20% low severity. The control group is 20% high severity and 80% low severity. The crude risks are therefore
The crude comparison suggests 8 percentage points higher mortality with therapy. Yet within each severity group, the therapy-group risk is 10 percentage points lower: \(0.30-0.40=-0.10\) for high severity and \(0.00-0.10=-0.10\) for low severity. To compare the groups at the same severity mix, give each severity group equal weight:
This illustration is not evidence that therapy reduces mortality; it shows why severity is a defensible adjustment variable under the stated causal assumptions. Treatment selection and mortality both depend on baseline severity, so the crude contrast mixes treatment with differences in severity composition. The numerical comparison also assumes that both treatment groups can be meaningfully represented at both severity levels; if one group has no comparable patients in a stratum, adjustment cannot create that information.
Variables That Should Not Be Treated as Confounders
The most consequential selection errors arise from adjusting for variables that lie on the causal pathway or that are consequences of multiple causes. A mediator is affected by treatment and in turn affects the outcome. Adjusting for it can remove part of the total treatment effect. A collider is caused by two or more variables. Conditioning on it can create an association between its causes, opening a noncausal path that was previously closed. A variable measured after treatment begins is not automatically a mediator or collider, but its timing should trigger a careful causal review before it is considered for adjustment.
Worked Example: Why a Mediator Is Not a Baseline Confounder
Consider a hypothetical treatment that affects a biomarker, which then affects 30-day risk of an adverse outcome. Suppose treatment \(A\) is randomized, so it has no baseline confounding, and assume the following simple risk model:
where \(M\) is a post-treatment biomarker coded 1 for an elevated level and 0 otherwise. Suppose \(P(M=1\mid A=1)=0.75\) and \(P(M=1\mid A=0)=0.25\). The marginal risk under treatment is
The marginal risk under control is
The total risk difference in this model is \(0.30-0.10=0.20\), or 20 percentage points. At a fixed biomarker value, the treatment-associated risk difference in the model is only 0.10, or 10 percentage points. Conditioning on the biomarker therefore removes the part of the contrast carried through the treatment-to-biomarker-to-outcome pathway. If the target is the total effect, this is not an appropriate baseline adjustment. Estimating a direct effect is a different causal question and requires additional assumptions; it is not achieved simply by adding every post-treatment measurement to an adjustment model.
Worked Example: Conditioning on a Collider Can Create Bias
Suppose, hypothetically, that treatment \(A\) and an unmeasured risk factor \(U\) are independent, each with probability 0.50. Let a post-treatment hospital admission indicator \(C\) equal 1 whenever either \(A=1\) or \(U=1\). Let the outcome \(Y\) equal \(U\). The assumed graph includes \(A \rightarrow C \leftarrow U \rightarrow Y\), so \(C\) is a collider on the path from \(A\) to \(Y\).
Before conditioning on admission, independence gives
There is no association between treatment and outcome in this hypothetical setup. Among those with \(C=1\), however, a person with \(A=0\) must have \(U=1\), because admission occurs only if \(A=1\) or \(U=1\). Thus \(P(Y=1\mid A=0,C=1)=1\). Among those with \(A=1,C=1\), \(U\) remains equally likely to be 0 or 1, so \(P(Y=1\mid A=1,C=1)=0.50\). Conditioning on admission creates a risk difference of \(0.50-1=-0.50\), despite no treatment effect in the setup. This example shows why a strong association with treatment and outcome is not enough to justify adjustment: the variable’s causal role matters.
Justifying an Adjustment Set
The backdoor criterion has a direct causal justification. If a set \(C\) blocks all backdoor paths and the required causal assumptions hold, then treatment is independent of the potential outcome \(Y(a)\) within levels of \(C\). Here \(Y(a)\) denotes the outcome that would occur under treatment strategy \(a\). This conditional exchangeability assumption means that, after accounting for \(C\), the treated and untreated groups are comparable with respect to their potential outcomes. Under consistency and positivity, the outcome contrast within covariate levels can then be interpreted causally and combined over a specified target population.
The reasoning can be summarized in two steps. First, blocking the backdoor paths removes the modeled noncausal associations between \(A\) and \(Y\). Second, conditional exchangeability, consistency, and positivity permit observed outcomes under each strategy to represent the corresponding potential outcomes within covariate strata. In compact form, the identifying condition is
for treatment strategies and covariate strata relevant to the target population. These conditions are assumptions, not consequences of fitting a model. A correct-looking adjustment set cannot compensate for a clinically implausible diagram, inconsistent endpoint definitions, or a covariate measured differently across data sources.
State the treatment strategies, outcome, follow-up period, and population whose treatment effect is of interest. Covariate timing is defined relative to treatment initiation, not merely by the date a value entered a database.
Use clinical knowledge and study design to identify baseline factors that could affect both treatment choice and the outcome, such as disease severity, prior treatment, or comorbidity.
Ask whether it is a common cause, a mediator, a collider, a consequence of treatment, or simply a predictor. Record the reasoning and plausible alternative arrows.
Confirm that a selected variable refers to the same construct, time window, and coding in the trial and external data. Harmonization errors can leave residual confounding even when the variable name matches.
Ask whether each relevant covariate pattern occurs in both groups. If not, the data provide no direct comparison for that pattern, and an adjustment model relies on extrapolation rather than observed comparability.
Diagnostics, Alternatives, and Limits
The causal diagram is a structured argument, not a guarantee. Review it with clinicians who understand treatment decisions and outcome mechanisms. Check whether any proposed covariate is recorded after the treatment decision, is defined using future information, or could be affected by early symptoms or treatment. In external-control work, also examine whether the same clinical concept is measured similarly across cohorts and whether calendar time, eligibility, and time zero make the comparison coherent. A baseline label alone does not establish that a measurement precedes the relevant treatment decision.
Adjustment is only one approach to handling measured confounding. Matching, weighting, and outcome regression implement different ways to compare or model groups conditional on covariates; none can decide which variables are causally appropriate. Those procedures also cannot repair unmeasured confounding, incorrect measurement, or a lack of comparable patients. A parsimonious set that blocks the credible backdoor paths is generally more defensible than indiscriminately including every available variable. Adding a collider or mediator can introduce bias or change the estimand, and adding irrelevant variables can create instability or reduce usable information.
In a Bayesian analysis, the posterior distribution quantifies uncertainty conditional on the likelihood, prior, and causal assumptions used. It does not make an invalid adjustment set valid. If important confounders are unmeasured, or the causal graph is misspecified, a narrow posterior can still describe a biased treatment-effect estimate. The variable-selection argument and its limitations should therefore be reported alongside the estimated effect.
Check Your Understanding
For each question, identify the causal role that matters and explain the adjustment decision. Short solutions follow the questions.
- A pre-treatment measure of disease severity affects both treatment selection and mortality. Under a credible graph, should it generally be considered for adjustment?
- A biomarker is measured one week after treatment starts and lies on the pathway from treatment to outcome. What is the concern if the target is the total treatment effect?
- A variable is caused by treatment and by an unmeasured factor that also affects the outcome. Why can conditioning on it be harmful?
- A baseline variable predicts the outcome but, according to the clinical structure, does not affect treatment assignment or block a backdoor path. Is it automatically a confounder?
- Why can a Bayesian model with a precise posterior still provide a misleading causal estimate?
Solutions. (1) Yes. It is a plausible common cause, so controlling it may block the path from treatment through severity to outcome, subject to adequate measurement and comparability. (2) Adjustment may block part of the treatment effect transmitted through the biomarker; it does not serve as ordinary baseline confounding control for a total-effect estimand. (3) It is a collider. Conditioning can associate its causes and open a noncausal path to the outcome. (4) No. Outcome prediction alone does not make a variable a confounder, although other analytic goals may motivate its inclusion. (5) Posterior precision is conditional on the model and causal assumptions; it cannot correct unmeasured confounding, a misspecified graph, or an invalid adjustment set.