I'm trying to calculate the total indirect effects in a structural equation model with four exogenous latent variables, four latent mediators, and one outcome variable. Mplus gives the option for the "sum of indirect effects", but I'm not sure how to get this information in 'lavaan'. I found a paper that reported the sum of indirect effects from 'lavaan', but I'm not sure how to run this analysis.


1 Answer 1


In Lavaan you can calculate new parameters, using the := operator.

Use this to calculate the sum of indirect effects. Here's an example. We have 4 predictors (x1-x4), one mediator (m) and one outcome (y).

m ~ x1 (mx1)
m ~ x2 (mx2)
m ~ x3 (mx3)
m ~ x4 (mx4)

y ~ x1 (yx1)
y ~ x2 (yx2)
y ~ x3 (yx3)
y ~ x4 (yx4)

y ~ m

totIndEffect := yx1 + yx2 + yx3 + yx4
  • $\begingroup$ So for total indirect effects, you can simply sum up the individual indirect effects for the dependent variables? $\endgroup$ Commented Mar 29, 2016 at 17:02
  • 1
    $\begingroup$ Yep, that's it. $\endgroup$ Commented Mar 29, 2016 at 17:20
  • $\begingroup$ Do you know of any references explaining more background about this? I was thinking of summing up direct and indirect effects within a path analysis and my co-authors are wondering if this is a legitimate thing to do. $\endgroup$ Commented Jun 13, 2022 at 17:58
  • $\begingroup$ Hmm... I don't know of a reference, but there must be one. Maybe ask a new question? $\endgroup$ Commented Jun 13, 2022 at 23:12

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.