SAS, SPSS, and Stata Macros for causal mediation analysis:
Valeri, L. and VanderWeele, T.J. (2013). Mediation analysis allowing for exposure-mediator interactions and causal interpretation: theoretical assumptions and implementation with SAS and SPSS macros. Psychological Methods, 18:137-150.
Valeri, L. and VanderWeele, T.J. (2015). SAS macro for causal mediation analysis with survival data. Epidemiology, 26:e23-4.