linearShrinkLWEst() computes an asymptotically optimal convex combination of the sample covariance matrix and the identity matrix. This convex combination effectively shrinks the eigenvalues of the sample covariance matrix towards the identity. This estimator is more accurate than the sample covariance matrix in high-dimensional settings under fairly loose assumptions. For more information, consider reviewing the manuscript by Ledoit and Wolf (2004) .

linearShrinkLWEst(dat)

Arguments

dat

A numeric data.frame, matrix, or similar object.

Value

A matrix corresponding to the Ledoit-Wolf linear shrinkage estimate of the covariance matrix.

References

Ledoit O, Wolf M (2004). “A well-conditioned estimator for large-dimensional covariance matrices.” Journal of Multivariate Analysis, 88(2), 365 - 411. ISSN 0047-259X, doi: 10.1016/S0047-259X(03)00096-4 , https://www.sciencedirect.com/science/article/pii/S0047259X03000964.

Examples

linearShrinkLWEst(dat = mtcars)
#>              mpg         cyl        disp          hp         drat          wt
#> mpg    91.994537  -8.8873959  -613.42707 -310.767007   2.12686354  -4.9577108
#> cyl    -8.887396  59.8894321   193.45690   98.764472  -0.64760097   1.3248872
#> disp -613.427065 193.4568965 14940.34335 6512.334264 -45.60175405 104.3384878
#> hp   -310.767007  98.7644717  6512.33426 4611.611408 -15.93997780  42.8196084
#> drat    2.126864  -0.6476010   -45.60175  -15.939978  57.07601236  -0.3611404
#> wt     -4.957711   1.3248872   104.33849   42.819608  -0.36114040  57.7266467
#> qsec    4.369051  -1.8282308   -93.06738  -84.074160   0.08443329  -0.2959904
#> vs      1.954465  -0.7071628   -42.99882  -24.211536   0.11496280  -0.2651587
#> am      1.747884  -0.4512558   -35.42798   -8.062047   0.18424327  -0.3276000
#> gear    2.069330  -0.6290233   -49.22420   -6.161303   0.26741304  -0.4079978
#> carb   -5.196475   1.4729303    76.61211   80.456377  -0.07597117   0.6547937
#>              qsec           vs           am         gear        carb
#> mpg    4.36905127   1.95446525   1.74788384   2.06933037 -5.19647476
#> cyl   -1.82823082  -0.70716284  -0.45125584  -0.62902330  1.47293033
#> disp -93.06738422 -42.99882145 -35.42797909 -49.22419861 76.61210740
#> hp   -84.07415999 -24.21153649  -8.06204705  -6.16130273 80.45637743
#> drat   0.08443329   0.11496280   0.18424327   0.26741304 -0.07597117
#> wt    -0.29599039  -0.26515872  -0.32760002  -0.40799779  0.65479372
#> qsec  59.89296866   0.64973028  -0.19859164  -0.27169118 -1.83526338
#> vs     0.64973028  57.04515281   0.04102326   0.07423256 -0.44930236
#> am    -0.19859164   0.04102326  57.04026909   0.28325583  0.04493024
#> gear  -0.27169118   0.07423256   0.28325583  57.32645515  0.31646514
#> carb  -1.83526338  -0.44930236   0.04493024   0.31646514 59.32682738