Statistical test for proportion mediated

203 views
Skip to first unread message

Jošt Bartol

unread,
Dec 22, 2022, 8:25:45 AM12/22/22
to lavaan
Dear lavaan community,

I am doing an mediation analysis, and would like to test if the proportion mediated is statistically different from zero. Is there maybe a possibility to do this in lavaan?

Proportion mediated is (a*b)/(c+(a*b)) where c is the direct effect on X on Y, a the effect of M on Y, and b the effect of X on M.

Y is the main dependent variable, X the indpendent variable, and M the mediator.

Any help or suggestions are very welcome.

Jošt

Christian Arnold

unread,
Dec 22, 2022, 8:43:36 AM12/22/22
to lav...@googlegroups.com
I don't know how useful this coefficient is, but technically you can probably implement it as follows:

library(lavaan)

pop.model <- "
m ~ 0.4 * x
y ~ 0.5 * m + 0.2 * x
"

set.seed(1)
data <- simulateData(pop.model, sample.nobs = 300)

model <- "
m ~ a * x
y ~ b * m + c * x
prop := (a * b) / (c + (a * b))
"

fit <- sem(model, data)
parameterEstimates(fit)

Note: a is the effect of x on m and b of m on y. It might be useful to apply a resampling technique instead of the delta method.

Best

Christian

Von: lav...@googlegroups.com <lav...@googlegroups.com> im Auftrag von Jošt Bartol <barto...@gmail.com>
Gesendet: Donnerstag, 22. Dezember 2022 14:25
An: lavaan <lav...@googlegroups.com>
Betreff: Statistical test for proportion mediated
 
--
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/94b27fd3-448a-4ac1-84ba-0b68abdf3e01n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages