bandingEst() estimates the covariance matrix of data with ordered variables by forcing off-diagonal entries to be zero for indices that are far removed from one another. The i, j entry of the estimated covariance matrix will be zero if the absolute value of i - j is greater than some non-negative constant k. This estimator was proposed by Bickel and Levina (2008) .

bandingEst(dat, k)

Arguments

dat

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

k

A non-negative, numeric integer.

Value

A matrix corresponding to the estimate of the covariance matrix.

References

Bickel PJ, Levina E (2008). “Regularized estimation of large covariance matrices.” Annals of Statistics, 36(1), 199--227. doi: 10.1214/009053607000000758 .

Examples

bandingEst(dat = mtcars, k = 2L)
#>              [,1]       [,2]        [,3]       [,4]         [,5]       [,6]
#>  [1,]   36.324103  -9.172379  -633.09721    0.00000   0.00000000  0.0000000
#>  [2,]   -9.172379   3.189516   199.66028  101.93145   0.00000000  0.0000000
#>  [3,] -633.097208 199.660282 15360.79983 6721.15867 -47.06401915  0.0000000
#>  [4,]    0.000000 101.931452  6721.15867 4700.86694 -16.45110887 44.1926613
#>  [5,]    0.000000   0.000000   -47.06402  -16.45111   0.28588135 -0.3727207
#>  [6,]    0.000000   0.000000     0.00000   44.19266  -0.37272073  0.9573790
#>  [7,]    0.000000   0.000000     0.00000    0.00000   0.08714073 -0.3054816
#>  [8,]    0.000000   0.000000     0.00000    0.00000   0.00000000 -0.2736613
#>  [9,]    0.000000   0.000000     0.00000    0.00000   0.00000000  0.0000000
#> [10,]    0.000000   0.000000     0.00000    0.00000   0.00000000  0.0000000
#> [11,]    0.000000   0.000000     0.00000    0.00000   0.00000000  0.0000000
#>              [,7]        [,8]        [,9]     [,10]      [,11]
#>  [1,]  0.00000000  0.00000000  0.00000000 0.0000000 0.00000000
#>  [2,]  0.00000000  0.00000000  0.00000000 0.0000000 0.00000000
#>  [3,]  0.00000000  0.00000000  0.00000000 0.0000000 0.00000000
#>  [4,]  0.00000000  0.00000000  0.00000000 0.0000000 0.00000000
#>  [5,]  0.08714073  0.00000000  0.00000000 0.0000000 0.00000000
#>  [6,] -0.30548161 -0.27366129  0.00000000 0.0000000 0.00000000
#>  [7,]  3.19316613  0.67056452 -0.20495968 0.0000000 0.00000000
#>  [8,]  0.67056452  0.25403226  0.04233871 0.0766129 0.00000000
#>  [9,] -0.20495968  0.04233871  0.24899194 0.2923387 0.04637097
#> [10,]  0.00000000  0.07661290  0.29233871 0.5443548 0.32661290
#> [11,]  0.00000000  0.00000000  0.04637097 0.3266129 2.60887097