nlShrinkLWEst() invokes the analytical estimator presented by Ledoit and Wolf (2018) for applying a nonlinear shrinkage function to the sample eigenvalues of the covariance matrix. The shrinkage function relies on an application of the Hilbert Transform to an estimate of the sample eigenvalues' limiting spectral density. This estimated density is computed with the Epanechnikov kernel using a global bandwidth parameter of n^(-1/3). The resulting shrinkage function pulls eigenvalues towards the nearest mode of their empirical distribution, thus creating a localized shrinkage effect rather than a global one.

We do not recommend that this estimator be employed when the estimand is the correlation matrix. The diagonal entries of the resulting estimate are not guaranteed to be equal to one.

nlShrinkLWEst(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 (2018). “Analytical nonlinear shrinkage of large-dimensional covariance matrices.” Technical Report 264, Department of Economics - University of Zurich. https://EconPapers.repec.org/RePEc:zur:econwp:264.

Examples

nlShrinkLWEst(dat = mtcars)
#> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 63.516977 -17.3486547 -1237.05024 -614.56239 4.0328476 -9.4227199 #> [2,] -17.348655 5.9467131 390.31919 194.79231 -1.2802260 2.7045202 #> [3,] -1237.050240 390.3191919 29668.95626 13544.70095 -89.5877903 207.0738208 #> [4,] -614.562387 194.7923100 13544.70095 8188.80905 -36.1809286 91.2025444 #> [5,] 4.032848 -1.2802260 -89.58779 -36.18093 0.4561798 -0.6695734 #> [6,] -9.422720 2.7045202 207.07382 91.20254 -0.6695734 1.7282605 #> [7,] 8.948521 -3.3445074 -199.82658 -142.20260 0.3586020 -0.9651599 #> [8,] 3.861425 -1.3349867 -87.49967 -46.29248 0.2475976 -0.5589942 #> [9,] 3.190202 -0.9134124 -68.17882 -22.37827 0.2997952 -0.5801072 #> [10,] 3.935907 -1.2735293 -93.05865 -24.40364 0.4397624 -0.7147445 #> [11,] -9.424459 2.7938685 168.24442 131.99540 -0.3212901 1.3377217 #> [,7] [,8] [,9] [,10] [,11] #> [1,] 8.94852071 3.8614254 3.19020209 3.93590703 -9.4244591 #> [2,] -3.34450744 -1.3349867 -0.91341240 -1.27352926 2.7938685 #> [3,] -199.82658311 -87.4996705 -68.17881786 -93.05865237 168.2444194 #> [4,] -142.20259992 -46.2924824 -22.37827031 -24.40364165 131.9953994 #> [5,] 0.35860201 0.2475976 0.29979520 0.43976237 -0.3212901 #> [6,] -0.96515988 -0.5589942 -0.58010718 -0.71474455 1.3377217 #> [7,] 4.35473129 1.0381518 -0.04479597 -0.06897495 -2.6992440 #> [8,] 1.03815182 0.4408413 0.15707322 0.19714093 -0.7710656 #> [9,] -0.04479597 0.1570732 0.39242704 0.41345565 -0.1187070 #> [10,] -0.06897495 0.1971409 0.41345565 0.75665575 0.1541912 #> [11,] -2.69924405 -0.7710656 -0.11870701 0.15419118 3.5883696