measure invariance analysis with the packages semTools and lavaan.

265 views
Skip to first unread message

Lea

unread,
May 7, 2019, 6:17:43 AM5/7/19
to lavaan

Hello,

 

I'm working with R for the second time and unfortunately I don't know the program very well and now I have a problem.

 

I did a measure invariance analysis with the packages semTools and lavaan. 

 

My commands were: 

> PT_Total <- read.csv(file.choose(), header=T, sep=";", dec=",") 

> PT_F1 <- ' f1 =~ q5 + q6 + q7 +q8 +q9 + q10 + q11 +q12 + q13 + q14 + q15 +      q16 + q17 + q18 + q19 + q20 + q21 + q22 + q23 + q24

+ f2 =~ q25 + q26 + q27 + q28 + q29

+ f3 =~ q35 + q36 + q37 + q38 + q39 + q40 + q41 + q42 + q43 + q44 + q45 +          q46 + q47 + q48 + q49 + q50 + q51 + q52 + q53 + q54 + q55 + q56 + q57 +        q58 + q59 + q60 + q61 + q62 + q63 + q64 '

> measurementInvariance (PT_F1, data = PT_total, group="gender", estimator= "mlm", strict=T)

 

I got the following warning: "In lav_test_diff_SatorraBentler2001(mods[[m]], mods[[m + 1]]) :

 lavaan WARNING: scaling factor is negative" 

 

and don't understand this warning and don't know if it is relevant for me.

It may be that the scaling factor is negative, because my items differ in polarity. Certainly 40% of the items are negative. Could I take the values anyway or are the values with this warning useless for me? 

 

Many thanks and greetings

lea 

Terrence Jorgensen

unread,
May 8, 2019, 5:01:00 AM5/8/19
to lavaan

 lavaan WARNING: scaling factor is negative" 


You can pass the argument method = "satorra.bentler.2010" to obtain a strictly positive test statistic.  It has nothing to do with negatively scored items, although convergence tends to be easier when items are scored in the same direction.

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

Lea

unread,
May 9, 2019, 4:14:12 AM5/9/19
to lavaan
Thank you for your answer! But how can I pass the argument? Its automatically there. 

Terrence Jorgensen

unread,
May 9, 2019, 3:27:26 PM5/9/19
to lavaan
But how can I pass the argument? Its automatically there. 

The existence of a default value doesn't prevent you from setting a different value when you call the function.

Lea Baldauf

unread,
May 10, 2019, 5:11:07 AM5/10/19
to lav...@googlegroups.com
I didn't manage to change the order and I didn't know how to do it. Just left the method undefined. Did the "satorra.bentler.2001" and the warning I described have anything to do with the "Fit measures"? Because the CFI and RMSEA values are the only ones that interest me. Can I use them despite the warning or are the results wrong

--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/d1cdcad4-13ea-4232-9e56-b5a049de85ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Terrence Jorgensen

unread,
May 10, 2019, 8:09:05 AM5/10/19
to lavaan
All you have to do is add the argument.

measurementInvariance(PT_F1, data = PT_total, group="gender", estimator= "mlm", strict=T,
                     
method = "satorra.bentler.2010")

Then the scaling factor will be positive (unless there is an issue using that method, in which case you will get a different warning/error message) and your chi-squared values will be sensible.  CFI and RMSEA are based on chi-squared, so you want to know your statistic makes sense before relying on fit indices (not that fit indices are very informative for testing invariance).

Lea Baldauf

unread,
May 14, 2019, 5:02:52 AM5/14/19
to lav...@googlegroups.com
Thank you so much for your help. It all worked now. 

--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
Reply all
Reply to author
Forward
0 new messages