R function aimed to identify the number of components/factors starting by a raw data matrix by using the principles of Horn's Parallel Analysis.
parallel(x, iter = 1000, ordinal = FALSE, method = c("perm", "random"),
alpha = 0.05, standard = FALSE, plot = TRUE, fn = eigen, ...)
-
xData frame or matrix of raw data. -
iterNumber of iterations. -
ordinalIf TRUE, the function uses the polychoric/tetrachoric correlation instead of the Pearson's index (very slow).} -
methodMethod for random data generation. When method isperm, random permutations of observed data are used (permutation is performed within each column independently). When method israndom, random data normally distributed are generated. -
alphaAlpha threshold to select the number of components/factors. -
standardIf TRUE, the analysis is performed on standardized data. -
plotShows the scree plot overlapping the observed eigen values. -
fnFunction to calculate eigenvalues. The defaulteigenuses the principal component analysis with eigen decomposition, whilepsych::facalculates eigenvalues according to factor analysis. -
...Further arguments for the functionfn.
The function returns an object of S3 class parallel listing elements:
-
correlationtype of correlation index used. -
methodmethod of data generation (random or permutations). -
synthetic.eigenmatrix of eigen values from iterations of parallel analysis. -
pca.eigenestimated eigenvalues from observed data. -
parallel.CIaverages and confidence intervals of eigen values estimated by parallel analysis. -
parallel.quantilesquantiles of eigenvalues estimated by parallel analysis. -
suggest.ncompsuggested number of components/factors.
The plot method returns the scree plot overlapping parallel quantiles (gray points and bars).
The basic functionalities are stand-alone, but the package psych is required to run analyses for ordinal data.
Buja A., Eyuboglu N. (1992). Remarks on parallel analysis. Multivariate Behavioral Research, 27(4), 509-540.
Crawford A.V., Green S.B., Levy R., Lo W.J. Scott L., Svetina D., Thompson M.S. (2010). Evaluation of parallel analysis methods for determining the number of factors. Educational and Psychological Measurement, 70(6), 885-901.
Horn J.L. (1965). A rationale and test for the number of factors in factor analysis. Psychometrika, 30, 179-185.
Franklin S.B., Gibson D.J., Robertson P.A., Pohlmann J.T., Fralish, J.S. (1995). Parallel analysis: a method for determining significant principal components. Journal of Vegetation Science, 6(1), 99-106.
Peres-Neto P.R., Jackson D.A., Somers K.M. (2005). How many principal components? Stopping rules for determining the number of non-trivial axes revisited. Computational Statistics and Data Analysis, 49, 974-997.
Weng L.J., Cheng C.P. (2005). Parallel analysis with unidimensional binary data. Educational and Psychological Measurement, 65(5), 697-716.