EFAtools
The EFAtools package provides functions to perform exploratory factor analysis (EFA) procedures and compare their solutions. The goal is to provide state-of-the-art factor retention methods and a high degree of flexibility in the EFA procedures. This way, implementations from R psych and SPSS can be compared. Moreover, functions for Schmid-Leiman transformation, and computation of omegas are provided. To speed up the analyses, some of the iterative procedures like principal axis factoring (PAF) are implemented in C++.
Installation
You can install the release version from CRAN with:
install.packages("EFAtools")
You can install the development version from GitHub with:
install.packages("devtools")
devtools::install_github("mdsteiner/EFAtools")
To also build the vignette when installing the development version, use:
install.packages("devtools")
devtools::install_github("mdsteiner/EFAtools", build_vignettes = TRUE)
Example
Here are a few examples on how to perform the analyses with the
different types and how to compare the results using the COMPARE
function. For more details, see the vignette by running
vignette("EFAtools", package = "EFAtools")
. The vignette provides a
high-level introduction into the functionalities of the package.
# load the package
library(EFAtools)
# Run multiple factor retention methods
N_FACTORS(test_models$baseline$cormat, N = 500)
#> Warning in N_FACTORS(test_models$baseline$cormat, N = 500): ! 'x' was a correlation matrix but CD needs raw data. Skipping CD.
#> ℹ The default implementation of EKC has changed compared to EFAtools version <= 0.5.0 to reflect the original version by Braeken and van Assen (2017). The previous version (which often yields different results from the original) is available with type = 'AM2019'. See details in the help page.
#>
#> ── Tests for the suitability of the data for factor analysis ───────────────────
#>
#> Bartlett's test of sphericity
#>
#> ✔ The Bartlett's test of sphericity was significant at an alpha level of .05.
#> These data are probably suitable for factor analysis.
#>
#>