# step 1: extract factors with Factanal(), rather than factanal()
man <- make_manifest(covmat = ability.cov)
res <- make_restrictions(man, factors = 2, model = "EFA")
efa <- Factanal(manifest = man, restrictions = res, impatient = TRUE)
# steps 2 and 3: transform with quartimin() and then synthesize objects
if( require(GPArotation)) {
efa.GPA <- quartimin(loadings(efa))
efa.Rotated <- GPA2FA(efa.GPA, efa)
}
if(!require(GPArotation)) { # steps 2 and 3 are equivalent to this
efa.Rotated <- Rotate(efa, criteria = list("quartimin"), methodArgs =
list(nfc_threshold = 0, matrix = "PP"))
}
# step 4: interpret with various commands, such as
summary(efa.Rotated)
Run the code above in your browser using DataLab