% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/efa_smt.R
\name{efa_smt}
\alias{efa_smt}
\title{Sequential chi square model tests, RMSEA lower bound, and AIC}
\source{
Auerswald, M., & Moshagen, M. (2019). How to determine the number of
factors to retain in exploratory factor analysis: A comparison of extraction
methods under realistic conditions. Psychological Methods, 24(4), 468–491.
https://doi.org/10.1037/met0000200

Browne, M.W., & Cudeck, R. (1992). Alternative ways of assessing model
fit. Sociological Methods and Research, 21, 230–258.

Preacher, K. J., Zhang G., Kim, C., & Mels, G. (2013). Choosing the
Optimal Number of Factors in Exploratory Factor Analysis: A Model Selection
Perspective, Multivariate Behavioral Research, 48(1), 28-56,
doi:10.1080/00273171.2012.710386

Steiger, J. H., & Lind, J. C. (1980, May). Statistically based tests
for the number of common factors. Paper presented at the annual meeting of
the Psychometric Society, Iowa City, IA.
}
\usage{
efa_smt(
  x,
  N = NA,
  use = c("pairwise.complete.obs", "all.obs", "complete.obs", "everything",
    "na.or.complete"),
  cor_method = c("pearson", "spearman", "kendall", "poly", "tetra"),
  estimate_control = NULL
)
}
\arguments{
\item{x}{data.frame or matrix. Dataframe or matrix of raw data or matrix with
correlations.}

\item{N}{numeric. The number of observations. Needs only be specified if a
correlation matrix is used. Must be larger than the number of variables.}

\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{SMT} rests on a normal-theory chi-square test that is not valid for
polychoric / tetrachoric correlations.
Default is \code{"pearson"}.}

\item{estimate_control}{an \code{\link[=estimate_control]{estimate_control()}} object with the estimation settings for the
sequential \code{\link[=efa_fit]{efa_fit()}} fits. \code{NULL} (default) uses the \code{\link[=efa_fit]{efa_fit()}} defaults. The sequential
models are fitted with maximum likelihood (the chi-square, RMSEA, and AIC the SMT is built on
are defined for it), so of the estimation knobs only \code{start_method} takes effect; the ones
governing principal axis factoring do not apply. The models are unrotated, so no rotation
settings apply either.}
}
\value{
An object of class \code{efa_retention} (see \code{\link[=print.efa_retention]{print.efa_retention()}} for
the print method). SMT has no plot; \code{\link[=plot.efa_retention]{plot.efa_retention()}} returns \code{NULL}
with a message for it. Its main fields are:
\item{n_factors}{A named numeric vector (\code{"chi"}, \code{"RMSEA"}, \code{"AIC"}) with the
suggested number of factors from the sequential chi-square model tests, the
RMSEA lower bound, and the AIC.}
\item{results}{A list with one record per criterion, each holding the criterion
values for the null model (zero factors) through the maximum number of
factors.}
\item{settings}{A list of the settings used.}
}
\description{
Sequential chi square model tests (SMT) are a factor retention method where
multiple
EFAs with increasing numbers of factors are fitted and the number of factors
for which the Chi Square value first becomes non-significant is taken as the
suggested number of factors.
Preacher, Zhang, Kim, & Mels (2013) suggested a similar approach with the
lower bound of the 90\% confidence interval of the Root Mean Square Error of
Approximation (RMSEA; Browne & Cudeck, 1992; Steiger & Lind, 1980), and with
the Akaike Information Criterion (AIC). For the RMSEA, the
number of factors for which this lower bound first falls below .05 is the
suggested number of factors to retain. For the AIC, it is the number of factors
where the AIC is lowest.
}
\details{
As a first step in the procedure, a maximum number of factors to extract is
determined for which the model is still over-identified (df > 0).

Then, EFAs with increasing numbers of factors from 1 to the maximum number are
fitted with maximum likelihood estimation.

For the SMT, first the significance of the chi
square value for a model with 0 factors is determined. If this value is
not significant, 0 factors are suggested to retain. If it is significant,
a model with 1 factor is estimated and the significance of its chi square value
is determined, and so on, until a non-significant result is obtained. The
suggested number of factors is the number of factors for the model where the
chi square value first becomes non-significant.

Regarding the RMSEA, the suggested number of factors is the number of factors
for the model where the lower bound of the 90\% confidence interval of the
RMSEA first falls below the .05 threshold.

Regarding the AIC, the suggested number of factors is the number of factors
for the model with the lowest AIC.

The sequential models are fitted without inequality constraints, so a solution
can be inadmissible (a Heywood case, or a fit that did not converge). Only the
models the three rules actually select are checked for this; if one of them is
inadmissible a warning is raised and the corresponding suggestion should be
interpreted with caution.

In comparison with other prominent factor retention criteria, SMT performed
well at determining the number of factors to extract in EFA (Auerswald &
Moshagen, 2019). The RMSEA lower bound also performed well at determining the true
number of factors, while the AIC performed well at determining the
most generalizable model (Preacher, Zhang, Kim, & Mels, 2013).
}
\examples{
SMT_base <- efa_smt(test_models$baseline$cormat, N = 500)
SMT_base

}
\seealso{
\code{\link[=efa_retain]{efa_retain()}} as a wrapper function for this and the other factor
retention criteria.

Other factor retention criteria:
\code{\link[=efa_cd]{efa_cd()}},
\code{\link[=efa_ekc]{efa_ekc()}},
\code{\link[=efa_hull]{efa_hull()}},
\code{\link[=efa_kgc]{efa_kgc()}},
\code{\link[=efa_map]{efa_map()}},
\code{\link[=efa_nest]{efa_nest()}},
\code{\link[=efa_parallel]{efa_parallel()}},
\code{\link[=efa_retain]{efa_retain()}},
\code{\link[=efa_scree]{efa_scree()}}
}
\concept{factor retention criteria}
