cov_shrink_diag: Computes a shrunken version of the maximum likelihood...

Description Usage Arguments Details Value References

View source: R/helper-cov.r


For a sample matrix, x, we compute the sample covariance matrix as the maximum likelihood estimator (MLE) of the population covariance matrix and shrink it towards its diagonal.





data matrix with n observations and p feature vectors


the shrinkage parameter. Must be between 0 and 1, inclusively. By default, the shrinkage parameter is 1, which simply yields the MLE.


Let \widehat{Σ} be the MLE of the covariance matrix Σ. Then, we shrink the MLE towards its diagonal by computing

\widehat{Σ}(γ) = γ \widehat{Σ} + (1 - γ) \widehat{Σ} \circ I_p,

where \circ denotes the Hadamard product and γ \in [0,1].

For γ < 1, the resulting shrunken covariance matrix estimator is positive definite, and for γ = 1, we simply have the MLE, which can potentially be positive semidefinite (singular).

The estimator given here is based on Section 18.3.1 of the Hastie et al. (2008) text.


shrunken sample covariance matrix of size p \times p


Hastie, T., Tibshirani, R., and Friedman, J. (2008), "The Elements of Statistical Learning: Data Mining, Inference, and Prediction," 2nd edition.

sparsediscrim documentation built on July 1, 2021, 9:07 a.m.