Mediator
Definition
A mediator is an intermediate variable lying on the causal pathway through which a treatment (X) affects an outcome (Y). In the structure X → M → Y, M is the mediator.
DAG representation:
Treatment (X) → Mediator (M) → Outcome (Y)
Key characteristics:
- Part or all of X’s effect is transmitted to Y through M
- Controlling for M blocks the genuine causal effect
Total, Direct, and Indirect Effects
X → M → Y (Indirect effect: through M)
X ----→ Y (Direct effect: not through M)
Total Effect (TE)
- The total effect of X on Y
- Direct + Indirect effect
Direct Effect (DE)
- The X → Y effect when M is held fixed
- The pathway that does not pass through M
Indirect Effect (IE)
- The X → Y effect through M
- “Mediated effect”
Why NOT Control for Mediators?
Problem 1: Underestimation of Total Effect
When you control for M:
- The indirect effect (X → M → Y) is blocked
- The total effect is underestimated
Original: X ---(direct)--> Y
X ---(via M)---> Y ← this part disappears
Problem 2: Endogenous Selection Bias
When the mediator is connected to a confounder:
U (unmeasured)
↙ ↘
M Y
↑
X
When you control for M:
- A spurious association is created between X and U (M becomes a collider)
- Bias is introduced
Example: Education → Adult Intelligence → Income
Childhood Intelligence
↙ ↘
Education → Adult Intelligence → Income
↘_________________________↗
- Without control: the total effect of Education on Income
- With control for Adult Intelligence:
- The indirect effect is blocked (underestimation)
- Childhood Intelligence plays the role of U → bias
When to Control for Mediator?
Goal: Estimate Total Effect
→ Do NOT control for mediator
Goal: Estimate Direct Effect Only
→ Control for mediator (caution required)
However:
- Estimating the direct effect requires additional assumptions
- Bias is possible if M is not randomized
- Even in an experimental study, M must be randomized to be valid
Mediation Analysis
Traditional mediation (Baron & Kenny, 1986):
- Has many limitations
- Difficult to interpret causally
Modern causal mediation (Imai et al., 2010; Pearl):
- Sequential ignorability assumption
- Stricter identification conditions
Mediator vs. Confounder vs. Collider
| Variable Type | DAG Structure | Effect of Control |
|---|---|---|
| Confounder | X ← Z → Y | Removes spurious association ✓ |
| Collider | X → C ← Y | Creates spurious association ✗ |
| Mediator | X → M → Y | Blocks the causal effect ✗ |
Commonality (Collider & Mediator): both are post-treatment variables
Identifying Mediators
Temporal Criterion
- Occurs after the treatment and before the outcome
- Is affected by the treatment
Causal Pathway
- X → M: X affects M
- M → Y: M affects Y
- M lies on the X→Y pathway
Example Mediators
| Treatment | Mediator | Outcome |
|---|---|---|
| Education | Skills/Knowledge | Income |
| Therapy | Coping mechanisms | Depression |
| Drug | Biological pathway | Health outcome |
| Exercise | Fitness level | Weight loss |
Partial vs. Full Mediation
Full Mediation
X → M → Y (only through M)
- All of X’s effect goes through M
- Direct effect = 0
Partial Mediation
X → M → Y
X ---→ Y (also direct effect)
- Part of X’s effect goes through M
- Direct effect ≠ 0
Post-treatment Variable Rule
Rule of Thumb:
Do not control for variables that occur after the treatment
Reasons:
- Mediator: blocks the causal effect
- Collider: creates spurious association
- Descendant of collider: indirect collider bias
Exceptions:
- When estimating the direct effect is the explicit goal
- When using appropriate causal mediation analysis
Related Concepts
- DAG - visualizing causal structure
- Confounder - common cause (must be controlled)
- Collider - common effect (must not be controlled)
- CATE - treatment effect estimation
- Causal Mediation Analysis - analyzing mediation effects
References
- rohrerThinkingClearlyCorrelations - the dangers of controlling for mediators
- Baron, R. M., & Kenny, D. A. (1986). The moderator-mediator variable distinction
- Pearl, J. (2014). Interpretation and identification of causal mediation
- Imai, K., et al. (2010). A general approach to causal mediation analysis