Chapter 2 Causal inference: Counterfactuals and DAGs
2.1 Counterfactual reasoning
2.2.1 DAGs: Basic components
DAGs represent a cause as an arrow between two nodes. A node may represent a concept or a variable (measured or unmeasured). Arrows are referred to as ‘directed edges’ and may have only one head – they must be uni-directional. The most basic causal structure a DAG can represent is a cause and effect as depicted in Figure 2-1. This DAG (and all others in this thesis) was constructed using the freely available online tool DAGitty (Textor et al., 2011, Textor et al., 2016). The directed edge starting at X and terminating at Y determines that X causes Y. Or, according to Pearl’s
definition of cause, X causes Y because Y in some way relies on X for its value – the value of Y differs according to changes in X. Or in a counterfactual sense, assuming a perfectly designed and executed RCT on a treatment group and a control group, if the treatment group had been assigned a value of X and the control group had been assigned its comparator, the value of Y for either group would correspond to the potential outcome for the other, and these potential outcomes are different.
Figure 2-1: Cause and effect
In an observational study, X could be an exposure and Y could be an outcome. For example, the statement that alcohol consumption causes liver cirrhosis would take the following form in a DAG:
Figure 2-2: Alcohol consumption causes liver cirrhosis
This DAG would be interpreted as follows:
1. The value of the liver cirrhosis variable (e.g. binary) relies on the value of the alcohol consumption variable (e.g. instances of heavy episodic drinking on average month). 2. Because there are no other nodes or directed edges, no other variables which have a direct
influence on both alcohol consumption or liver cirrhosis exist.
Of course, DAGs in an applied setting are unlikely to be this simple. A small addition that adds a notable degree of complication is a mediator. For example, in Figure 2-3 alcohol consumption mediates the effect of age on liver cirrhosis.
19 Figure 2-3: Alcohol consumption mediates the effect of age on liver cirrhosis
This diagram encodes twice as many assumptions as the previous: 1. Alcohol consumption is influenced by age.
2. Liver cirrhosis is influenced by alcohol consumption.
3. Liver cirrhosis is not influenced by age other than indirectly through alcohol consumption. 4. No other variables which effect age, alcohol consumption or liver cirrhosis exist.
Note also that, because of the temporality discussed above (i.e. that cause must precede effect), Figure 2-3 describes a person’s age at time t1, their alcohol consumption at time t2, and their liver cirrhosis at time t3.
Mediation is a very appealing notion in Public Health, especially regarding exposures that are not readily modifiable such as age, ethnicity, sex, sexuality, parental social class, historical events, etc. In the example of age → alcohol consumption → liver cirrhosis, one would not expect that researchers would consider changing the age of individuals or the age distribution of the population as a
practicable intervention for liver cirrhosis. Rather, they might consider alcohol consumption as the more viable intervention site. Similarly, if in any given setting females were at characteristic risk of alcohol harm, researchers would not look towards changing the sex of individuals or the distribution of sex in that population, but rather one of the mediators of sex’s effect on alcohol harm (e.g. gendered advertising). Of course, there are likely to be very few instances in applied Public Health research in which the relationship between an exposure and an outcome will be fully captured by a single mediator. Figure 2-4 below is apparently quite simple, but what the directed edge between age and liver cirrhosis suggests is that everything else that happens between t1 and t3, excluding alcohol consumption, can also mediate the effect of age (e.g. hepatitis or non-alcoholic fatty liver disease). This is called the direct effect – everything between the exposure and outcome that does not go through the mediator. Mediation thus recalls the multicausality and component causation concepts introduced above – there is a pool of components involved in the outcome, and the same outcome can be observed in individuals with different sub-sets of this pool of components. Thus, a successful intervention on alcohol consumption would only remove part of the effect of age on liver cirrhosis.
20 Figure 2-4: Age influences liver cirrhosis via alcohol consumption, and otherwise
Confounding bias is a concern which is perhaps more ubiquitous than questions of mediation. Traditionally, a confounder is thought of as a variable which would bias estimates of the exposure’s effect on the outcome because it is related to both the outcome and exposure in some way, while the potential outcomes framework defines a confounder as a mutual cause of an exposure and an outcome (Morgan and Winship, 2007). In a DAG, this equates to a variable with directed edges going to both the exposure and the outcome, as represented in Figure 2-5.
Figure 2-5: A confounder
This DAG encodes the following assumptions: 1. The outcome is influenced by the exposure. 2. The outcome is influenced by the confounder. 3. The exposure is influenced by the confounder.
4. The effect of the confounder on the outcome may also be via the exposure. 5. No other variables that influence the outcome, exposure or confounder exist.
Accordingly, this DAG suggests that the confounder should be adjusted for to estimate the effect of the exposure on the outcome. The DAGitty programme allows researchers to select the exposure of interest and the outcome. It will then search for and identify confounders using a ruleset that is described in some detail below. Figure 2-6 demonstrates this using the same diagram as Figure 2-5 above. The exposure node is yellow with a triangle and the outcome node is blue with a vertical bar. This tells DAGitty that we are interested in estimating the effect corresponding to the directed edge from the exposure to the outcome, which is now shaded green. DAGitty can then identify
21 surmises that the confounder must be controlled or otherwise conditioned to allow for an accurate estimate of the effect of the exposure on the outcome.
Figure 2-6: A confounder in DAGitty
Figure 2-7 below shows that how we interpret a DAG for the purposes of analysis, and thus how we decide what variables to control for, depends on our research question even under identical
assumptions encoded by that DAG.
(a)
(b)
Figure 2-7: Different question, same causal assumptions, different analysis
Figure 2-7(a) indicates that age should be adjusted when estimating the effect of alcohol consumption on liver cirrhosis because it is a confounder. Conversely, Figure 2-7(b) indicates that alcohol
consumption should not be adjusted when estimating the effect of age of liver cirrhosis because it is a mediator (intuitively, adjusting for alcohol consumption in this example would remove part of the effect of interest, specifically from age to liver cirrhosis via alcohol consumption). Thus, despite how the assumptions in these two diagrams are identical, the resulting statistical models would be very different. This may appear platitudinous, but it is an important idea when applying DAGs, as is made clear in Chapter 8’s analysis. It is also helpful to note at this stage that DAGitty allows researchers to set variables to ‘adjusted’. In Figure 2-8 below, age has been set to adjusted when alcohol
22 Graphically, the red/pink confounder node is now white, and the red/pink directed edges are now black.
Figure 2-8: Adjusted confounder in DAGitty
A third causal structure which is important when estimating causal effects is termed a ‘collider’. Where a confounder is a mutual cause of two other concepts or variables, a collider is mutually
caused by two other concepts or variables. Figure 2-9 presents this in a DAG.
Figure 2-9: A collider
Controlling for a collider creates a spurious association between its mutual causes. DAGs do not make this immediately apparent, but it is a common problem in research, as a collider is effectively DAG terminology for selection bias. A common example used to explain collider or selection bias is selective education (Morgan and Winship, 2007). Consider a university which only admits students with high academic ability or students with high sporting ability. We can thus assume that, as long as this selection process is successful, there will be three ‘types’ of student at this university: students with high academic ability; students with high sporting ability; and students with both. There should be no students with low academic and low sporting ability. In this university there will thus be a negative correlation between academic and sporting ability. To see why consider this simple
demonstration in simulated data. As per Table 2-1, there are 100 students in the university, each with a binary indicator of high academic ability and another binary indicator of high sporting ability. Of these, 40 have high academic ability, 40 have high sporting ability, and 20 have both. This produces a moderately strong negative correlation between sporting ability and academic ability of R= -0.667.
23 Table 2-1: Selection bias at a fictional university
High sporting ability? High academic ability? Total
1 0
1 20 40 60
0 40 0 40
Total 60 40 100
This correlation, however, is caused by the selection mechanism (i.e. the distribution of both variables in the wider population would be different, for example it would include people with low ability in both academia and sports, and the prevalence of high ability in either category could be assumed to be lower than 60%). Thus, if researchers were interested in estimating the effect of sporting ability on academic ability (or vice versa), conditioning on this selection process would bias the estimate. An example which is more relevant to Public Health, especially for observational social epidemiological studies such as this thesis, selection bias into survey participation. Consider how overall health in the below DAG of depressive symptomology on alcohol consumption acts as a collider (i.e. so-called healthy volunteer bias).
Figure 2-10: Healthy volunteer collider bias
For simplicity, assume that this DAG represents a cross-sectional survey. Because selection is shaped by overall health, and because depression and alcohol consumption influence overall health, any estimate of the effect of depression on alcohol consumption would ‘have’ collider bias. This is briefly revisited in Chapter 7’s discussion of the ALSPAC data. Collider bias is thus a novel articulation of a well-documented problem, but being aware of collider bias, specifically in how colliders should not be conditioned on in statistical models, is crucial for using DAGs to inform analysis.