Covest | R Documentation |
This function estimate the covariance matrix under l2 loss and minimum variance loss, provide linear shrinkage estimator under l2 loss and nonlinear shrinkage estimator under minimum variance loss.
Covest(Z, method = c("mv", "l2"), bandwidth = NULL)
Z |
n*p matirx with sample size n and dimension p. Replicates for computing the covariance matrix, should be centered. |
method |
methods used for estimating the covariance matrix. |
bandwidth |
bandwidth for the "mv" estimator, default value are set to be list in (0.2, 0.5). |
regularized estimate of covariance matrix.
Yan Li
Olivier Ledoit and Michael Wolf (2004), A well-conditioned estimator for large-dimensional covariance matrices, Journal of multivariate analysis, 88(2), 365–411.
Olivier Ledoit and Michael Wolf (2017), Direct nonlinear shrinkage estimation of large-dimensional covariance matrices, Working Paper No. 264, UZH.
Li et al (2023), Regularized fingerprinting in detection and attribution of climate change with weight matrix optimizing the efficiency in scaling factor estimation, Ann. Appl. Stat. 17(1), 225–239.
## randomly generate a n * p matrix where n = 50, p = 100
Z <- matrix(rnorm(50 * 100), nrow = 50, 100)
## linear shrinkage estimator under l2 loss
Cov.est <- Covest(Z, method = "l2")$output
## nonlinear shrinkage estimator under minimum variance loss
Cov.est <- Covest(Z, method = "mv", bandwidth = 0.35)$output
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.