I am using sequential mediation analyses (aka serial mediation) in lavaan in R.
Below is my model
```
model <- "y ~ a*x1 + b*x2 + c*x3 + d*x4
x1 ~ b1*x2 + c2*x3 + d2*x4
x2 ~ c3*x3 + d3*x4
x2_y := b1*a + b
x3_y := c2*a + c3*b + c
x4_y := d2*a + d3*b + d
"
fit <- sem(model)
```
I would like to conduct something like dominance analysis to decompose the variance explained of the outcome variable, similar to R^2 of each predictor in linear multiple regression.
For the baseline regression model, I now know a function which can give my intended results:
```
model_baseline <- "
y ~ x1 + x2 + x3 + x4"
fit_baseline <- sem(model_baseline)
fit_baseline.cor <- lavCor(fit_baseline)
misty::dominance.manual(fit_baseline.cor)
```
My question is regarding when adding more mediation paths, how can I get the variance explained by each factor? Potentially lower values for mediators and higher values for factors being mediated. Any suggestions upon packages, functions, or manual calculations would be appreciated.
I know my model is not exactly the same, but this work[
https://www.econ.cam.ac.uk/research-files/repec/cam/pdf/cwpe2171.pdf]is highly related to what I intend to achieve. I would like to get if models with mediation paths added improved the model performance in terms of variance explained, and how share of variance explained of the outcome variable is changed by adding mediation paths.