scadEst() applies the SCAD thresholding function of Fan and Li (2001) to each entry of the sample covariance matrix. This penalized estimator constitutes a compromise between hard and soft thresholding of the sample covariance matrix: it is a linear interpolation between soft thresholding up to 2 * lambda and hard thresholding after 3.7 * lambda (Rothman et al. 2009) .

scadEst(dat, lambda)

Arguments

dat

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

lambda

A non-negative numeric defining the degree of thresholding applied to each element of dat's sample covariance matrix.

Value

A matrix corresponding to the estimate of the covariance matrix.

References

Fan J, Li R (2001). “Variable Selection via Nonconcave Penalized Likelihood and its Oracle Properties.” Journal of the American Statistical Association, 96(456), 1348-1360. doi: 10.1198/016214501753382273 , https://doi.org/10.1198/016214501753382273.

Rothman AJ, Levina E, Zhu J (2009). “Generalized Thresholding of Large Covariance Matrices.” Journal of the American Statistical Association, 104(485), 177-186. doi: 10.1198/jasa.2009.0101 , https://doi.org/10.1198/jasa.2009.0101.

Examples

scadEst(dat = mtcars, lambda = 0.2)
#>              mpg         cyl        disp          hp         drat           wt
#> mpg    36.324103  -9.1723790  -633.09721 -320.732056   2.19506351  -5.11668468
#> cyl    -9.172379   3.1895161   199.66028  101.931452  -0.62622984   1.36737097
#> disp -633.097208 199.6602823 15360.79983 6721.158669 -47.06401915 107.68420403
#> hp   -320.732056 101.9314516  6721.15867 4700.866935 -16.45110887  44.19266129
#> drat    2.195064  -0.6262298   -47.06402  -16.451109   0.08588135  -0.17272073
#> wt     -5.116685   1.3673710   107.68420   44.192661  -0.17272073   0.95737897
#> qsec    4.509149  -1.8868548   -96.05168  -86.770081   0.00000000  -0.10548161
#> vs      2.017137  -0.7238615   -44.37762  -24.987903   0.00000000  -0.07366129
#> am      1.803931  -0.3043880   -36.56401   -8.320565   0.00000000  -0.13810484
#> gear    2.135685  -0.5957780   -50.80262   -6.358871   0.07598790  -0.23348102
#> carb   -5.363105   1.5201613    79.06875   83.036290   0.00000000   0.63801992
#>               qsec           vs            am         gear       carb
#> mpg    4.509149194   2.01713710   1.803931452   2.13568548 -5.3631048
#> cyl   -1.886854839  -0.72386148  -0.304388046  -0.59577799  1.5201613
#> disp -96.051681452 -44.37762097 -36.564012097 -50.80262097 79.0687500
#> hp   -86.770080645 -24.98790323  -8.320564516  -6.35887097 83.0362903
#> drat   0.000000000   0.00000000   0.000000000   0.07598790  0.0000000
#> wt    -0.105481613  -0.07366129  -0.138104839  -0.23348102  0.6380199
#> qsec   3.193166129   0.62972011  -0.004959677  -0.08040323 -1.8941129
#> vs     0.629720114   0.05403226   0.000000000   0.00000000 -0.3011860
#> am    -0.004959677   0.00000000   0.048991935   0.09233871  0.0000000
#> gear  -0.080403226   0.00000000   0.092338710   0.42926945  0.1266129
#> carb  -1.894112903  -0.30118596   0.000000000   0.12661290  2.6088710