Week 4: Interaction, Measurement Bias, and Selection Bias
Required
- Bulbulia (2023) "Methods in Causal Inference Part 1: Causal Diagrams and Confounding." link
- See simplified reading
Optional
- Hernan & Robins (2025) What If, Chapters 6--9. link
- Hernan (2004) "A Structural Approach to Selection Bias." link
- Hernan (2017) "Selection Without Colliders." link
- Hernan & Cole (2009) "Causal Diagrams and Measurement Bias." link
- VanderWeele & Hernan (2012) "Results on Differential and Dependent Measurement Error." link
- Effect (measure) modification
- Undirected/uncorrelated measurement error bias
- Undirected/correlated measurement error bias
- Directed/uncorrelated measurement error bias
- Directed/correlated measurement error bias
- Selection bias and transportability
- Create a new
.Rfile called04-lab.Rwith your name, contact, date, and a title such as "Regression and confounding bias." - Copy and paste the code chunks below during class.
- Save in a clearly defined project directory.
You may also download the lab here: Download the R script for Lab 04
Seminar
Learning outcomes
By the end of this week, you will be able to:
- Distinguish effect modification from confounding and from interaction.
- Identify the four types of measurement error bias in a causal diagram.
- Explain how selection bias arises from conditioning on a collider at baseline.
- Define the distinction between a target population and a source population, and explain why it matters for transportability.
Effect modification
Effect modification occurs when the causal effect of on differs across strata of a third variable . In our DAG conventions, effect modification is indicated by a blue arrow with a circle point from to the path. Importantly, effect modification is not a source of bias. It is a feature of the world: some treatments work differently for different people.
Effect modification differs from confounding. A confounder is a common cause of and that must be conditioned on to eliminate bias. An effect modifier is a variable that changes the magnitude (or direction) of the causal effect. We do not adjust for effect modifiers to remove bias; we examine them to understand for whom the treatment works.
Effect modification also differs from statistical interaction, although the two are related. Interaction is a property of a statistical model (e.g., a product term in a regression). Effect modification is a causal property of the data-generating process. A statistical interaction may reflect effect modification, confounding, or an artefact of the scale on which the outcome is measured. Distinguishing these requires a causal diagram.
Common causal questions presented as causal graphs
The following figure shows how several standard research designs can be represented as causal DAGs. Each design answers a different causal question, and the DAG makes explicit what is being estimated and what assumptions are required.
A typology of measurement error bias
Measurement error is pervasive in psychology. We rarely observe the true value of a variable; instead, we observe a measured version that may differ from the truth. When measurement error is systematic rather than purely random, it can introduce bias into our causal estimates. The following figure presents four structural types of measurement error, classified along two dimensions.
Dimension 1: Independent (undirected) versus dependent (directed). Independent measurement error means that the true value of one variable does not affect the measurement error in another. Dependent (directed) error means that one variable's true value causally influences how another variable is measured.
Dimension 2: Uncorrelated versus correlated. Uncorrelated errors have no shared cause. Correlated errors share a common cause that affects the measurement of both variables simultaneously.
The four types:
-
Independent, uncorrelated. Errors in and are unrelated. Under certain conditions (notably when the true effect is zero), this type does not introduce bias, but it typically attenuates effect estimates toward zero.
-
Independent, correlated. Errors in and share a common cause (for example, a survey method effect that inflates both responses). This can create a spurious association even when the true causal effect is zero.
-
Dependent, uncorrelated. The true treatment causally affects how the outcome is measured (or vice versa). For example, receiving a diagnosis () changes how a patient reports symptoms (). This creates a non-causal path from to the measured version of .
-
Dependent, correlated. Both dependent and correlated errors operate simultaneously. This is the most complex scenario and can produce bias in either direction.
Understanding these types matters because the standard advice to "use reliable measures" addresses only the simplest case (independent, uncorrelated error). The other three types require structural reasoning: you need a DAG to determine whether measurement error in your study is a source of bias and, if so, in which direction.
Selection bias and transportability
Selection bias arises when the composition of the study sample differs systematically from the target population in ways that affect the treatment-outcome relationship. The most common structural source of selection bias is conditioning on a collider at baseline.
Consider a study of the effect of exercise on blood pressure. Suppose health-conscious people are more probable to both exercise and volunteer for health studies, and suppose high socioeconomic status (SES) independently predicts both better health and study participation. Participation is a collider of health consciousness and SES. By restricting analysis to study participants, we condition on this collider and induce a spurious association between health consciousness and SES, which can distort the estimated effect of exercise on blood pressure.
- The target population is the population to which investigators seek to generalise their findings.
- The source population is the population from which the study sample is drawn.
- The analytic sample population comprises the actual participants at baseline.
External validity requires that the causal effect estimated in the analytic sample applies to the target population. When the distribution of effect modifiers differs between sample and target, the sample ATE may not generalise, even if internal validity is perfect.
The acronym "WEIRD" (Western, Educated, Industrialised, Rich, Democratic) has drawn attention to the narrow demographic base of much psychological research. From a causal perspective, the problem is not that WEIRD samples are unrepresentative per se, but that effect modifiers may be distributed differently in the target population. If the treatment effect varies across levels of an effect modifier, and that modifier's distribution differs between sample and target, the sample ATE will not transport to the target. The simulation guide for this course demonstrates this point concretely using a transportability simulation.
Measurement invariance (which we cover in Week 10) connects to measurement error bias in cross-cultural research. If the same questionnaire measures a construct differently in different populations, then what appears to be a cross-population difference in the outcome may instead be a difference in how the outcome is measured. This is a form of correlated, directed measurement error, and it cannot be detected by standard reliability statistics.
All open access:
- Bulbulia JA (2024). "Methods in causal inference. Part 3: measurement error and external validity threats." Evolutionary Human Sciences. link
- Bulbulia JA (2024). "Methods in causal inference. Part 1: causal diagrams and confounding." Evolutionary Human Sciences. link
- Bulbulia JA (2024). "Methods in causal inference. Part 2: interaction, mediation, and time-varying treatments." Evolutionary Human Sciences. link
Lab materials: Lab 4: Regression and Confounding Bias