Testing model differences for second-order factor the analysis of measurement invariance

148 views
Skip to first unread message

Torres

unread,
Nov 8, 2018, 11:56:59 AM11/8/18
to lavaan
Dear Lavaan group,

I am testing measurement invariance across gender group for a second-order factor model. I am comparing the significant difference in chi-square between configuration invariance model and weak invariance model (invariance of 1st factor loadings). The variables tested in my model are all continuous. I used lavTestLRT(). More specifically, my syntax is lavTestLRT(modelconfig, modelweak1st, SB.classic = TRUE). However, lavaan told me that: 

"Error in lavTestLRT(modelAgg3f3, modelAgg3f4, SB.classic = TRUE) : 
  trying to get slot "optim" from an object of a basic class ("character") with no slots"

I am not familiar with comparing model difference for second-order factor model. Can you please help me fix the problem so that I am able to do the comparison?

Thank you very much in advance for considering my request,

Torres

Terrence Jorgensen

unread,
Nov 9, 2018, 6:21:52 AM11/9/18
to lavaan
 lavTestLRT(modelconfig, modelweak1st, SB.classic = TRUE). However, lavaan told me that: 

"Error in lavTestLRT(modelAgg3f3, modelAgg3f4, SB.classic = TRUE) : 
  trying to get slot "optim" from an object of a basic class ("character") with no slots"

Are modelAgg3f3 and modelAgg3f4 your fitted models or the character vectors that contain your model syntax?

Also, I wouldn't set SB.classic = TRUE.  That is an outdated argument.  Use the method= argument instead:

?lavTestLRT

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

Torres

unread,
Nov 11, 2018, 2:53:46 PM11/11/18
to lavaan
Thanks you Terrence. I corrected my code then continued to run lavTestLRT() using argument SB.classic =T. As a result, no error is reported. I don't know the reason why 

Vào 12:21:52 UTC+1 Thứ Sáu, ngày 09 tháng 11 năm 2018, Terrence Jorgensen đã viết:
Reply all
Reply to author
Forward
0 new messages