J Prev Med Public Health.  2023 Jul;56(4):303-311. 10.3961/jpmph.23.189.

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

Affiliations
  • 1Institute of Health & Environment, Seoul National University, Seoul, Korea
  • 2Department of Public Health Sciences, Graduate School of Public Health, Seoul National University, Seoul, Korea

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.

Keyword

Causal mediation analysis; Nested counterfactuals; Natural direct effect; Natural indirect effect; Identification
Full Text Links
  • JPMPH
Actions
Cited
CITED
export Copy
Close
Share
  • Twitter
  • Facebook
Similar articles
Copyright © 2024 by Korean Association of Medical Journal Editors. All rights reserved.     E-mail: koreamed@kamje.or.kr