Multiple mediation with parallel and serial paths

2,029 views
Skip to first unread message

Lauren

unread,
Jan 25, 2016, 3:47:27 PM1/25/16
to lavaan
I was able to use the following code to run a moderated mediation model with 5 mediators in parallel and a categorical moderator with 4 groups. (I've removed the code to determine the indirect effects and total effect)

zmod<-'
Y~c(a1,a2,a3,a4)*M1+c(b1,b2,b3,b4)*M2+c(c1,c2,c3,c4)*M3+c(d1,d2,d3,d4)*M4+c(j1,j2,j3,j4)*M5+c(i1,i2,i3,i4)*X
M1~c(e1,e2,e3,e4)*X
M2~c(f1,f2,f3,f4)*X
M3~c(g1,g2,g3,g4)*X
M4~c(h1,h2,h3,h4)*X
M5~c(k1,k2,k3,k4)*X'
zfitmod<-sem(zmod, se="bootstrap", data=Data, group="W")
summary(zfitmod)

My goal now is to run a similar model that includes serial mediation as well as parallel mediation. The path would be X->M1+M2+M3->M4->Y (see image) with W as a categorical moderator for each path. Is it possible to run this using lavaan?

Thank you,
Lauren 
medmod.png

Terrence Jorgensen

unread,
Jan 26, 2016, 5:20:32 AM1/26/16
to lavaan
My goal now is to run a similar model that includes serial mediation as well as parallel mediation. The path would be X->M1+M2+M3->M4->Y (see image) with W as a categorical moderator for each path. Is it possible to run this using lavaan?

Yes, the same syntax rules still apply.  You just specify the regression paths that you want to freely estimate, and label them the same way to define indirect effects of interest.  Optionally, you can also estimate the residual covariances among 

M1 ~~ M2 + M3
M2 ~~ M3

I would recommend estimating these parameters by default, unless your theory really posits that the only reason those variables covary is because they share X as a common cause.  You can always test whether they are zero by comparing models where they are constrained vs. free.

Terry

Lauren

unread,
Jan 26, 2016, 11:42:31 AM1/26/16
to lavaan
Thank you. In that case, would the following model be appropriate? If so, which values would I multiply to obtain the indirect effects?

 
zmod<-'
Y~c(a1,a2,a3,a4)*M1+c(b1,b2,b3,b4)*M2+c(c1,c2,c3,c4)*M3+c(d1,d2,d3,d4)*M4+c(i1,i2,i3,i4)*X
M1~c(e1,e2,e3,e4)*X
M2~c(f1,f2,f3,f4)*X
M3~c(g1,g2,g3,g4)*X
M4~c(h1,h2,h3,h4)*X+c(j1,j2,j3,j4)*M1+c(k1,k2,k3,k4)*M2+c(l1,l2,l3,l4)*M3 
M4~c(m1,m2,m3,m4)*M1 
M4~c(n1,n2,n3,n4)*M2 
M4~c(o1,o2,o3,o4)*M3'
zfitmod<-sem(zmod, se="bootstrap", data=Data, group="W")
summary(zfitmod)

In regards to estimating the residual covariances, I need to incorporate that into my original model as well. Would I estimate those parameters for each mediator? When I have five mediators in parallel would it be each mediator covaried with each of the other mediators? In your example you have M1~~M2+M3, why do you have those added?

Thank you,
Lauren 

Terrence Jorgensen

unread,
Jan 27, 2016, 3:26:25 AM1/27/16
to lavaan
Thank you. In that case, would the following model be appropriate? If so, which values would I multiply to obtain the indirect effects?

Yes, but you have specified some of the same paths twice.  The paths labeled {j, k, l} are the same as those labeled {m, n, o}.  Read the tutorial to see how to calculate indirect effects:   http://lavaan.ugent.be/tutorial/mediation.html

In regards to estimating the residual covariances, I need to incorporate that into my original model as well. Would I estimate those parameters for each mediator?

Yes, yes.

When I have five mediators in parallel would it be each mediator covaried with each of the other mediators?

I'm not sure what you mean by parallel or serial.  In your first model, Set 1 predicts Set 2, which then predicts Set 3:

{X} --> {M1, M2, M3, M4} --> {Y}

In your second model, Set 1 predicts Set 2, which predicts Set 3, which predicts Set 4:

{X} --> {M1, M2, M3} --> {M4} --> {Y}

Either way, variables within the same {Set} can have residual correlations freely estimated without worrying about empirical under-identification.  If you don't have clear sets like this, then it can get more complicated.  If by "5 in parallel" you mean

X --> M1 --> M2 --> M3 --> M4 --> Y

then you would not specify any residual correlations, because they could result in feedback loops (a non-recursive model).

In your example you have M1~~M2+M3, why do you have those added?

In lavaan syntax, the "+" operator means "and", just like in your regressions when you have more than one predictor of an outcome:

Y ~ X + M1 + M2 + M3 + M4

Terry

Reply all
Reply to author
Forward
0 new messages