comparing indirect effects in lavaan

1,109 views
Skip to first unread message

Pui Hung Bryant Hui

unread,
Jul 11, 2015, 10:25:02 PM7/11/15
to lav...@googlegroups.com
Hi everyone,

I'm using lavaan to run a SEM model with multiple mediators and I would like to compare the strength of each indirect effect. My understanding is that I have to use the nonlinear constraint function to do it (pls correct me if I'm wrong). I've tried to google if there are any examples online that I can follow. I found there are examples for other statistical softwares, but not for lavaan package in R.

I was wondering if any of you have any script examples on comparing the strength of indirect effect using lavaan or you can give me some advice on doing it. Your help will be much appreciated. Thank you very much in advance.

Bryant 

Terrence Jorgensen

unread,
Jul 15, 2015, 11:59:33 AM7/15/15
to lav...@googlegroups.com
I'm not sure how a nonlinear constraint would help you compare your indirect paths to each other, at least not descriptively.  Are you trying to test the null hypothesis that they are equal to each other?  That can be done very simply with labels, as seen on this page:


The above example has only 1 indirect path (ab), but if your other indirect path is called "mn", you could include the constraint that 

ab == mn

Then you can compare the fit of the model with that constraint to the fit of a model without that constraint, and use the chi-square difference test.  The models would be nested, so you can use the anova() function to compare the models.

Terry

Alex Schoemann

unread,
Jul 15, 2015, 1:07:13 PM7/15/15
to lav...@googlegroups.com
Or, you could create a new parameter representing this difference between indirect effects (using Terry's example):

diff := ab - mn

I'd probably use bootstrapping to for hypothesis testing in this case.

Alex

Pui Hung Bryant Hui

unread,
Jul 15, 2015, 1:33:27 PM7/15/15
to lav...@googlegroups.com
Hey Guys,

thank you for your advice. Yes, I finally figured out using "diff:=" to do it :)

Bryant

Felix Deichmann

unread,
Jun 8, 2018, 4:05:51 AM6/8/18
to lavaan
Question: IF ab and mn have different metrics, how does the comparison know to use the standardized and not the unstandardized estimates? What if I want to compare more than just 1vs1, e.g. 3vs3 (ab+cd+ef vs gh+ij+lm)?

Terrence Jorgensen

unread,
Jun 13, 2018, 9:11:57 AM6/13/18
to lavaan
IF ab and mn have different metrics, how does the comparison know to use the standardized and not the unstandardized estimates?

It doesn't.  If you want to test whether the standardized estimated are equivalent, you would first have to define the standardized estimates in the syntax using the := operator.  That could be problematic, since standardized estimates are calculated from sample statistics that might not generalize to other studies.

What if I want to compare more than just 1vs1, e.g. 3vs3 (ab+cd+ef vs gh+ij+lm)?

You can define the function of several parameters the same way

this := ab+cd+ef
that := gh+ij+lm
other := this - that

Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Reply all
Reply to author
Forward
0 new messages