passemier: A bias corrected criterion for selecting number of principal...

Description Usage Arguments Value References Examples

View source: R/passemier2017.R

Description

The function returns the choice for PCA as a by-product of the bias-corrected residual variance estimate.

Usage

1
passemier(lambda = NULL, M = NULL, tau = 0.001, constant = 0.05)

Arguments

lambda

a numeric vector of sample eigenvalues of length $n$.

M

the number of observations.

tau

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

constant

a small prefixed constant and set to the recommended value of 0.05. See Passemier et al., (2017) for details.

Value

an integer K

References

Passemier, D., Li, Z., & Yao, J. (2017). On estimation of the noise variance in high dimensional probabilistic principal component analysis. **Journal of the Royal Statistical Society: Series B (Statistical Methodology)**, *79*(1), 51-67. <doi:10.1111/rssb.12153>

Examples

1
2
3
4
5
6
7
## Not run: 
X <- MASS::mvrnorm(1000, mu = rep(0,10), Sigma = diag(1,10))
eigen_values <- eigen(as.matrix(Matrix::nearPD(stats::cov(scale(X)))$mat))$val
passemier(lambda = eigen_values, M = 100)
passemier(lambda = eigen_values, M = 5000)

## End(Not run)

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