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.
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