Skip to contents

Compute the Ledoit-Wolf shrinkage estimator for the covariance or correlation matrix.

Usage

ledoit_wolf_est(X, method = "linshrink", res = "cov")

Arguments

X

A data matrix.

method

A character string (default = "linshrink") specifying the method used in shrinkage, includes:

  1. "linshrink": linear shrinkage ledoit2004wellfcstat.

  2. "nlshrink": non-linear shrinkage ledoit2015spectrum,ledoit2017numericalfcstat.

See linshrink_cov and nlshrink_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").

Value

A numeric matrix.

References