EFA() has been superseded by efa_fit(), which is the recommended interface going
forward. efa_fit() keeps the primary choices (data, factors, estimator, rotation,
standard errors) as top-level arguments and collects the estimation and rotation tuning
knobs into two control objects, estimate_control() and rotate_control(). EFA()
remains available and unchanged -- its full flat argument list still works exactly as
before -- so existing code keeps running.
EFA(
x,
n_factors,
N = NA,
method = c("PAF", "ML", "ULS", "MINRES", "DWLS"),
rotation = c("none", "varimax", "equamax", "quartimax", "geominT", "bentlerT",
"bifactorT", "promax", "oblimin", "quartimin", "simplimax", "bentlerQ", "geominQ",
"bifactorQ"),
se = c("none", "information", "sandwich", "np-boot"),
type = c("EFAtools", "psych", "SPSS", "none"),
max_iter = NA,
init_comm = NA,
criterion = NA,
criterion_type = NA,
abs_eigen = NA,
use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
"na.or.complete"),
varimax_type = NA,
k = NA,
normalize = TRUE,
p_type = NA,
precision = 1e-05,
order_type = NA,
start_method = "psych",
cor_method = c("pearson", "spearman", "kendall", "poly", "tetra", "fiml"),
b_boot = 1000,
ci = 0.95,
random_starts = 100,
seed = NULL,
P_type = lifecycle::deprecated(),
randomStarts = lifecycle::deprecated(),
...
)The value of efa_fit(), a list of class c("efa", "EFA"); see there for the
components.
data.frame or matrix. Dataframe or matrix of raw data or matrix with correlations. If raw data is entered, the correlation matrix is found from the data.
numeric. Number of factors to extract. Must be at least 1 and
smaller than the number of variables (the common factor model is not identified
otherwise). Use efa_retain() to decide on a value.
numeric. The number of observations. Needs only be specified if a
correlation matrix is used; with raw data, N is found from the data instead.
With N = NA, not all fit indices can be computed; a positive N that is very
small relative to the number of variables leaves the chi-square-derived indices
unavailable as well, with a warning.
With raw data, N is the number of cases the correlation matrix was actually
computed from -- see use for the general rule and how missing values change it.
Under cor_method = "fiml", use is ignored and N is instead the number of
cases carrying at least one observed value.
character. The estimator used to fit the EFA; passed to efa_fit()
as its estimator argument. One of "PAF", "ML", "ULS", "MINRES" (an accepted
alias of "ULS"), or "DWLS"; see the efa_fit() documentation for their
properties and data requirements.
character. Either perform no rotation ("none"; default), an orthogonal rotation ("varimax", "equamax", "quartimax", "geominT", "bentlerT", or "bifactorT"), or an oblique rotation ("promax", "oblimin", "quartimin", "simplimax", "bentlerQ", "geominQ", or "bifactorQ"). See the Rotations section in Details for their properties and known issues.
character. Whether and how to compute standard errors (and matching
confidence intervals): "none" (default), "information" (analytic
standard errors from the expected Fisher information of the ML solution), "sandwich"
(robust "sandwich" standard errors from raw data, which stay reliable under
non-normality or a misspecified estimator weight), or "np-boot" (non-parametric
bootstrap). The
methods differ in their assumptions, their data requirements, and which estimator,
rotation, and cor_method combinations they support; see the Standard errors
section in Details.
character. If one of "EFAtools" (default), "psych", or "SPSS" is
used, and the following arguments with default NA are left with
NA, these implementations are executed according to the respective program
("psych" and "SPSS") or according to the best solution found in Grieder &
Steiner (2022; "EFAtools"). Individual properties can be adapted using one of
the three types and specifying some of the following arguments. If set to
"none" additional arguments must be specified depending on the method
and rotation used (see details).
numeric. The maximum number of iterations to perform after which
the iterative PAF procedure is halted with a warning. If type is one of
"EFAtools", "SPSS", or "psych", this is automatically specified if max_iter is
left to be NA, but can be overridden by entering a number. Default is
NA.
character. The method to estimate the initial communalities
in PAF. "smc" will use squared multiple correlations, "mac" will use
maximum absolute correlations, "unity" will use 1s (see details).
Default is NA.
numeric. The convergence criterion used for PAF.
If the change in communalities from one iteration to the next is smaller than
this criterion the solution is accepted and the procedure ends.
Default is NA.
character. Type of convergence criterion used for
PAF. "max_individual" selects the maximum change in any of the
communalities from one iteration to the next and tests it against the
specified criterion. This is also used by SPSS. "sum" takes the difference of
the sum of all communalities in one iteration and the sum of all communalities
in the next iteration and tests this against the criterion. This procedure is
used by the psych::fa() function. Default is NA.
logical. Which algorithm to use in the PAF
iterations. If FALSE, the loadings are computed from the eigenvalues. This is
also used by the psych::fa() function. If TRUE the
loadings are computed with the absolute eigenvalues as done by SPSS.
Default is NA.
character. Passed to stats::cor() if raw data
is given as input. Default is "pairwise.complete.obs". It is ignored when
cor_method = "fiml" (which handles the missingness itself, so every case
contributes), and it is overridden to listwise deletion whenever an asymptotic
covariance is required (the "DWLS" estimator, or se = "sandwich"), because the
covariance must describe the same cases as the correlation matrix.
character. The type of the varimax rotation performed.
If "svd", singular value decomposition is used, as stats::varimax() does. If
"kaiser", the varimax procedure performed in SPSS is used, following the original
procedure from Kaiser (1958) (see details). Default is NA.
numeric. Either the power used for computing the target matrix P in
the promax rotation or the number of 'close to zero loadings' for the simplimax
rotation. If left to NA (default), the value for promax depends on the specified type.
For simplimax, nrow(L), where L is the matrix of unrotated loadings,
is used by default.
logical. If TRUE, a kaiser normalization is
performed before the specified rotation. Default is TRUE.
character. This specifies how the target
matrix P is computed in promax rotation. If "unnorm" it will use the
unnormalized target matrix as originally done in Hendrickson and White (1964).
This is also used in the psych and stats packages. If "norm" it will use the
normalized target matrix as used in SPSS. Default is NA.
numeric. The tolerance for stopping in the rotation procedure. Default is 10^-5 for all rotation methods.
character. How to order the factors. "eigen" reorders the
factors by descending explained variance; "ss_factors" reorders the factors by
descending (unweighted) sum of squared factor loadings per factor. Default is NA.
character. How to specify the starting values for the
optimization procedure for ML. Default is "psych" which takes the
starting values specified in psych::fa(). "factanal" takes the
starting values specified in the stats::factanal() function.
character. How the correlation is computed from raw data:
"pearson", "spearman", or "kendall" (passed to stats::cor()); "poly" /
"tetra" for polychoric / tetrachoric correlations of ordinal / binary data; or
"fiml" for a two-stage full-information maximum-likelihood correlation from raw data
with missing values. See the Correlation methods section in Details for their
properties and the combinations they support. Default is "pearson".
numeric. The number of bootstrap samples to draw. Default is 1000.
Must be at least 2, the smallest number from which a standard error is defined.
Under cor_method = "fiml" each bootstrap sample re-runs the EM moment
estimation, so a smaller value may be advisable.
numeric. The level of the confidence intervals: the percentile intervals from
the bootstrap samples under se = "np-boot", and the analytic Wald intervals under
se = "information" and se = "sandwich", the corrected two-stage intervals of
cor_method = "fiml" included. Must be greater than 0 and smaller than 1. Default is
.95 for 95% CIs.
numeric. The number of random starts to use in the rotation to guard against local minima. Default is 100.
numeric. An optional seed for the random-number generator.
Former names of
p_type and random_starts. Still accepted (silently) for backwards
compatibility; please use the new names.
Additional arguments passed to the rotation procedure (e.g., maxit for
the maximum number of iterations).
efa_fit(), estimate_control(), rotate_control()