View source: R/correct_eigenvalues.R
correct_eigenvalues | R Documentation |
This function correct eigenvalues from a subspace by substracting sampling eigenvalues from a random noise matrix N of the same dimension as x,which follows a Marcenko-Pastur distribution with package "RMTsata "(https://cran.r-project.org/web/packages/RMTstat/index.html).
correct_eigenvalues(subspace, num_est_samples, verbose, ...)
subspace |
A subspace object. |
num_est_samples |
the number of resamples to take from the Marcenko-Pastur distribution to estimate the eigenvalues. |
verbose |
output message |
... |
Extra parameters |
Returns a list with entries:
The number of degrees of freedom of x.
The number of dimensions of x.
A series of right singular vectors estimated.
Corrected population variance for Marcenko-Pastur distribution.
A logical value indicating whether the matrix x is transposed.
A data frame of scaled eigenvalues for specified components and corresponding dimensions.
A vector of corrected eigenvalues up to max(components).
A data frame of sampled expected eigenvalues from Marcenko-Pastur for specified components and corresponding dimensions.
A vector of samped expected eigenvalues from Marcenko-Pastur up to max(components).
Right singular vectors of x matrix for specified components.
Left singular vectors of x matrix or specified components.
* [MarchenkoPasturPar()] calculates upper and lower limits of Marcenko-Pastur distribution from RMTstat package.
* [rmp()] sample scaled eigenvalues of random noise matrix from RMTstat package.
x <- x_sim(n = 100, p = 150, ncc = 10, var = c(rep(10, 5), rep(1, 5))) x %>% create_subspace(components = 8:30) %>% correct_eigenvalues() %>% plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.