NEST uses many synthetic datasets to generate reference eigenvalues against which to compare the empirical eigenvalues. This is similar to parallel analysis, but other than parallel analysis, NEST does not just rely on synthetic eigenvalues based on an identity matrix as null model. It was introduced by Achim (2017), see also Brandenburg and Papenberg (2024) and Caron (2025) for further simulation studies including NEST.
efa_nest(
x,
N = NA,
alpha = 0.05,
use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
"na.or.complete"),
cor_method = c("pearson", "spearman", "kendall", "poly", "tetra"),
n_datasets = 1000,
estimate_control = NULL,
...
)An object of class efa_retention (see print.efa_retention() and
plot.efa_retention() for the print and plot methods). Its main fields are:
A named numeric vector ("NEST") with the suggested number of
factors according to the NEST procedure.
A list with a single record holding the empirical eigenvalues
and the reference eigenvalues. Only the positions the search actually tested
carry a reference value; beyond the position at which it stopped the series is
NA.
A list of control settings used.
data.frame or matrix. Dataframe or matrix of raw data or matrix with correlations.
numeric. The number of observations. Only needed if x is a correlation matrix. Must be larger than the number of variables.
numeric. The alpha level to use (i.e., 1-alpha percentile of eigenvalues is used for reference values).
character. Passed to stats::cor() if raw
data is given as input. Default is "pairwise.complete.obs".
character. One of "pearson", "spearman", or "kendall",
passed to stats::cor(). "poly" and "tetra" are not supported because
NEST compares the data against simulated continuous reference data.
Default is "pearson".
numeric. The number of datasets to simulate. Default is 1000.
an estimate_control() object with the estimation settings for the
efa_fit() reference-model fits. NULL (default) uses the efa_fit() defaults. The
reference models are unrotated, so no rotation settings apply.
Additional arguments passed to efa_fit(). For example,
estimator, to change the estimator (default is "PAF"). PAF is more
robust, but it will take longer compared to the other estimators
available ("ML" and "ULS"). The estimation tuning knobs are not passed here; they
live in estimate_control, and the standard-error arguments (se, b_boot, ci,
seed) are not accepted because the reference-model fits are internal steps.
NEST compares the first empirical eigenvalue against the first eigenvalues
of n_dataset synthetic datasets based on a null model (i.e.,
with uncorrelated variables; same as in parallel analysis, see efa_parallel()).
The following eigenvalues are compared against synthetic datasets based on an EFA-model with one fewer factors
than the position of the respective empirical eigenvalue. E.g, the second
empirical eigenvalue is compared against synthetic data based on a one-factor
model. In each comparison the \(k\)-th empirical eigenvalue is tested against
the \(k\)-th largest eigenvalue of the synthetic datasets. The alpha-level
defines against which percentile of the synthetic
eigenvalue distribution to compare the empirical eigenvalues against, i.e., an
alpha of .05 (the default) uses the 95th percentile as reference value.
The number of factors tested is capped at \(\lfloor 0.8 \times p \rfloor\) (with \(p\) the number of variables; Achim, 2017) and additionally limited so that the \((k - 1)\)-factor reference model used at each step stays over-identified. If no empirical eigenvalue falls at or below its reference within this range, every tested factor is accepted and this capped number is returned.
Because each reference model carries the factors already retained, NEST does not
lose accuracy for the strongly correlated factor structures where parallel
analysis tends to under-extract, and it was among the more accurate criteria in
the simulation studies of Brandenburg and Papenberg (2024) and Caron (2025). The
price is runtime: a fresh set of n_datasets reference datasets is drawn and
eigen-decomposed at every candidate factor count, which makes NEST one of the
slowest criteria available here.
The reference models are fitted without inequality constraints. A Heywood case in one of them leaves no unique variance to simulate the reference data from, so NEST aborts rather than continuing from an inadmissible reference.
The reference eigenvalues are obtained from simulated data, so the suggested number
of factors varies slightly from run to run. Call base::set.seed() beforehand to make a
run reproducible.
For details on the method, including simulation studies, see Achim (2017), Brandenburg and Papenberg (2024), and Caron (2025).
The efa_nest function can also be called together with other factor
retention criteria in the efa_retain() function.
efa_retain() as a wrapper function for this and the other factor
retention criteria.
Other factor retention criteria:
efa_cd(),
efa_ekc(),
efa_hull(),
efa_kgc(),
efa_map(),
efa_parallel(),
efa_retain(),
efa_scree(),
efa_smt()
# \donttest{
# with correlation matrix
efa_nest(test_models$baseline$cormat, N = 500)
# with raw data
efa_nest(GRiPS_raw)
# }
Run the code above in your browser using DataLab