R/covariance_estimators.R
cov_lw.Rd
Computes a practical Ledoit-Wolf type shrinkage estimator toward a scaled identity target.
cov_lw(X)
Numeric matrix or data frame.
A covariance matrix.
X <- as.matrix(mtcars[, c("disp", "hp", "wt")]) Sigma <- cov_lw(X) attr(Sigma, "shrinkage") #> [1] 0.04804693