> CFA_fit = cfa(CFA_mod, data=dd[,-1], estimator="ULS")
Warning messages:
1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING: could not compute standard errors!
lavaan NOTE: this may be a symptom that the model is not identified.
2: In lavaan::lavaan(model = CFA_mod, data = dd[, -1], estimator = "ULS", :
lavaan WARNING: some estimated variances are negative
3: In lavaan::lavaan(model = CFA_mod, data = dd[, -1], estimator = "ULS", :
lavaan WARNING: covariance matrix of latent variables is not positive definite; use inspect(fit,"
cov.lv") to investigate.
4: In lavaan::lavaan(model = CFA_mod, data = dd[, -1], estimator = "ULS", :
lavaan WARNING: observed variable error term matrix (theta) is not positive definite; use inspect(fit,"theta") to investigate.
> summary(CFA_fit)
lavaan (0.5-17) converged normally after 55 iterations
Number of observations 68
Estimator ULS
Minimum Function Test Statistic 18.698
Degrees of freedom 1
P-value (Unknown) NA
Parameter estimates:
Information Expected
Standard Errors Standard
Estimate Std.err Z-value P(>|z|)
Latent variables:
M1 =~
x10 -0.534
x8 0.650
x3 1.227
Regressions:
d ~
M1 -4.700
Variances:
M1 0.127
x10 1.061
x8 0.930
x3 0.850
d -1.768
> vifValues = list()
> for (i in 1:length(folds))
+ {
+ vifValues[[i]] <- HH::vif( dd[-folds[[i]],
+ c("x10", "x8", "x3" ,"d")])
+ }
> do.call(rbind, vifValues)
x10 x8 x3 d
[1,] 2.145099 1.688815 2.408851 3.606164
[2,] 2.001310 1.618807 2.573754 3.537053
[3,] 2.216816 1.701084 2.386481 3.674937
[4,] 2.080792 1.629400 2.601167 3.728013
[5,] 2.013422 1.600859 2.486274 3.247940
[6,] 2.001551 1.779798 2.329134 3.509830
[7,] 2.324024 1.783590 2.242215 3.341166
[8,] 2.188027 1.704483 2.269582 3.098449
[9,] 2.216507 1.685163 2.578708 3.786062
[10,] 1.950682 1.572766 2.369971 3.421800
I am getting negative variances again. Situation is worse with ML estimator. I looked for multicollinearity in estimators, but there is not a strong sign of that. There is a dependence to dependent variable, but that should not be a problem, right?