% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EFAtools-superseded.R
\name{PARALLEL}
\alias{PARALLEL}
\title{Parallel analysis}
\usage{
PARALLEL(
  x = NULL,
  N = NA,
  n_vars = NA,
  n_datasets = 1000,
  percent = 95,
  eigen_type = c("PCA", "SMC", "EFA"),
  use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
    "na.or.complete"),
  cor_method = c("pearson", "spearman", "kendall", "poly", "tetra"),
  decision_rule = c("means", "percentile", "crawford"),
  n_factors = 1,
  ...
)
}
\arguments{
\item{x}{matrix or data.frame. The real data to compare the simulated eigenvalues
against. Must not contain variables of classes other than numeric. Can be a
correlation matrix or raw data.}

\item{N}{numeric. The number of cases / observations to simulate. Only has to
be specified if \code{x} is either a correlation matrix or \code{NULL}. If
x contains raw data, \code{N} is found from the dimensions of \code{x}. Must be larger
than the number of variables.}

\item{n_vars}{numeric. The number of variables / indicators to simulate.
Only has to be specified if \code{x} is left as \code{NULL} as otherwise the
dimensions are taken from \code{x}.}

\item{n_datasets}{numeric. The number of datasets to simulate. Must be at
least 1. Default is 1000.}

\item{percent}{numeric. The percentile to take from the simulated eigenvalues.
Default is 95.}

\item{eigen_type}{character. On what the eigenvalues should be found. Can be
either "SMC", "PCA", or "EFA". If using "SMC", the diagonal of the correlation
matrix is replaced by the squared multiple correlations (SMCs) of the
indicators. If using "PCA", the diagonal values of the correlation matrices
are left to be 1. If using "EFA", eigenvalues are found on the correlation
matrices with the final communalities of an EFA solution as diagonal. Default
is \code{c("PCA", "SMC", "EFA")}, i.e. all three, which costs roughly six times a
single non-EFA type: \code{"EFA"} fits an EFA to every simulated dataset and
dominates that total. Pass a single type if the run is time-critical.}

\item{use}{character. Passed to \code{\link[stats:cor]{stats::cor()}} if raw data
is given as input. Default is "pairwise.complete.obs".}

\item{cor_method}{character. One of \code{"pearson"}, \code{"spearman"}, or \code{"kendall"},
passed to \code{\link[stats:cor]{stats::cor()}}. \code{"poly"} and \code{"tetra"} are not supported because
\code{PARALLEL} compares the data against simulated continuous reference data.
Default is "pearson".}

\item{decision_rule}{character. Which rule to use to determine the number of
factors to retain. Default is \code{"means"}, which will use the average
simulated eigenvalues. \code{"percentile"}, uses the percentiles specified
in percent. \code{"crawford"} uses the 95th percentile for the first factor
and the mean afterwards (based on Crawford et al, 2010). All three rules retain
the factors up to the first observed eigenvalue that fails to exceed its
reference value; an eigenvalue further down the series that rises above its own
reference again therefore adds no factor. Because the average simulated
eigenvalue is a lower reference than the percentile, \code{"means"} tends to retain
more factors than the more conservative \code{"percentile"} rule (Glorfeld, 1995).}

\item{n_factors}{numeric. Number of factors to extract if "EFA" is included in
\code{eigen_type}. Default is 1.}

\item{...}{Further arguments passed on to the \code{\link[=efa_fit]{efa_fit()}} fits. For example,
\code{estimator}, to change the estimator (default is "PAF"; PAF is more robust, but it
will take longer compared to "ML" and "ULS"), or one of the estimation tuning knobs
(\code{type}, \code{init_comm}, \code{criterion}, \code{criterion_type}, \code{max_iter}, \code{abs_eigen},
\code{start_method}), which are repacked into an \code{\link[=estimate_control]{estimate_control()}} object so that they
tune the fits exactly as they always did.}
}
\value{
An object of class \code{efa_retention}, identical to the value of
\code{\link[=efa_parallel]{efa_parallel()}}; see there for the components.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}}

\code{PARALLEL()} has been superseded by \code{\link[=efa_parallel]{efa_parallel()}}, which is the recommended
interface going forward. It remains available and unchanged so existing code
keeps working.
}
\seealso{
\code{\link[=efa_parallel]{efa_parallel()}}
}
