# NOT RUN {
# psych::fa() can not access the rotations We have to load the library.
library(psych)
SRS_BEFA <- fa(SRS_data, nfactors = 5, rotate = "bifactor")
# inspect the solution to see which exploratory factors belong to which subdomain
SRS_BEFA$loadings
ItemsBySF = list(MR4 = paste0("SRS_", c(5, 9, 12, 15, 18)),
MR2 = paste0("SRS_", c(1, 2, 8, 11, 17)),
MR3 = paste0("SRS_", c(4, 6, 10, 14, 19)),
MR5 = paste0("SRS_", c(3, 7, 13, 16, 20)))
bifactorIndices_expl(SRS_BEFA, ItemsBySF = ItemsBySF)
# }
Run the code above in your browser using DataLab