denseLinearShrinkEst() computes the asymptotically optimal convex combination of the sample covariance matrix and a dense target matrix. This target matrix's diagonal elements are equal to the average of the sample covariance matrix estimate's diagonal elements, and its off-diagonal elements are equal to the average of the sample covariance matrix estimate's off-diagonal elements. For information on this estimator's derivation, see Ledoit and Wolf (2020) and Schäfer and Strimmer (2005) .

denseLinearShrinkEst(dat)

Arguments

dat

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

Value

A matrix corresponding to the estimate of the covariance matrix.

References

Ledoit O, Wolf M (2020). “The Power of (Non-)Linear Shrinking: A Review and Guide to Covariance Matrix Estimation.” Journal of Financial Econometrics. ISSN 1479-8409, doi: 10.1093/jjfinec/nbaa007 , nbaa007, https://academic.oup.com/jfec/advance-article-pdf/doi/10.1093/jjfinec/nbaa007/33416890/nbaa007.pdf.

Schäfer J, Strimmer K (2005). “A Shrinkage Approach to Large-Scale Covariance Matrix Estimation and Implications for Functional Genomics.” Statistical Applications in Genetics and Molecular Biology, 4(1). doi: 10.2202/1544-6115.1175 , https://www.degruyter.com/view/journals/sagmb/4/1/article-sagmb.2005.4.1.1175.xml.xml.

Examples

denseLinearShrinkEst(dat = mtcars)
#>               mpg         cyl        disp           hp       drat         wt
#> mpg   168.3510501  -0.5187563  -578.47011 -289.1213709  10.011084   3.238097
#> cyl    -0.5187563 137.6579629   192.92621  102.3984642   7.358643   9.244379
#> disp -578.4701084 192.9262124 14363.65321 6233.8924274 -35.618377 107.727329
#> hp   -289.1213709 102.3984642  6233.89243 4489.1902174  -7.261158  48.914117
#> drat   10.0110840   7.3586434   -35.61838   -7.2611579 134.968280   7.632505
#> wt      3.2380970   9.2443794   107.72733   48.9141173   7.632505 135.590299
#> qsec   12.1546578   6.2299390   -80.99642  -72.3987241   8.058482   7.694790
#> vs      9.8462679   7.3017012   -33.12992  -15.1689244   8.087669   7.724265
#> am      9.6487722   7.5463531   -25.89206    0.2702928   8.153902   7.664570
#> gear    9.9560812   7.3764040   -39.08150    2.0874403   8.233414   7.587709
#> carb    3.0098341   9.3859115    81.22039   84.8955800   7.905132   8.603757
#>            qsec         vs          am       gear       carb
#> mpg   12.154658   9.846268   9.6487722   9.956081   3.009834
#> cyl    6.229939   7.301701   7.5463531   7.376404   9.385911
#> disp -80.996416 -33.129924 -25.8920555 -39.081502  81.220385
#> hp   -72.398724 -15.168924   0.2702928   2.087440  84.895580
#> drat   8.058482   8.087669   8.1539023   8.233414   7.905132
#> wt     7.694790   7.724265   7.6645704   7.587709   8.603757
#> qsec 137.661344   8.598917   7.7879048   7.718020   6.223216
#> vs     8.598917 134.938778   8.0169812   8.048730   7.548221
#> am     7.787905   8.016981 134.9341092   8.248560   8.020716
#> gear   7.718020   8.048730   8.2485601 135.207709   8.280309
#> carb   6.223216   7.548221   8.0207164   8.280309 137.120102