Moderated mediation

274 views
Skip to first unread message

Rebecca Leyva

unread,
Aug 6, 2018, 11:12:09 AM8/6/18
to lavaan
I am trying to fit a moderated mediation model in line with Hayes Model 59 (see image), where the moderator (W) is a dichotomous variable:



















From reading this group, journal articles, and textbooks, it seems that the most suitable method is to use lavaan's multigroup function. Using the Holzinger & Swineford data as an example, I believe I would set up the first part of the model as follows:

modmed.model <- '
#mediation model, paths labelled for each group seperately
x1 ~ c(c1,c2)*x2 + c(b1,b2)*x3
x3 ~ c(a1,a2)*x2

#indirect (ab) effect, for each group seperately
ab1 := a1*b1
ab2 := a2*b2
'

However, this is where I get stuck. I've seen two different approaches mentioned in order to look at stats on the moderation, and I'm not sure which I should be using. 

1) constraining the indirect effect variables to be equal across the 2 groups:
ab1 == ab2

2) looking at the difference between the indirect effect variables by group:
diff_ab1v2 := ab1 - ab2


With approach 1, how do I test whether there is a difference due to the moderating variable? By comparing the model with and without those paths constrained (e.g. using anova(modmed.constrained, modmed.unconstrained))? If there is a significant difference, then I constrain one path at a time to see where the difference lies?

The second approach provides a p-value for "diff_ab1v2" - which I assume tells me if group moderates the entire indirect pathway (ab). However, I'm confused how to see the effect of the moderator on each path individually too (eg. a, b, c, c')?

I suspect I'm being stupid and am not understanding what I've read, or have somehow managed to overlook key info, so any guidance would be greatly appreciated.

Thanks so much for any help you can offer.


Terrence Jorgensen

unread,
Aug 7, 2018, 8:05:01 AM8/7/18
to lavaan
With approach 1, how do I test whether there is a difference due to the moderating variable? By comparing the model with and without those paths constrained (e.g. using anova(modmed.constrained, modmed.unconstrained))? If there is a significant difference, then I constrain one path at a time to see where the difference lies?

Yes, the likelihood ratio test will be an omnibus test, and you can try constraining individual paths if you want to do follow-up tests.

The second approach provides a p-value for "diff_ab1v2" - which I assume tells me if group moderates the entire indirect pathway (ab). However, I'm confused how to see the effect of the moderator on each path individually too (eg. a, b, c, c')?

Yes, the Wald z test will be available for any difference in parameters across groups (defined by W) that you define.  The difference is the moderating effect (it is the degree to which W affects the value of a, b, or ab).  To investigate different individual paths, just define those differences, too

diff_a <- a1 - a2
diff_b
<- b1 - b2

Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages