Variance decomposition using sequential mediation

75 views
Skip to first unread message

Yira Zhang

unread,
Apr 29, 2024, 12:24:15 PM4/29/24
to lavaan
Dear all,

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.

Yira Zhang

unread,
Apr 30, 2024, 8:50:54 AM4/30/24
to lavaan
Dear whom it may concern,

I would sincerely appreciate any suggestions on this topic. I think my essential goal is to partition the marginal R^2 for each predictor, after accounting for mediating effects. 

I am aware of packages like misty, relaimpo to generate the indices of my interest based on correlation matrices. So, my question would become, what is the proper way to have a correlation matrix of all factors, after accounting for mediating paths? I tried lavInspect(fit, "cor.all"), which gave me all the same no matter how many mediating paths I added. I reckon there must be mistakes. Any suggestions will be appreciated.

Best wishes,
Y

Christian Arnold

unread,
Apr 30, 2024, 1:46:28 PM4/30/24
to lavaan
I don't think you can use relaimpo, detached from a correlation matrix. These methods (pmvd, lmg. ...) are somewhat exclusive for multiple regressions and not for mediation. I guess there are 2 options: Upsilon (Lachowitz et al) or Delta Med.Liu et al). I wouldn't buy the latter. My 2 Cents. 

HTH

Christian 

Christian Arnold

unread,
May 1, 2024, 1:49:37 PM5/1/24
to lav...@googlegroups.com
I don't think you can use relaimpo, detached from a correlation matrix. These methods (pmvd, lmg. ...) are somewhat exclusive for multiple regressions and not for mediation. I guess there are 2 options: Upsilon (Lachowitz et al) or Delta Med.Liu et al). I wouldn't buy the latter. My 2 Cents. 

HTH

Christian 


Von: lav...@googlegroups.com <lav...@googlegroups.com> im Auftrag von Yira Zhang <yiraz...@gmail.com>
Gesendet: Dienstag, April 30, 2024 2:51:05 PM
An: lavaan <lav...@googlegroups.com>
Betreff: Re: Variance decomposition using sequential mediation
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/929de4cd-e107-49d7-a1fa-fbefcb0212c6n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages