# Load data
wmt <- wmt2[,7:24]
# Fast for CRAN
cor.wmt <- cor(wmt)
# Estimate EGA
ega.wmt <- EGA(data = wmt, n = nrow(wmt2), plot.EGA = FALSE)
# \donttest{
# Estimate EGA
ega.wmt <- EGA(data = wmt, plot.EGA = FALSE)
# Fit CFA model to EGA results
cfa.wmt <- CFA(ega.obj = ega.wmt, estimator = 'WLSMV', plot.CFA = TRUE, data = wmt)
# Additional fit measures
lavaan::fitMeasures(cfa.wmt$fit, fit.measures = "all")
# }
# Load data
intel <- intelligenceBattery[,8:66]
# \donttest{
# Estimate EGA
ega.intel <- EGA(data = intel, plot.EGA = FALSE)
# Fit CFA model to EGA results
cfa.intel <- CFA(ega.obj = ega.intel, estimator = 'WLSMV', plot.CFA = TRUE,
data = intel)
# }
Run the code above in your browser using DataLab