HULL {EFAtools} | R Documentation |
Hull method for determining the number of factors to retain
Description
Implementation of the Hull method suggested by Lorenzo-Seva, Timmerman, and Kiers (2011), with an extension to principal axis factoring. See details for parallelization.
Usage
HULL(
x,
N = NA,
n_fac_theor = NA,
method = c("PAF", "ULS", "ML"),
gof = c("CAF", "CFI", "RMSEA"),
eigen_type = c("SMC", "PCA", "EFA"),
use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
"na.or.complete"),
cor_method = c("pearson", "spearman", "kendall"),
n_datasets = 1000,
percent = 95,
decision_rule = c("means", "percentile", "crawford"),
n_factors = 1,
...
)
Arguments
x |
matrix or data.frame. Dataframe or matrix of raw data or matrix with correlations. |
N |
numeric. Number of cases in the data. This is passed to PARALLEL. Only has to be specified if x is a correlation matrix, otherwise it is determined based on the dimensions of x. |
n_fac_theor |
numeric. Theoretical number of factors to retain. The maximum of this number and the number of factors suggested by PARALLEL plus one will be used in the Hull method. |
method |
character. The estimation method to use. One of |
gof |
character. The goodness of fit index to use. Either |
eigen_type |
character. On what the eigenvalues should be found in the
parallel analysis. Can be one of |
use |
character. Passed to |
cor_method |
character. Passed to |
n_datasets |
numeric. The number of datasets to simulate. Default is 1000.
This is passed to |
percent |
numeric. A vector of percentiles to take the simulated eigenvalues from.
Default is 95. This is passed to |
decision_rule |
character. Which rule to use to determine the number of
factors to retain. Default is |
n_factors |
numeric. Number of factors to extract if |
... |
Details
The Hull method aims to find a model with an optimal balance between model fit and number of parameters. That is, it aims to retrieve only major factors (Lorenzo-Seva, Timmerman, & Kiers, 2011). To this end, it performs the following steps (Lorenzo-Seva, Timmerman, & Kiers, 2011, p.351):
It performs parallel analysis and adds one to the identified number of factors (this number is denoted J). J is taken as an upper bound of the number of factors to retain in the hull method. Alternatively, a theoretical number of factors can be entered. In this case J will be set to whichever of these two numbers (from parallel analysis or based on theory) is higher.
For all 0 to J factors, the goodness-of-fit (one of CAF, RMSEA, or CFI) and the degrees of freedom (df) are computed.
The solutions are ordered according to their df.
Solutions that are not on the boundary of the convex hull are eliminated (see Lorenzo-Seva, Timmerman, & Kiers, 2011, for details).
All the triplets of adjacent solutions are considered consecutively. The middle solution is excluded if its point is below or on the line connecting its neighbors in a plot of the goodness-of-fit versus the degrees of freedom.
Step 5 is repeated until no solution can be excluded.
The st values of the “hull” solutions are determined.
The solution with the highest st value is selected.
The PARALLEL function and the principal axis factoring of the different number of factors can be parallelized using the future framework, by calling the future::plan function. The examples provide example code on how to enable parallel processing.
Note that if gof = "RMSEA"
is used, 1 - RMSEA is actually used to
compare the different solutions. Thus, the threshold of .05 is then .95. This
is necessary due to how the heuristic to locate the elbow of the hull works.
The ML estimation method uses the stats::factanal starting values. See also the EFA documentation.
The HULL
function can also be called together with other factor
retention criteria in the N_FACTORS
function.
Value
A list of class HULL containing the following objects
n_fac_CAF |
The number of factors to retain according to the Hull method with the CAF. |
n_fac_CFI |
The number of factors to retain according to the Hull method with the CFI. |
n_fac_RMSEA |
The number of factors to retain according to the Hull method with the RMSEA. |
solutions_CAF |
A matrix containing the CAFs, degrees of freedom, and for the factors lying on the hull, the st values of the hull solution (see Lorenzo-Seva, Timmerman, and Kiers 2011 for details). |
solutions_CFI |
A matrix containing the CFIs, degrees of freedom, and for the factors lying on the hull, the st values of the hull solution (see Lorenzo-Seva, Timmerman, and Kiers 2011 for details). |
solutions_RMSEA |
A matrix containing the RMSEAs, degrees of freedom, and for the factors lying on the hull, the st values of the hull solution (see Lorenzo-Seva, Timmerman, and Kiers 2011 for details). |
n_fac_max |
The upper bound J of the number of factors to extract (see details). |
settings |
A list of the settings used. |
Source
Lorenzo-Seva, U., Timmerman, M. E., & Kiers, H. A. (2011). The Hull method for selecting the number of common factors. Multivariate Behavioral Research, 46(2), 340-364.
See Also
Other factor retention criteria: CD
, EKC
,
KGC
, PARALLEL
, SMT
N_FACTORS
as a wrapper function for this and all the
above-mentioned factor retention criteria.
Examples
# using PAF (this will throw a warning if gof is not specified manually
# and CAF will be used automatically)
HULL(test_models$baseline$cormat, N = 500, gof = "CAF")
# using ML with all available fit indices (CAF, CFI, and RMSEA)
HULL(test_models$baseline$cormat, N = 500, method = "ML")
# using ULS with only RMSEA
HULL(test_models$baseline$cormat, N = 500, method = "ULS", gof = "RMSEA")
## Not run:
# using parallel processing (Note: plans can be adapted, see the future
# package for details)
future::plan(future::multisession)
HULL(test_models$baseline$cormat, N = 500, gof = "CAF")
## End(Not run)