Apply BEMA algorithm for spiked covariance proposed in the paper "Estimation of the number of spiked eigenvalues in a covariance matrix by bulk eigenvalue matching analysis""
Usage
BEMA(eigenvalue, p, n, alpha = 0.2, beta = 0.1)
Arguments
- eigenvalue
a list of eigenvalues to choose from
- p
dimension of the features
- n
number of samples
- alpha
a tuning parameter in the analysis, a default value is set to 0.2
- beta
a tuning parameter on computing quantile in Tracy-Widom, a default value is set to be 0.1
Value
The total number of spikes extracted, K
Examples
x = matrix(rnorm(1000, 100), nrow = 1000)
eigen_x = svd(x)
eigen_out = list(eigenvalue = eigen_x$d^2 / 100, p = 1000, n = 100)
BEMA(eigen_out$eigenvalue, p = 1000, n = 100)
#> [1] 0