"Negative scaling factor warning

338 views
Skip to first unread message

Edward Rigdon

unread,
Oct 22, 2021, 9:41:58 AM10/22/21
to lav...@googlegroups.com
     In delivering a class on interactions with factors, I am using the data from the Mplus manual example 5.13, 500 simulated multinormal observations on 4 factors with an interaction between factors 1 and 2. There are 3 indicators for each of factors 1 - 4, but I thought to shorten the syntax by omitting factor 4. I used a matching approach in creating product indicators for the interaction factor, f1xf2. I used semTools::indProd() with double mean centering, and the simulated data also involves a near-0 correlation between f1xf2 and the factors f1 and f2.
     To illustrate a test of nested models, I specified one model where the regression parameter for the interaction factor is free ("model1base") and another where it is fixed to 0 ("model0"), and then used lavtestLRT() to compare results. And that is where I got an interesting message:

> lavTestLRT(model0.out,model1base.out)
Scaled Chi-Squared Difference Test (method = “satorra.bentler.2001”)

lavaan NOTE:
    The “Chisq” column contains standard test statistics, not the
    robust test that should be reported per model. A robust difference
    test is a function of two standard (not robust) statistics.
 
                            Df   AIC   BIC   Chisq Chisq diff Df diff Pr(>Chisq)
model1base.out  14 14282 14374  8.0963                              
model0.out          15 14302 14391 30.5278                  1          
Warning message:
In lav_test_diff_SatorraBentler2001(mods[[m]], mods[[m + 1]]) :
  lavaan WARNING: scaling factor is negative

     Here are the results reported for each model separately:

Model Test User Model:
                                               Standard      Robust
  Test Statistic                             8.096       6.349
  Degrees of freedom                         14          14
  P-value (Chi-square)                 0.884       0.957
  Scaling correction factor                            1.275
       Yuan-Bentler correction (Mplus variant)                     

Model Test User Model:
                                               Standard      Robust
  Test Statistic                           30.528      25.865
  Degrees of freedom                         15          15
  P-value (Chi-square)                 0.010       0.039
  Scaling correction factor                            1.180
       Yuan-Bentler correction (Mplus variant)                     

     I don't know exactly what to make of the warning. I don't think that I should post the Mplus data, but my syntax is below.
--Ed Rigdon

file<-file.choose()
data<-read.csv(file)
str(data)

## Use indProd function to create product indicators

library(semTools)
# Use matching
dataplus.match<-indProd(data=data,var1=c(1:3),var2=c(4:6),match=T,doubleMC = T,
          namesProd = c("y13","y14","y15)"))
str(dataplus.match)

## Basic interaction model with factors
model1base <-'
 f1 =~ y1 + y2 + y3
 f2 =~ y4 + y5 + y6
 f3 =~ y7 + y8 + y9
 f1xf2 =~ y13 + y14 + y15
 f3 ~ f1 + f2 + f1xf2
 '

library(lavaan)
# Estimate using MLR because of nonnormality
model1base.out<-sem(model=model1base,data=dataplus.match,estimator="MLR")
summary(model1base.out)

## Interaction model with interaction fixed to 0
model0 <-'
 f1 =~ y1 + y2 + y3
 f2 =~ y4 + y5 + y6
 f3 =~ y7 + y8 + y9
 f1xf2 =~ y13 + y14 + y15
 f3 ~ f1 + f2 + 0*f1xf2
 '

# Estimate nested no-interaction model and conduct chi-square test
model0.out<-sem(model=model0,data=dataplus.match,estimator="MLR")
summary(model0.out)

lavTestLRT(model0.out,model1base.out)




   

Shu Fai Cheung

unread,
Oct 22, 2021, 1:42:39 PM10/22/21
to lavaan
I think this case is described in p.511 of the following paper:

Satorra, A., & Bentler, P. M. (2001). A scaled difference chi-square test statistic for moment structure analysis. Psychometrika, 66(4), 507–514. https://doi.org/10.1007/BF02296192

The correction factor is computed from the two dfs (14 and 15) and the two correction factors (1.275 and 1.180). They proposed some possible causes for having a negative scaling factor, e.g., the more restrictive model is too different from the true model. (Another is sample size, which should not be a problem in this case.)

If it is really necessary to make the scaling factor positive, how about using `method = "satorra.bentler.2010"` in lavTestLRT?

Satorra, A., & Bentler, P. M. (2010). Ensuring positiveness of the scaled difference chi-square test statistic. Psychometrika, 75(2), 243–248. https://doi.org/10.1007/s11336-009-9135-y

-- Shu Fai

Edward Rigdon

unread,
Oct 26, 2021, 2:38:39 PM10/26/21
to lav...@googlegroups.com
Thank you very kindly.
--Ed R.

--
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/8b02058b-cfc7-4bda-b0c8-78ffab4944fan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages