I would like to analyze data from an experiment using mediation analysis in R. However, the experimental design is a full factorial design across three variables (two continuous, one categorical) and I cannot find an explanation of how to implement mediation in R with multiple treatments. I have read the documentation on the mediation
package but they do not appear to provide ways of expanding X
beyond a single treatment. Similarly, I cannnot find a way to do that in MBESS
or lavaan
packages.
I found a very recent article that discusses the statistical theory/approaches necessary to implement multiple treatments in mediation analysis, Hayes and Preacher 2014 (http://quantpsy.org/pubs/hayes_preacher_2014.pdf) but, unfortunately, they only give code implementations of their approach in Mplus, SPSS and SAS. I need to implement this in the next couple days for a presentation so I don't have time to get up to speed on another program to do it, I need to implement it in R.
Does anyone know if there is an implementation in R that I've missed? Or if there is a way to implement this approach outside of a package?
(I realize I could convert my full factorial design into a single treatment by treating each 3-factor combination as a level but such an analysis would not be helpful.)
After more exhaustive search, it appears that there is not currently an R package that can handle mediation with multiple treatments (ie, predictors). Packages in R that can do mediation include: mediation
, MBESS
, lavaan
, multimed
, bmem
, and OpenMx
. However, it appears that those that handle multiple predictors (e.g., OpenMx
) also require a model coded as a RAM path model. This is the type of model needed to code full path analyses and is notably more complex than simplified mediation model coding (e.g. in mediation
) that I was hoping for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With