cfa_dat_heywood | R Documentation |
A six-variable dataset with 60 cases, with one case resulting in negative variance if not removed.
cfa_dat_heywood
A data frame with 60 rows and 6 variables:
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
library(lavaan)
data(cfa_dat_heywood)
mod <-
"
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
"
# The following will result in a warning
fit <- cfa(mod, cfa_dat_heywood)
# One variance is negative
parameterEstimates(fit, output = "text")
# Fit the model with the first case removed
fit_no_case_1 <- cfa(mod, cfa_dat_heywood[-1, ])
# Results admissible
parameterEstimates(fit_no_case_1, output = "text")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.