Computes a shrunken version of the maximum likelihood estimator for the sample covariance matrix under the assumption of multivariate normality.

Description

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.

Usage

1

Arguments

x

data matrix with n observations and p feature vectors

gamma

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

Details

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.

Value

shrunken sample covariance matrix of size p \times p

References

Hastie, T., Tibshirani, R., and Friedman, J. (2008), "The Elements of Statistical Learning: Data Mining, Inference, and Prediction," 2nd edition. http://statweb.stanford.edu/~tibs/ElemStatLearn/

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.