Hello,
I am running a mediation analysis involving both parallel and serial moderators (see figure and code). The first moderator is in series with 4 moderators in parallel.
Is it possible to correctly estimate the direct and indirect effects using lavaan?
Thank you
Marion
Code:
mediation <- '
Moderator1 ~ a*categoryB + b*categoryC + c*categoryD + d*categoryE
SubscaleM2_1~ e*categoryB + f*categoryC + g*categoryD + h*categoryE + u*Moderator1
SubscaleM2_2~ i*categoryB + j*categoryC + k*categoryD + l*categoryE + v*Moderator1
SubscaleM2_3~ m*categoryB + n*categoryC + o*categoryD + p*categoryE + w*Moderator1
SubscaleM2_4~ q*categoryB + r*categoryC + s*categoryD + t*categoryE + y*Moderator1
SuscaleO_1 ~ d1*categoryB + d2*categoryC + d3*categoryD + d4*categoryE + d5*SubscaleM2_1 + d6*SubscaleM2_2 + d7*SubscaleM2_3 + d8*SubscaleM2_4 + Covariate1 + Covariate2 + Covariate3
SuscaleO_2 ~ d9*categoryB + d10*categoryC + d11*categoryD + d12*categoryE + d13*SubscaleM2_1 + d14*SubscaleM2_2 + d15*SubscaleM2_3 + d16*SubscaleM2_4 + Covariate1 + Covariate2 + Covariate3
SuscaleO_3 ~ d17*categoryB + d18*categoryC + d19*categoryD + d20*categoryE + d21*SubscaleM2_1 + d22*SubscaleM2_2 + d23*SubscaleM2_3 + d24*SubscaleM2_4 + Covariate1 + Covariate2 + Covariate3
SuscaleO_4 ~ d25*categoryB + d26*categoryC + d27*categoryD + d28*categoryE + d29*SubscaleM2_1 + d30*SubscaleM2_2 + d31*SubscaleM2_3 + d32*SubscaleM2_4 + Covariate1 + Covariate2 + Covariate3
SuscaleO_5 ~ d33*categoryB + d34*categoryC + d35*categoryD + d36*categoryE + d37*SubscaleM2_1 + d38*SubscaleM2_2 + d39*SubscaleM2_3 + d30*SubscaleM2_4 + Covariate1 + Covariate2 + Covariate3
SubscaleM2_1 ~~ SubscaleM2_2
SubscaleM2_1 ~~ SubscaleM2_3
SubscaleM2_1 ~~ SubscaleM2_4
SubscaleM2_2 ~~ SubscaleM2_3
SubscaleM2_2 ~~ SubscaleM2_4
SubscaleM2_3 ~~ SubscaleM2_4
SubscaleO_1 ~~ SubscaleO_2
SubscaleO_1 ~~ SubscaleO_3
SubscaleO_1 ~~ SubscaleO_4
SubscaleO_1 ~~ SubscaleO_5
SubscaleO_2 ~~ SubscaleO_3
SubscaleO_2 ~~ SubscaleO_4
SubscaleO_2 ~~ SubscaleO_5
SubscaleO_3 ~~ SubscaleO_4
SubscaleO_3 ~~ SubscaleO_5
SubscaleO_4 ~~ SubscaleO_5’