nlshrink_demo: Demonstration of non-linear shrinkage estimator of population...

Description Usage Arguments NOTE References

View source: R/nlshrink_demo.R

Description

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.

Usage

1
2
nlshrink_demo(tau = NULL, n = 300, p = 300, method = "nlminb",
  control = list())

Arguments

tau

(Optional) Input population eigenvalues. Non-negative Numeric vector of length p.

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 tau_estimate. Choices are nlminb (default) and nloptr.

control

(Optional) A list of control parameters. Must correspond to the selected optimization method. See nlminb, nloptr for details.

NOTE

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.

References


nlshrink documentation built on May 1, 2019, 8:42 p.m.