# A type SPSS EFA to mimick the SPSS implementation
EFA_SPSS_5 <- efa_fit(IDS2_R, n_factors = 5,
estimate_control = estimate_control(type = "SPSS"),
rotate_control = rotate_control(type = "SPSS"))
# A type psych EFA to mimick the psych::fa() implementation
EFA_psych_5 <- efa_fit(IDS2_R, n_factors = 5,
estimate_control = estimate_control(type = "psych"),
rotate_control = rotate_control(type = "psych"))
# compare the two
comp <- efa_compare(EFA_SPSS_5$unrot_loadings, EFA_psych_5$unrot_loadings,
x_labels = c("SPSS", "psych"))
comp
# format() returns the same lines as a character vector:
writeLines(format(comp))
# the display settings can be changed without recomputing the comparison:
print(comp, digits = 2, print_diff = FALSE)
Run the code above in your browser using DataLab