Mediation analysis allowing for exposure-mediator interactions and causal interpretation: theoretical assumptions and implementation with SAS and SPSS macros

Psychol Methods. 2013 Jun;18(2):137-50. doi: 10.1037/a0031034. Epub 2013 Feb 4.


Mediation analysis is a useful and widely employed approach to studies in the field of psychology and in the social and biomedical sciences. The contributions of this article are several-fold. First we seek to bring the developments in mediation analysis for nonlinear models within the counterfactual framework to the psychology audience in an accessible format and compare the sorts of inferences about mediation that are possible in the presence of exposure-mediator interaction when using a counterfactual versus the standard statistical approach. Second, the work by VanderWeele and Vansteelandt (2009, 2010) is extended here to allow for dichotomous mediators and count outcomes. Third, we provide SAS and SPSS macros to implement all of these mediation analysis techniques automatically, and we compare the types of inferences about mediation that are allowed by a variety of software macros.

Publication types

  • Research Support, N.I.H., Extramural

MeSH terms

  • Causality*
  • Confounding Factors, Epidemiologic
  • Data Interpretation, Statistical*
  • Humans
  • Nonlinear Dynamics*
  • Psychology / statistics & numerical data*
  • Regression Analysis
  • Research Design
  • Software / statistics & numerical data*
  • User-Computer Interface