Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you perform mediation analysis with multiple treatments in R

Tags:

r

regression

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.)

like image 616
DirtStats Avatar asked Oct 31 '22 14:10

DirtStats


1 Answers

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.

like image 110
DirtStats Avatar answered Nov 15 '22 05:11

DirtStats