nest: Nest Eigenvalue Sufficiency Test (NEST)

View source: R/nest.R

nestR Documentation

Nest Eigenvalue Sufficiency Test (NEST)

Description

nest is used to identify the number of factors to retain in exploratory factor analysis.

Usage

nest(
  data,
  n = NULL,
  nrep = 1000,
  alpha = 0.05,
  max.fact = ncol(data),
  method = "ml",
  ...
)

Arguments

data

A data frame, a numeric matrix, covariance matrix or correlation matrix from which to determine the number of factors.

n

The number of cases (subjects, participants, or units) if a covariance matrix is supplied in data.

nrep

The number of replications to simulate. Default is 1000.

alpha

A vector of type I error rates or (1-alpha)*100% confidence intervals. Default is .05.

max.fact

An optional maximum number of factor to extract. Default is max.fact = ncol(data).

method

A method used to compute loadings and uniquenesses. Four methods are implemented in Rnest : maximum likelihood method = "ml" (default), regularized common factor analysis method = "rcfa", minimum rank factor analysis method = "mrfa", and principal axis factoring method = "paf". See details for custom methods.

...

Arguments for method that can be supplied. See details.

Details

The Next Eigenvalues Sufficiency Test (NEST) is an extension of parallel analysis by adding a sequential hypothesis testing procedure for every k = 1, ..., p factor until the hypothesis is not rejected.

At k = 1, NEST and parallel analysis are identical. Both use an Identity matrix as the correlation matrix. Once the first hypothesis is rejected, NEST uses a correlation matrix based on the loadings and uniquenesses of the k^{th} factorial structure. NEST then resamples the eigenvalues of this new correlation matrix. NEST stops when the $k_1^2$ eigenvalues is within the confidence interval.

There is two method already implemented in nest to extract loadings and uniquenesses: maximum likelihood ("ml"; default), principal axis factoring ("paf"), and minimum rank factor analysis ("mrfa"). The functions use as arguments: covmat, n, factors, and ... (supplementary arguments passed by nest). They return loadings and uniquenesses. Any other user-defined functions can be used as long as it is programmed likewise.

Value

nest returns an object of class nest. The functions summary and plot are used to obtain and show a summary of the results.

An object of class nest is a list containing the following components:

  • nfactors - The number of factors to retains (one by alpha).

  • cor - The supplied correlation matrix.

  • n - The number of cases (subjects, participants, or units).

  • values - The eigenvalues of the supplied correlation matrix.

  • alpha - The type I error rate.

  • method - The method used to compute loadings and uniquenesses.

  • nrep - The number of replications used.

  • prob - Probabilities of each factor.

  • Eig - A list of simulated eigenvalues.

Generic function

plot.nest Scree plot of the eigenvalues and the simulated confidence intervals for alpha.

loadings Extract loadings. It does not overwrite stat::loadings.

Author(s)

P.-O. Caron

References

Achim, A. (2017). Testing the number of required dimensions in exploratory factor analysis. The Quantitative Methods for Psychology, 13(1), 64-74. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.20982/tqmp.13.1.p064")}

Examples

nest(ex_2factors, n = 100)
nest(mtcars)

Rnest documentation built on May 29, 2024, 2:25 a.m.