Description Usage Arguments Value Examples
The function returns the dimension that is selected based on various methods that attempt to detect an “elbow” in sample eigenvalues.
1 | elbowEigen(lambda, methods = c("adjD", "cumD", "varD", "cumlog", "logsigma2"))
|
lambda |
a numeric vector of positive sample eigenvalues of length n |
methods |
a character vector of possible methods to detect an elbow in sample eigenvalues. |
an integer $K$ between 1 and $n$.
1 2 3 4 5 6 7 8 | ## Not run:
library(MASS)
X <- mvrnorm(1000, mu = rep(0,10), Sigma = diag(1,10))
eigen_values <- eigen(as.matrix(Matrix::nearPD(stats::cov(scale(X)))$mat))$val
elbowEigen(lambda = eigen_values)
elbowEigen(lambda = eigen_values)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.