ZG: Automatic Dimensionality Selection from the Scree Plot via...

Description Usage Arguments Value Author(s) References Examples

View source: R/Zhu_Ghodsi.R

Description

The function returns the estimated dimension from a scree plot using a profile likelihood criterion. The method requires only the sample eigenvalues.

Usage

1
ZG(lambda, tau = 0.001, verbose = FALSE)

Arguments

lambda

a numerical vector of sample eigenvalues of length $n$

tau

a tolerance threshold for the smallest eigenvalue, the default value is 0.001.

verbose

a logical to indicate whether the details of the profile log-likelihood evidence should be shown

Value

an integer $K$ between 1 and $n$.

Author(s)

Wei Q. Deng, dengwq@mcmaster.ca and Radu V. Craiu craiu@utoronto.ca

References

Zhu, M., & Ghodsi, A. (2006). Automatic dimensionality selection from the scree plot via the use of profile likelihood. **Computational Statistics & Data Analysis**, *51*(2), 918-930. <doi:10.1016/j.csda.2005.09.010>

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(MASS)
normdata <- mvrnorm(1000, mu = rep(0,50), Sigma = diag(1,50))
eigen_values <- eigen(as.matrix(Matrix::nearPD(stats::cov(scale(normdata)))$mat))$val

ZG(lambda = eigen_values) # supply the sample eigenvalues

## End(Not run)

WeiAkaneDeng/SPAC2 documentation built on Jan. 15, 2022, 5:01 a.m.