Description Usage Arguments NOTE References
View source: R/nlshrink_demo.R
This is a demonstration of the non-linear shrinkage method for
estimating population eigenvalues. The inputted population eigenvalues are
used to simulate a matrix of multivariate normal random variates with
covariance matrix diag(tau)
. This data matrix is then used to
estimate the input population eigenvalues using the non-linear shrinkage
method. The output plot shows the comparison of the various estimators
(sample eigenvalues, linear shrinkage, non-linear shrinkage) to the true
population eigenvalues.
1 2 | nlshrink_demo(tau = NULL, n = 300, p = 300, method = "nlminb",
control = list())
|
tau |
(Optional) Input population eigenvalues. Non-negative Numeric
vector of length |
n |
(Optional) Number of rows in simulated data matrix (Default 300). |
p |
(Optional) Number of columns in simulated data matrix (Default 300). |
method |
(Optional) The optimization routine called in
|
control |
(Optional) A list of control parameters. Must correspond to
the selected optimization method. See |
nlminb
is usually robust and accurate, but does not
allow equality constraints, so the sum of the estimated population
eigenvalues is in general not equal to the sum of the sample eigenvalues.
nloptr
enforces an equality constraint to preserve the trace, but is
substantially slower than nlminb
. The default optimizer used for
nloptr
is the Augmented Lagrangian method with local optimization
using LBFGS. These can be modified using the control parameter.
Rcgmin
does not enforce equality constraints, but may be more
efficient for certain higher dimensional problems. The ideal optimization
routine depends on the underlying structure of the population eigenvalues.
Ledoit, O. and Wolf, M. (2015). Spectrum estimation: a unified framework for covariance matrix estimation and PCA in large dimensions. Journal of Multivariate Analysis, 139(2)
Ledoit, O. and Wolf, M. (2016). Numerical Implementation of the QuEST function. arXiv:1601.05870 [stat.CO]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.