mediation with multiple groups

120 views
Skip to first unread message

Adar Hoffman

unread,
Oct 3, 2018, 10:17:21 AM10/3/18
to lavaan
Hello,

I am relatively new to the group and to lavaan in general...
I am running a mediation using lavaan, but would like to test if the indirect and total effects vary by group (I have 3 groups).
However, when I put the groups = 'group' argument, I don't get estimates for the indirect and total effect...

Can someone have an idea how to get them ?

Thanks !!

Adar.

Yves Rosseel

unread,
Oct 7, 2018, 2:01:13 PM10/7/18
to lav...@googlegroups.com
You need to use separate labels for each group, as in

m ~ c(a1,a2,a3)*x
y ~ c(b1,b2,b3)*m

(if you have three groups)

and then you can specify an indirect effect for each group:

ind1 := a1*b1
ind2 := a2*b2
ind3 := a3*b3

Yves.
> --
> 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
> <mailto:lavaan+un...@googlegroups.com>.
> To post to this group, send email to lav...@googlegroups.com
> <mailto:lav...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/lavaan.
> For more options, visit https://groups.google.com/d/optout.

Adar Hoffman

unread,
Oct 10, 2018, 10:19:37 AM10/10/18
to lav...@googlegroups.com
yeah that works, thank you!
I appreciate your help very much.
A.

To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages