regression
Mediation analysis
Estimate an indirect association through a numeric mediator.
Requirements
- numeric predictor
- numeric mediator
- numeric outcome
- defensible temporal order
Avoid when
- cross-sectional order is ambiguous
- unmeasured mediator-outcome confounding is likely
Formula
indirect effect = a·b; total effect = c′ + a·b
Interpretation
The bootstrapped indirect effect is the product of the predictor-to-mediator and mediator-to-outcome paths.
Worked example
Estimate whether adherence carries part of the association between treatment and recovery.
Open example datasets