Hello everyone!
I estimate a model with two latent factors (3 categorical indicators each), a control variable Gender and a manifest dependent variable. Model converge with a good fit (chi-sq p-value = 0.11; CFI 0.99; RMSEA 0.02).
Since my sample is complex (students clustered in colleges), in the next model I introduce correction for clustering (cluster = "ID_college")
Surprisingly, outputs of both models are identical -- except in the second one there is a line " Number of clusters [ID_college] 13"
Why the cluster correction didn't work?
Any help will be very much appreciated
Thank you!
Pasha
First model - without cluster correction
pathmodel1202a <- '#measurement model
Monitoring =~ v22 + v23 + v24
Love =~ v5 + +v8 + v10
#regressions
v71 ~ Monitoring
v71 ~ Gender
Monitoring ~ Love
Monitoring ~ Gender
Love ~ Gender'
fit1202a <- sem(pathmodel1202a, data=datasem, ordered = c("v22", "v23", "v24", "v5", "v8", "v10", "v71"))
summary(fit1202a, fit.measures=T, rsquare = T)
lavaan 0.6-5 ended normally after 25 iterations Estimator DWLS Optimization method NLMINB Number of free parameters 41 Used Total Number of observations 1452 1715 Model Test User Model: Standard Robust Test Statistic 14.936 24.283 Degrees of freedom 17 17 P-value (Chi-square) 0.600 0.112 Scaling correction factor 0.682 Shift parameter 2.373 for the simple second-order correction Model Test Baseline Model: Test statistic 6973.091 4885.216 Degrees of freedom 21 21 P-value 0.000 0.000 Scaling correction factor 1.429 User Model versus Baseline Model: Comparative Fit Index (CFI) 1.000 0.999 Tucker-Lewis Index (TLI) 1.000 0.998 Robust Comparative Fit Index (CFI) NA Robust Tucker-Lewis Index (TLI) NA Root Mean Square Error of Approximation: RMSEA 0.000 0.017 90 Percent confidence interval - lower 0.000 0.000 90 Percent confidence interval - upper 0.021 0.032 P-value RMSEA <= 0.05 1.000 1.000 Robust RMSEA NA 90 Percent confidence interval - lower 0.000 90 Percent confidence interval - upper NA Standardized Root Mean Square Residual: SRMR 0.023 0.023 Parameter Estimates: Information Expected Information saturated (h1) model Unstructured Standard errors Robust.sem Latent Variables: Estimate Std.Err z-value P(>|z|) Monitoring =~ v22 1.000 v23 0.955 0.029 32.425 0.000 v24 0.971 0.029 33.631 0.000 Love =~ v5 1.000 v8 0.970 0.035 27.954 0.000 v10 0.861 0.032 26.971 0.000 Regressions: Estimate Std.Err z-value P(>|z|) v71 ~ Monitoring -0.364 0.039 -9.365 0.000 Gender -0.321 0.059 -5.450 0.000 Monitoring ~ Love 0.332 0.032 10.535 0.000 Gender -0.171 0.047 -3.608 0.000 Love ~ Gender -0.137 0.061 -2.238 0.025
Second model -- Adding cluster argument:
fit1202a1 <- sem(pathmodel1202a, data=datasem, ordered = c("v22", "v23", "v24", "v5", "v8", "v10", "v71"), cluster = "ID_college")summary(fit1202a1, fit.measures=T, rsquare = T)
lavaan 0.6-5 ended normally after 25 iterations Estimator DWLS Optimization method NLMINB Number of free parameters 41 Used Total Number of observations 1452 1715 Number of clusters [ID_college] 13 Model Test User Model: Standard Robust Test Statistic 14.936 24.283 Degrees of freedom 17 17 P-value (Chi-square) 0.600 0.112 Scaling correction factor 0.682 Shift parameter 2.373 for the simple second-order correction Model Test Baseline Model: Test statistic 6973.091 4885.216 Degrees of freedom 21 21 P-value 0.000 0.000 Scaling correction factor 1.429 User Model versus Baseline Model: Comparative Fit Index (CFI) 1.000 0.999 Tucker-Lewis Index (TLI) 1.000 0.998 Robust Comparative Fit Index (CFI) NA Robust Tucker-Lewis Index (TLI) NA Root Mean Square Error of Approximation: RMSEA 0.000 0.017 90 Percent confidence interval - lower 0.000 0.000 90 Percent confidence interval - upper 0.021 0.032 P-value RMSEA <= 0.05 1.000 1.000 Robust RMSEA NA 90 Percent confidence interval - lower 0.000 90 Percent confidence interval - upper NA Standardized Root Mean Square Residual: SRMR 0.023 0.023 Parameter Estimates: Information Expected Information saturated (h1) model Unstructured Standard errors Robust.sem Latent Variables: Estimate Std.Err z-value P(>|z|) Monitoring =~ v22 1.000 v23 0.955 0.029 32.425 0.000 v24 0.971 0.029 33.631 0.000 Love =~ v5 1.000 v8 0.970 0.035 27.954 0.000 v10 0.861 0.032 26.971 0.000 Regressions: Estimate Std.Err z-value P(>|z|) v71 ~ Monitoring -0.364 0.039 -9.365 0.000 Gender -0.321 0.059 -5.450 0.000 Monitoring ~ Love 0.332 0.032 10.535 0.000 Gender -0.171 0.047 -3.608 0.000 Love ~ Gender -0.137 0.061 -2.238 0.025
P.S. Also, I am not sure that my initial model syntax is correct, so I add the picture of
theoretical model I tried to specify here.
