Fit mediation models to assess the causal impact of x on y mediated through m.
Install from github using R devtools
devtools::install_github("longjp/mediateR")
or in a terminal
git clone https://github.com/longjp/mediateR.git
R CMD INSTALL mediateR
See the vignettes: