# NOT RUN {
# All criteria, with correlation matrix and fit method "ML" (where needed)
# This will throw a warning for CD, as no raw data were specified
nfac_all <- N_FACTORS(test_models$baseline$cormat, N = 500, method = "ML")
# The same as above, but without "CD"
nfac_wo_CD <- N_FACTORS(test_models$baseline$cormat, criteria = c("EKC",
"HULL", "KGC", "PARALLEL", "SCREE", "SMT"), N = 500,
method = "ML")
# Use PAF instead of ML (this will take a lot longer). For this, gof has
# to be set to "CAF" for the Hull method.
nfac_PAF <- N_FACTORS(test_models$baseline$cormat, criteria = c("EKC",
"HULL", "KGC", "PARALLEL", "SCREE", "SMT"), N = 500,
gof = "CAF")
# Do KGC and PARALLEL with only "PCA" type of eigenvalues
nfac_PCA <- N_FACTORS(test_models$baseline$cormat, criteria = c("EKC",
"HULL", "KGC", "PARALLEL", "SCREE", "SMT"), N = 500,
method = "ML", eigen_type_other = "PCA")
# Use raw data, such that CD can also be performed
nfac_raw <- N_FACTORS(GRiPS_raw, method = "ML")
# }
Run the code above in your browser using DataLab