Description Usage Arguments Value References
This implements the covariance estimator of Schaefer & Strimmer (2005) which in turn builds
upon Ledoit & Wolf's (2004) paper. Shrinkage targets A, B, and D of Schaefer & Strimmer's (2005)
paper are offered here, details of which are given below:
Target A: Identity (diagonal, unit variance). Off-diagonal entries are shrunk towards zero, while
diagonal entries are shrunk towards 1.
Target B: Pooled (diagonal, common-variance). Off diagonals are shrunk as in Target A, but diagonal
entries are shrunk towards a common value. In this package, the geometric mean is utilized. Schaefer & Strimmer
use the median, but the geometric mean is a good choice because it is preferable to the arithmetic mean
when data are > 0 (which variances are) and is robust to outlying observations while still accounting for them
in its estimate. This is the default shrinkage target.
Target D: Unequal (diagonal, empirical variances). This works just as Target B, but the mixing parameter
for the diagonal is set to zero, such that the empirical variances are along the diagonal. If you have
reason to believe the variances of your covariates should be more similar than different, this is a recommended
choice.
Targets C, E, and F are not offered due to the fact that they do not guarantee a positive-definite covariance matrix.
Also available here is an adaptive non-linear shrinkage procedure. The estimator was adapted from the nlshrink package, but with a few minor adjustments to simplify the useage and speed up the estimation. Note that the penalization method for this is entirely different and based on a non-linear optimization problem. For details, see Ledoit & Wolf (2015).
1 2 3 4 5 6 7 8 |
x |
a data frame or matrix of numeric covariates |
alpha |
a custom value for the off-diagonal mixing parameter. if left as NULL the optimal value will automatically be selected. |
alpha.var |
a custom value for the diagonal mixing parameter. if left as NULL the optimal value will automatically be selected. |
target |
one of "unequal" (the default), "identity", "pooled", or "adaptive". |
... |
other arguments |
a covariance matrix
Schaefer, J. ; K. Strimmer (2005) A shrinkage approach to large-scale covariance estimation and implications for functional genomics. Statist. Appl. Genet. Mol. Biol. 4:32.
Ledoit, O. ; M. Wolf (2004). Honey, I shrunk the sample covariance matrix. J. Portfolio Management, 30(4), 110-119, doi: 10.3905/jpm.2004.110
Ledoit, O. ; Wolf, M. (2015). Spectrum estimation: a unified framework for covariance matrix estimation and PCA in large dimensions. Journal of Multivariate Analysis, 139(2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.