Skip to contents

Eigenvalues of the column-centred covariance (scree), the elbow (largest gap below the chord from first to last eigenvalue) and Horn's parallel analysis against Philox column permutations, with a Monte Carlo p-value for the second dimension.

Usage

Dimensionality(X, n_sim = 100, seed = 0, quantile = 0.95)

Arguments

X

Data matrix (rows are units).

n_sim

Number of permuted matrices.

seed

Philox seed.

quantile

Threshold quantile.

Value

list(eigenvalues, share, elbow, parallel, threshold, p_second).

References

Horn, J. L. (1965). A rationale and test for the number of factors in factor analysis. Psychometrika 30, 179-185. Cattell, R. B. (1966). The scree test for the number of factors. Multivariate Behavioral Research 1, 245-276.

Examples

Dimensionality(cbind(1:4, 2 * (1:4)), n_sim = 0)$share
#> [1] 1 0