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.602387 -17.3756215 -1239.06580  -615.53668   4.0388075  -9.4366996
#>  [2,]   -17.375622   5.9552274   390.95557   195.09993  -1.2821077   2.7089340
#>  [3,] -1239.065804 390.9555684 29716.52575 13567.68688 -89.7284694 207.4037721
#>  [4,]  -615.536679 195.0999307 13567.68688  8199.93035 -36.2488721  91.3619556
#>  [5,]     4.038807  -1.2821077   -89.72847   -36.24887   0.4565959  -0.6705492
#>  [6,]    -9.436700   2.7089340   207.40377    91.36196  -0.6705492   1.7305492
#>  [7,]     8.963471  -3.3492280  -200.17922  -142.37336   0.3596440  -0.9676052
#>  [8,]     3.867541  -1.3369177   -87.64399   -46.36226   0.2480242  -0.5599951
#>  [9,]     3.194599  -0.9148006   -68.28263   -22.42837   0.3001023  -0.5808273
#> [10,]     3.941742  -1.2753715   -93.19644   -24.47009   0.4401702  -0.7157005
#> [11,]    -9.437382   2.7979487   168.54917   132.14305  -0.3221904   1.3398349
#>                [,7]        [,8]         [,9]        [,10]       [,11]
#>  [1,]    8.96347131   3.8675414   3.19459905   3.94174218  -9.4373816
#>  [2,]   -3.34922796  -1.3369177  -0.91480063  -1.27537154   2.7979487
#>  [3,] -200.17921923 -87.6439882 -68.28262772 -93.19644414 168.5491733
#>  [4,] -142.37336090 -46.3622632 -22.42836949 -24.47009443 132.1430534
#>  [5,]    0.35964402   0.2480242   0.30010235   0.44017017  -0.3221904
#>  [6,]   -0.96760523  -0.5599951  -0.58082733  -0.71570051   1.3398349
#>  [7,]    4.35735469   1.0392228  -0.04402801  -0.06795678  -2.7015133
#>  [8,]    1.03922282   0.4412793   0.15738797   0.19755856  -0.7719914
#>  [9,]   -0.04402801   0.1573880   0.39265386   0.41375692  -0.1193703
#> [10,]   -0.06795678   0.1975586   0.41375692   0.75705605   0.1533120
#> [11,]   -2.70151325  -0.7719914  -0.11937035   0.15331198   3.5903329