0
$\begingroup$

I want to implement a serial mediation with 3 mediators in R using the package lavaan.

Lavaan Model 6 (3 Mediators)

I found a code for the serial mediation with 2 mediators in a posting here: Serial Mediation with 2 mediators

So basically I tried to extend the model I saw there. From

model <- "
  M1 ~ a1 * X
  M2 ~ a2 * X + d21 * M1
  Y ~  cp * X + b1  * M1 + b2 * M2
  ind_eff := a1 * d21 * b2
"

to

model=
"
  #Regressions
  M1 ~ a*X
  M2 ~ b*M1 + X
  M3 ~ b*M1 + c*M2 + X
  Y ~ d*M3 + c*M2 + M1 + e*X
  
  #Defined Parameters:
  ie := a*b*c*d
  de := e
"

Does this model now reflect PROCESS Model 6 with 3 mediators?

$\endgroup$

1 Answer 1

1
$\begingroup$

Not quite. You would need to specify different paths in lavaan for each arrows in the PROCESS figure. As such, you would need 10 paths, each with their own unique label. For example:

model <-
'
  #Regressions
  M1 ~ a1*X
  M2 ~ a2*M1 + a3*X
  M3 ~ a4*M1 + a5*M2 + a6*X
  Y  ~ b1*M1 + b2*M2 + b3*M1 + c*X
 '

The total indirect effect would be the sum of all indirect effects. You could also test individual indirect effects by specifying their unique paths; for example this would be the code for the indirect effect via M1 and via M2, respectively.

ieM1 := a1*b1
ieM2 := a1*a2*b2 + a3*b2
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.