DOI QR코드

DOI QR Code

An Introduction to Causal Mediation Analysis With a Comparison of 2 R Packages

  • Sangmin Byeon (Institute of Health & Environment, Seoul National University) ;
  • Woojoo Lee (Department of Public Health Sciences, Graduate School of Public Health, Seoul National University)
  • Received : 2023.04.17
  • Accepted : 2023.06.22
  • Published : 2023.07.31

Abstract

Traditional mediation analysis, which relies on linear regression models, has faced criticism due to its limited suitability for cases involving different types of variables and complex covariates, such as interactions. This can result in unclear definitions of direct and indirect effects. As an alternative, causal mediation analysis using the counterfactual framework has been introduced to provide clearer definitions of direct and indirect effects while allowing for more flexible modeling methods. However, the conceptual understanding of this approach based on the counterfactual framework remains challenging for applied researchers. To address this issue, the present article was written to highlight and illustrate the definitions of causal estimands, including controlled direct effect, natural direct effect, and natural indirect effect, based on the key concept of nested counterfactuals. Furthermore, we recommend using 2 R packages, 'medflex' and 'mediation', to perform causal mediation analysis and provide public health examples. The article also offers caveats and guidelines for accurate interpretation of the results.

Keywords

References

  1. Hafeman DM, Schwartz S. Opening the black box: a motivation for the assessment of mediation. Int J Epidemiol 2009;38(3):838-845. https://doi.org/10.1093/ije/dyn372
  2. Valeri L, Vanderweele TJ. Mediation analysis allowing for exposure-mediator interactions and causal interpretation: theoretical assumptions and implementation with SAS and SPSS macros. Psychol Methods 2013;18(2):137-150. https://doi.org/10.1037/a0031034
  3. VanderWeele TJ. Mediation analysis: a practitioner's guide. Annu Rev Public Health 2016;37:17-32. https://doi.org/10.1146/annurev-publhealth-032315-021402
  4. Wright S. The method of path coefficients. Ann Math Stat 1934;5(3):161-215. https://doi.org/10.1214/aoms/1177732676
  5. Baron RM, Kenny DA. The moderator-mediator variable distinction in social psychological research: conceptual, strategic, and statistical considerations. J Pers Soc Psychol 1986;51(6):1173-1182. https://doi.org/10.1037/0022-3514.51.6.1173
  6. Imai K, Keele L, Yamamoto T. Identification, inference and sensitivity analysis for causal mediation effects. Stat Sci 2010;25(1):51-71. https://doi.org/10.1214/10-STS321
  7. Pearl J. The causal mediation formula--a guide to the assessment of pathways and mechanisms. Prev Sci 2012;13(4):426-436. https://doi.org/10.1007/s11121-011-0270-1
  8. Vansteelandt S, Bekaert M, Lange T. Imputation strategies for the estimation of natural direct and indirect effects. Epidemiol Methods 2012;1(1):131-158. https://doi.org/10.1515/2161-962X.1014
  9. Vansteelandt S, Vanderweele TJ. Natural direct and indirect effects on the exposed: effect decomposition under weaker assumptions. Biometrics 2012;68(4):1019-1027. https://doi.org/10.1111/j.1541-0420.2012.01777.x
  10. Steen J, Loeys T, Moerkerke B, Vansteelandt S. Medflex: an R package for flexible mediation analysis using natural effect models. J Stat Softw 2017;76:1-46. https://doi.org/10.18637/jss.v076.i11
  11. Tingley D, Yamamoto T, Hirose K, Keele L, Imai K. Mediation: R package for causal mediation analysis. J Stat Softw 2014;59(5):1-38. https://doi.org/10.18637/jss.v059.i05
  12. Pearl J. Direct and indirect effects. In: Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence. San Francisco: Morgan Kaufmann; 2001, p. 411-420.
  13. Lange T, Vansteelandt S, Bekaert M. A simple unified approach for estimating natural direct and indirect effects. Am J Epidemiol 2012;176(3):190-195. https://doi.org/10.1093/aje/kwr525
  14. Lange T, Hansen KW, Sorensen R, Galatius S. Applied mediation analyses: a review and tutorial. Epidemiol Health 2017;39:e2017035.
  15. Neyman J. On the application of probability theory to agricultural experiments. Essay on principles. Ann Agric Sci 1923:1-51.
  16. Splawa-Neyman J, Dabrowska DM, Speed TP. On the application of probability theory to agricultural experiments. Essay on principles. Section 9. Stat Sci 1990;5(4):465-472.
  17. Rosenbaum PR, Rubin DB. The central role of the propensity score in observational studies for causal effects. Biometrika 1983;70(1):41-55. https://doi.org/10.1093/biomet/70.1.41
  18. Holland PW. Causal inference, path analysis and recursive structural equations models. Sociol Methodol 1988;18:449-484. https://doi.org/10.2307/271055
  19. Rubin DB. Estimating causal effects of treatments in randomized and nonrandomized studies. J Educ Psychol 1974;66(5):688-701. https://doi.org/10.1037/h0037350
  20. Hernan MA, Robins JM. Causal inference: what if. Boca Raton: Chapman & Hall/CRC; 2020, p. 3-7.
  21. Holland PW. Statistics and causal inference. J Am Stat Assoc 1986;81(396):945-960. https://doi.org/10.1080/01621459.1986.10478354
  22. Rubin DB. For objective causal inference, design trumps analysis. Ann Appl Stat 2008;2(3):808-840. https://doi.org/10.1214/08-AOAS187
  23. Hirano K, Imbens GW, Ridder G. Efficient estimation of average treatment effects using the estimated propensity score. Econometrica 2003;71(4):1161-1189. https://doi.org/10.1111/1468-0262.00442
  24. VanderWeele TJ. Explanation in causal inference: methods for mediation and interaction. New York: Oxford University Press; 2015, p. 20-64.
  25. Vanderweele TJ, Vansteelandt S. Odds ratios for mediation analysis for a dichotomous outcome. Am J Epidemiol 2010;172(12):1339-1348. https://doi.org/10.1093/aje/kwq332
  26. Robins JM, Greenland S. Identifiability and exchangeability for direct and indirect effects. Epidemiology 1992;3(2):143-155. https://doi.org/10.1097/00001648-199203000-00013
  27. Robins JM. Semantics of causal DAG models and the identification of direct and indirect effects. In: Green PJ, Hjort NL, Richardson S, editors. Highly structured stochastic systems. New York: Oxford University Press; 2003, p. 70-82.
  28. Pearl J. The mediation formula: a guide to the assessment of causal pathways in nonlinear models. In: Berzuini C, Dawid P, Bernardinell L, editors. Causality: statistical perspectives and applications. Chichester: John Wiley & Sons; 2012, p. 151-179.
  29. Pearl J. Interpretation and identification of causal mediation. Psychol Methods 2014;19(4):459-481. https://doi.org/10.1037/a0036434
  30. Imai K, Keele L, Tingley D. A general approach to causal mediation analysis. Psychol Methods 2010;15(4):309-334. https://doi.org/10.1037/a0020761
  31. Imai K, Keele L, Tingley D, Yamamoto T. Unpacking the black box of causality: learning about causal mechanisms from experimental and observational studies. Am Polit Sci Rev 2011;105(4):765-789. https://doi.org/10.1017/S0003055411000414
  32. Patel L, Alicandro G, Bertuccio P, La Vecchia C. Educational inequality in the Dietary Approach to Stop Hypertension diet in the UK: evaluating the mediating role of income. Br J Nutr 2021;126(12):1897-1903. https://doi.org/10.1017/S0007114521000672
  33. Starkopf L, Andersen M, Gerds T, Torp-Pedersen C, Lange T. Comparison of five software solutions to mediation analysis; 2017 [cited 2023 Jun 5]. Available from: https://ifsv.sund.ku.dk/biostat/annualreport/images/0/0a/Research_Report_17-01.pdf.
  34. Robins JM, Richardson TS. Alternative graphical causal models and the identification of direct effects. In: Shrout PE, Keyes KM, Ornstein K, editors. Causality and psychopathology: finding the determinants of disorders and their cures. New York: Oxford University Press; 2011, p. 103-158.
  35. Tchetgen Tchetgen EJ, Phiri K. Bounds for pure direct effect. Epidemiology 2014;25(5):775-776. https://doi.org/10.1097/EDE.0000000000000154
  36. Diaz I, Hejazi NS. Causal mediation analysis for stochastic interventions. J R Stat Soc Series B Stat Methodol 2020;82(3):661-683. https://doi.org/10.1111/rssb.12362
  37. Diaz I, Hejazi NS, Rudolph KE, van Der Laan MJ. Nonparametric efficient causal mediation with intermediate confounders. Biometrika 2021;108(3):627-641. https://doi.org/10.1093/biomet/asaa085