correlating different set of residuals covariances across groups

19 views
Skip to first unread message

Dr. Fernán Arana

unread,
May 4, 2020, 12:26:34 PM5/4/20
to lavaan
Hi all, greetings from Argentina!

I wonder if anyone can enlighten me here. Let's suppose I have two groups and I ran some configural models and they were nearly ok but, inspecting modification indices, there is room for improvement if I make some adjustments. 
For instance, a one-factor model with 10 variables (x1-x10) and two groups (a,b). 
When I ran separately CFAs, it looks like x1-x3 residuals of these observable variables have to be correlated in the group a and no adjustments were needed for group b. Furthermore, once I checked x1 and x3´s meanings I found that both items refer to a similar construct in a way that group a (say, Spanish translated items) has an almost identical meaning--so we are good in thinking that there´s a theoretical reason to correlate those. 

My question is how to model that (or, likewise, how to model when there are two different set, e.g., group a <- x1 ~~ x2, group b x3 ~~ x4)?? In Mplus I simply used to state different on each model and worked good (i.e., model a = x1 with x2 and model b = x3 with x4) , but can't find a way to do it in lavaan ...and it looks like I read a lot of material and didn' t find this issue. Of course, I'm talking in the context of measurement invariance analyses, I would need to merge both adjustments in a single configural model to start with the other invariance tests.
Thanks a bunch!

Fernan

Instituto de Investigaciones
CONICET
Universidad de Buenos Aires
Argentina

Edward Rigdon

unread,
May 4, 2020, 1:06:18 PM5/4/20
to lav...@googlegroups.com
You will find that in the lavaan tutorials. When you want to make different specifications for different groups, use the "c(a, b)" modifier. For exam, if you want the residual covariance of x3 and x4 to be free in the first group but fixed to 0 in the second group, you might write:

x3 ~~ c(NA,0)*x4

The "NA" in R says that the estimate is an unknown value for group 1.
If you want the value fixed in the first group but free in the second, just reverse the order:

x3 ~~ c(0,NA)*x4

--
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/aeb71f3f-3d84-4ca2-9e4b-cec40c40d1c4%40googlegroups.com.

Dr. Fernán Arana

unread,
May 6, 2020, 10:49:30 PM5/6/20
to lavaan
Thanks a lot!! That worked excellently. Didn´t find this solution before so thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages