model <- '
# measurement model
Lat_y <- x1 + x2
Lat_A =~ x3 + x4 +x5
Lat_B =~ x6+ x7
Lat_C =~ x8 + x9
# regressions
Lat_y ~ Lat_A + Lat_B + Lat_C + x10 + … + x30
'
Many of the explanatory variables are categorical, but not ordered. x1 and x2 are measured on a Likert scale and the command to estimate the model was
sem.model <- sem(model, verbose = TRUE, data = df,
ordered = c("x1", "x2"), estimator = "WLSMV")
Thank you for your help.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/AM0PR04MB595553DDFFC7AF9F93D289ABFC3D9%40AM0PR04MB5955.eurprd04.prod.outlook.com.
model <- '
# measurement model
Lat_A =~ x3 + x4 +x5
Lat_B =~ x6+ x7
Lat_C =~ x8 + x9
# regressions
x1 ~ Lat_A + Lat_B + Lat_C + x10 + … + x30
'
sem.model <- sem(model, verbose = TRUE, data = df,)
sem.model.ord <- sem(model, verbose = TRUE, data = df,
ordered = c("x1"), estimator = "WLSMV")
Model Test User Model:
Test statistic 692080.4321
Degrees of freedom 936
P-value (Chi-square) 0.0000
Model Test Baseline Model:
Test statistic 65839895.1257
Degrees of freedom 1038
P-value 0.0000
The degrees of freedom make sense for me, but for the same model, only switching from ML to DWLS as the dependent variable is a ordinal, I get the following Output for sem.model.ord
Model Test User Model:
Standard Robust
Test Statistic 692980.910 284216.250
Degrees of freedom 936 936
P-value (Chi-square) 0.000 0.000
Scaling correction factor 2.443
Shift parameter 559.676
simple second-order correction
Model Test Baseline Model:
Test statistic 432020.897 318618.317
Degrees of freedom 66 66
P-value 0.000 0.000
Scaling correction factor 1.356
The degrees of are very differnt for the two models. I will look more into the degrees of freedom... thank you.
Simon