selbroken | R Documentation |
The function helps selecting the dimension (i.e. nb. components) of a PCA model using the broken-stick method proposed by Frontier 1976.
The input matrix X
is centered and scaled internally to the function. The eigenvalues are compared to the means of the length of ordered random sections of a stick of size = 1 (broken-stick distribution).
selbroken(X, ncomp, algo = NULL,
plot = TRUE,
xlab = "Nb. components", ylab = NULL,
...)
X |
A |
ncomp |
The maximal number of PCA scores (= components = latent variables) to be calculated. |
algo |
A function (algorithm) implementing a PCA. Default to |
plot |
Logical. If |
xlab |
Label for the x-axis of the plot. |
ylab |
Label for the y-axis of the plot. |
... |
Optionnal arguments to pass in the function defined in |
A list of several items, see the examples. Output opt
is the selected number of components.
Bro, R., Smilde, A.K., 2014. Principal component analysis. Anal. Methods 6, 2812-2831. https://doi.org/10.1039/C3AY41907J
Dinno, A., 2009. Exploring the Sensitivity of Hornâs Parallel Analysis to the Distributional Form of Random Data. Multivariate Behavioral Research 44, 362-388. https://doi.org/10.1080/00273170902938969
Horn, J.L., 1965. A rationale and test for the number of factors in factor analysis. Psychometrika 30, 179-185. https://doi.org/10.1007/BF02289447
Jackson, D.A., 1993. Stopping Rules in Principal Components Analysis: A Comparison of Heuristical and Statistical Approaches. Ecology 74, 2204-2214. https://doi.org/10.2307/1939574
data(datoctane)
X <- datoctane$X
## removing outliers
zX <- X[-c(25:26, 36:39), ]
plotsp(zX)
ncomp <- 30
selbroken(zX, ncomp = ncomp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.