Compute the Ledoit-Wolf shrinkage estimator for the covariance or correlation matrix.
Arguments
- X
A data matrix.
- method
A character string (default = "linshrink") specifying the method used in shrinkage, includes:
"linshrink": linear shrinkage ledoit2004wellfcstat.
"nlshrink": non-linear shrinkage ledoit2015spectrum,ledoit2017numericalfcstat.
See
linshrink_cov
andnlshrink_cov
for details.- res
A character string (default = "cov") specifying the result matrix to be obtained, either the covariance matrix ("cov") or the correlation matrix ("cor").