thresholdingEst() computes the hard thresholding estimate of the covariance matrix for a given value of gamma. The threshold estimator of the covariance matrix applies a hard thresholding operator to each element of the sample covariance matrix. For more information on this estimator, review Bickel and Levina (2008) .

thresholdingEst(dat, gamma)

Arguments

dat

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

gamma

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

Value

A matrix corresponding to the estimate of the covariance matrix.

References

Bickel PJ, Levina E (2008). “Covariance regularization by thresholding.” Annals of Statistics, 36(6), 2577--2604. doi: 10.1214/08-AOS600 , https://doi.org/10.1214/08-AOS600.

Examples

thresholdingEst(dat = mtcars, gamma = 0.2)
#> mpg cyl disp hp drat wt #> mpg 36.324103 -9.1723790 -633.09721 -320.732056 2.1950635 -5.1166847 #> cyl -9.172379 3.1895161 199.66028 101.931452 -0.6683669 1.3673710 #> disp -633.097208 199.6602823 15360.79983 6721.158669 -47.0640192 107.6842040 #> hp -320.732056 101.9314516 6721.15867 4700.866935 -16.4511089 44.1926613 #> drat 2.195064 -0.6683669 -47.06402 -16.451109 0.2858814 -0.3727207 #> wt -5.116685 1.3673710 107.68420 44.192661 -0.3727207 0.9573790 #> qsec 4.509149 -1.8868548 -96.05168 -86.770081 0.0000000 -0.3054816 #> vs 2.017137 -0.7298387 -44.37762 -24.987903 0.0000000 -0.2736613 #> am 1.803931 -0.4657258 -36.56401 -8.320565 0.0000000 -0.3381048 #> gear 2.135685 -0.6491935 -50.80262 -6.358871 0.2759879 -0.4210806 #> carb -5.363105 1.5201613 79.06875 83.036290 0.0000000 0.6757903 #> qsec vs am gear carb #> mpg 4.5091492 2.0171371 1.8039315 2.1356855 -5.3631048 #> cyl -1.8868548 -0.7298387 -0.4657258 -0.6491935 1.5201613 #> disp -96.0516815 -44.3776210 -36.5640121 -50.8026210 79.0687500 #> hp -86.7700806 -24.9879032 -8.3205645 -6.3588710 83.0362903 #> drat 0.0000000 0.0000000 0.0000000 0.2759879 0.0000000 #> wt -0.3054816 -0.2736613 -0.3381048 -0.4210806 0.6757903 #> qsec 3.1931661 0.6705645 -0.2049597 -0.2804032 -1.8941129 #> vs 0.6705645 0.2540323 0.0000000 0.0000000 -0.4637097 #> am -0.2049597 0.0000000 0.2489919 0.2923387 0.0000000 #> gear -0.2804032 0.0000000 0.2923387 0.5443548 0.3266129 #> carb -1.8941129 -0.4637097 0.0000000 0.3266129 2.6088710