# NOT RUN {
# Load data
wmt <- wmt2[,7:24]
# }
# NOT RUN {
# Estimate normal EGAtmfg
tmfg <- EGA(data = wmt, model = "TMFG")
# Estimate optimal EGAtmfg
tmfg.opt <- EGA.fit(data = wmt, model = "TMFG")
# Compare with CFA
cfa.tmfg <- CFA(tmfg, estimator = "WLSMV", data = wmt)
cfa.opt <- CFA(tmfg.opt$EGA, estimator = "WLSMV", data = wmt)
lavaan::lavTestLRT(cfa.tmfg$fit, cfa.opt$fit, method = "satorra.bentler.2001")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab