0
$\begingroup$

I have constructed a structural equation model in R using lavaan, with 2 exogenous predictor variables, 3 mediators, and 1 endogenous response variable:

Text

I tried to label it as conventionally as possible but apologies if I didn't do a good job. I am now trying to calculate indirect effects, using past answers on how to set it up in lavaan (here), and how to incorporate more than one mediator (here and here). But I am unsure on how to go about it with two predictor values (X1 and X2), as this would count some indirect pathways twice, right? That doesn't seem statistically sound to me but I don't know how to go about it.

Here is what I've written so far, assuming just one X1 value and one indirect path of interest via M3:

model1 <- '
  M1 ~ a1*X1 + e1*M2
  M2 ~ a2*X1 
  M3 ~ a3*X1 + b1*M1 + b3*M2
  Y ~  c1*X1 + b2*M1 + b4*M2 + d1*M3
  ind_eff := a3 * d1
  tot_eff := c1 + a1*b1*d1 + a1*b2+ a2*e1*b1*d1 + a2*e1*b2 + a2*b3*d1 + a2*b4 + a3*d1
'

Have I written this correctly so far (particularly the total effect calculation)? Is it possible to combine this with a model for X2 together into just one model, even if it means some pathways like b1 will be used twice?

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Yes, you can combine them.

As far as I can see, this looks correct.

A couple of suggestions though:

Do you intend to have a path from M2 to M1? If so, at a minimum I would rename them M1 and M2, and it would also be much clearer to make the position of M2 higher than M1, to show it comes first in the causal order.

$\endgroup$
1
  • $\begingroup$ Great, thank you very much! Yes the relationship does go from M2 to M1, I organized the model this way before adding that e1 pathway, but you're right it doesn't flow anymore so I will switch them. I appreciate your help! $\endgroup$
    – Atanaqui
    Commented Oct 25, 2023 at 3:23

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.