Thanks everyone for your input,
But I think misunderstanding happened. My question was lavaan specific, not SEM general: how we can put multiple mediators in lavaan.
Here is my model:
p16a18c24 <- ' # direct effect
myOutcome ~ c*myPredictor
# mediator
myMediator ~ a*myPredictor
myOutcome ~ b*myMediator
# indirect effect (a*b)
ab := a*b
# total effect
total := c + (a*b)
'
fit.p16a18c24 <- sem(p16a18c24,data=m,missing="fiml",se="bootstrap")
summary(fit.p16a18c24,fit.measures=TRUE,standardized=TRUE,rsquare=TRUE)
Am I supposed to add mediators like this?
p16a18c24 <- ' # direct effect
myOutcome ~ c*myPredictor
# mediator
myMediator1 ~ a1*myPredictor
myOutcome ~ b1*myMediator1
myMediator2 ~ a2*myPredictor
myOutcome ~ b2*myMediator2
myMediator3 ~ a3*myPredictor
myOutcome ~ b3*myMediator3
# indirect effect (a*b)
a1b1 := a1*b1
a2b2 := a2*b2
a3b3 := a3*b3
# total effect
total := c + (a1*b1+a2*b2+a3*b3)
'
fit.p16a18c24 <- sem(p16a18c24,data=m,missing="fiml",se="bootstrap")
summary(fit.p16a18c24,fit.measures=TRUE,standardized=TRUE,rsquare=TRUE)
Or is there another way?
I would really appreciate your clarification.
NewInMediation