Structural Equation Modeling with lavaan in R
Erin Buchanan
Professor
negative.model <- 'latent1 =~ V1 + V2 + V3
latent2 =~ V4 + V5 + V6'
negative.fit <- cfa(negative.model, data = negative_data)
Warning message:
In lavaan::lavaan(model = negative.model,
data = negative_data, :
lavaan WARNING: model has NOT converged!
summary(negative.fit, standardized = TRUE,
fit.measures = TRUE, rsquare = TRUE)
** WARNING ** lavaan (0.5-23.1097) did
NOT converge after 10000 iterations
** WARNING ** Estimates below are most likely unreliable
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.V2 -3949.334 NA -3949.334 -211.745
.V5 11885.910 NA 11885.910 615.668
R-Square:
Estimate
V1 0.001
V2 NA
V3 0.000
V4 -0.000
V5 -614.668
V6 -0.000
var(negative_data$V2)
18.83833
negative.model <- 'latent1 =~ V1 + V2 + V3
latent2 =~ V4 + V5 + V6
V2 ~~ 18.83833*V2'
negative.fit <- cfa(negative.model,
data = negative_data)
summary(negative.fit,
standardized = TRUE,
fit.measures = TRUE,
rsquare = TRUE)
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.V2 18.838 18.838 0.962
.V1 7.655 1.145 6.687 0.000 7.655 0.772
.V3 16.100 1.580 10.189 0.000 16.100 0.848
.V4 13.866 1.017 13.638 0.000 13.866 0.876
.V5 8.851 5.472 1.617 0.106 8.851 0.400
.V6 12.336 0.599 20.596 0.000 12.336 0.956
latent1 2.261 1.128 2.004 0.045 1.000 1.000
latent2 1.956 0.875 2.236 0.025 1.000 1.000
R-Square:
Estimate
V2 0.038
V1 0.228
V3 0.152
V4 0.124
V5 0.600
V6 0.044
Structural Equation Modeling with lavaan in R