Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help file for anova() not precise when method="satorra.2000"; and anova() does not mean scale when m0/m1 not estimated robustly #383

Open
njaalf opened this issue Sep 3, 2024 · 1 comment

Comments

@njaalf
Copy link

njaalf commented Sep 3, 2024

Hi, when test="sb" the scaled.shifte=F option gives a regular sb scaling, and not mean-and variance as claimed in help.

Also, for objects m0 and m1 not fitted with test="sb" or other robust tests, anova(method="satorra.2000") should still calculate a mean scaled test, and not the simple chi-square difference?

note: We did not check what happens for the other methods ("satorra.bentler.2001", etc)

Code:

m0 <- "F=~x1+bx2+bx3+b*x4"
m1 <- "F=~x1+x2+x3+x4"
set.seed(1)
dd <- simulateData(m0)
#only happens when test="sb"
f0 <- cfa(m0, dd, test="sb"); f1 <- cfa(m1,dd, test="sb")
res <- anova(f0, f1, method="satorra.2000", scaled.shifted=F)
str(res)# its a satorra.bentler mean scaling, not mean-and-variance scaled

#without test="sb"
f0 <- cfa(m0, dd); f1 <- cfa(m1,dd)
res <- anova(f0, f1, method="satorra.2000", scaled.shifted=F)
str(res)# regular non-robust chi-square difference!

@yrosseel
Copy link
Owner

yrosseel commented Sep 3, 2024

About the first point: Originally, method = "satorra.2000" was only meant to be used in the categorical case. After all, in the continuous case, we have satorra.bentler.2001 (and 2010).

As for the second point: if none of the models involved used a 'robust' test statistic, the regular LRT is returned, and the method= argument is ignored. I suppose a warning would perhaps be in order. (Or a better explanation in the man page).

The code in lav_test_LRT.R and lav_test_diff.R is very old, and has been adapted so many times over the years that a complete rewrite is in order. I only need to find the time. In the mean time, I will keep this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants