cfa_dat_heywood {semfindr} | R Documentation |
Sample Data: A CFA Model with a Heywood Case
Description
A six-variable dataset with 60 cases, with one case resulting in negative variance if not removed.
Usage
cfa_dat_heywood
Format
A data frame with 60 rows and 6 variables:
- x1
Indicator. Numeric.
- x2
Indicator. Numeric.
- x3
Indicator. Numeric.
- x4
Indicator. Numeric.
- x5
Indicator. Numeric.
- x6
Indicator. Numeric.
Examples
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")
[Package semfindr version 0.1.8 Index]