I'm trying to do a latent variable analysis using the package lavaan for R. However, I'm getting the following error messages:
Warning messages: 1: In lav_data_full(data = data, group = group, cluster = cluster, : lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigate 2: 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. 3: In lav_object_post_check(object) : lavaan WARNING: some estimated ov variances are negative 4: In lav_object_post_check(object) :
lavaan WARNING: some estimated lv variances are negative
My model is structured as follows:
model <- "
# regressions
eigenvector.frug ~ Size + Morphology
# latent variables
Size =~ Mass + Forearm
Morphology =~ LMT + BUM
# covariances and variances
Mass ~~ Forearm
LMT ~~ BUM
Mass ~~ Mass
Forearm ~~ Forearm
LMT ~~ LMT
BUM ~~ BUM
"
The code I'm running is:
fit <- sem(model, data=data,
orthogonal=TRUE)
And I'm getting the following summary:
lavaan (0.5-23.1097) converged normally after 141 iterations
Number of observations 41
Estimator ML
Minimum Function Test Statistic 88.676
Degrees of freedom 2
P-value (Chi-square) 0.000
Parameter Estimates:
Information Expected
Standard Errors Standard
Latent Variables:
Estimate Std.Err z-value P(>|z|)
Size =~
Mass 1.000
Forearm 4.941 NA
Morphology =~
LMT 1.000
BUM 1.349 NA
Regressions:
Estimate Std.Err z-value P(>|z|)
eigenvector.frug ~
Size -0.000 NA
Morphology -2.774 NA
Covariances:
Estimate Std.Err z-value P(>|z|)
.Mass ~~
.Forearm 59.805 NA
.LMT ~~
.BUM 2.926 NA
Size ~~
Morphology 0.000
Variances:
Estimate Std.Err z-value P(>|z|)
.Mass 272.184 NA
.Forearm -518.752 NA
.LMT 3.283 NA
.BUM 5.871 NA
.eigenvectr.frg 0.344 NA
Size 26.894 NA
Morphology -0.038 NA
As the data vary at different scales, I tried to normalize all variables using the scale function and run the model again.
data2 = scale(data)
Then I got the following error messages:
Warning message: 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.
And the following summary:
lavaan (0.5-23.1097) converged normally after 69 iterations
Number of observations 41
Estimator ML
Minimum Function Test Statistic 87.973
Degrees of freedom 2
P-value (Chi-square) 0.000
Parameter Estimates:
Information Expected
Standard Errors Standard
Latent Variables:
Estimate Std.Err z-value P(>|z|)
Size =~
Mass 1.000
Forearm 0.940 NA
Morphology =~
LMT 1.000
BUM 0.181 NA
Regressions:
Estimate Std.Err z-value P(>|z|)
eigenvector.frug ~
Size 0.536 NA
Morphology -0.042 NA
Covariances:
Estimate Std.Err z-value P(>|z|)
.Mass ~~
.Forearm 0.389 NA
.LMT ~~
.BUM 0.541 NA
Size ~~
Morphology 0.000
Variances:
Estimate Std.Err z-value P(>|z|)
.Mass 0.404 NA
.Forearm 0.471 NA
.LMT 0.394 NA
.BUM 0.957 NA
.eigenvectr.frg 0.819 NA
Size 0.571 NA
Morphology 0.581 NA
Could you please help me figure out what's wrong? Thank you very much.