The function allows performing parallel analysis, which is a way to test for
the number of significant eigenvalues/axes in a PCA.
In this implementation, a null distribution of eigenvalues is obtained
by randomly permuting observations independently for each of the starting variables.
To compute p values, the observed eigenvalues are
compared to the corresponding eigenvalues from this null distribution.
Parallel analysis may be used for dimensionality reduction, retaining
only the first block of consecutive significant axes.
That is, if for example the first 3 axes were significant, then the fourth not significant,
one would keep only the first 3 axes (regardless of significance of the axes from the fifth on).
Similarly, if the first axis is not significant, this may suggest lack of a clear structure in the data.
The function internally employs three possible strategies to obtain eigenvalues (argument of fun):
"prcomp" - the function prcomp (default)
"fastSVD" - an approach based on the function fast.svd (requires the package corpcor)
"shrink" - a decomposition of the covariance matrix estimated using linear shrinkage (much slower, requires the package nlshrink; Ledoit & Wolf 2004)
This choice should not make much difference in terms of the final result.
However, for consistency, it is a good idea to use for parallel analysis the same function
used for the actual PCA (this is why these three options are provided).