taperingEst() estimates the covariance matrix of a data.frame-like object with ordered variables by gradually shrinking the bands of the sample covariance matrix towards zero. The estimator is defined as the Hadamard product of the sample covariance matrix and a weight matrix. The amount of shrinkage is dictated by the weight matrix and is specified by a hyperparameter k. This estimator is attributed to Cai et al. (2010) .

The weight matrix is a Toeplitz matrix with entries defined as follows. Let i and j index the rows and columns of the weight matrix, respectively. If abs(i - j) <= k / 2, then entry i, j in the weight matrix is equal to 1. If k / 2 < abs(i - j) < k, then entry i, j is equal to 2 - 2 * abs(i - j) / k. Otherwise, entry i, j is equal to 0.

taperingEst(dat, k)

Arguments

dat

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

k

A non-negative, even numeric integer.

Value

A matrix corresponding to the estimate of the covariance matrix.

References

Cai TT, Zhang C, Zhou HH (2010). “Optimal rates of convergence for covariance matrix estimation.” Ann. Statist., 38(4), 2118--2144. doi: 10.1214/09-AOS752 .

Examples

taperingEst(dat = mtcars, k = 0.1)
#>          [,1]     [,2]    [,3]     [,4]      [,5]     [,6]     [,7]      [,8]
#>  [1,] 36.3241 0.000000     0.0    0.000 0.0000000 0.000000 0.000000 0.0000000
#>  [2,]  0.0000 3.189516     0.0    0.000 0.0000000 0.000000 0.000000 0.0000000
#>  [3,]  0.0000 0.000000 15360.8    0.000 0.0000000 0.000000 0.000000 0.0000000
#>  [4,]  0.0000 0.000000     0.0 4700.867 0.0000000 0.000000 0.000000 0.0000000
#>  [5,]  0.0000 0.000000     0.0    0.000 0.2858814 0.000000 0.000000 0.0000000
#>  [6,]  0.0000 0.000000     0.0    0.000 0.0000000 0.957379 0.000000 0.0000000
#>  [7,]  0.0000 0.000000     0.0    0.000 0.0000000 0.000000 3.193166 0.0000000
#>  [8,]  0.0000 0.000000     0.0    0.000 0.0000000 0.000000 0.000000 0.2540323
#>  [9,]  0.0000 0.000000     0.0    0.000 0.0000000 0.000000 0.000000 0.0000000
#> [10,]  0.0000 0.000000     0.0    0.000 0.0000000 0.000000 0.000000 0.0000000
#> [11,]  0.0000 0.000000     0.0    0.000 0.0000000 0.000000 0.000000 0.0000000
#>            [,9]     [,10]    [,11]
#>  [1,] 0.0000000 0.0000000 0.000000
#>  [2,] 0.0000000 0.0000000 0.000000
#>  [3,] 0.0000000 0.0000000 0.000000
#>  [4,] 0.0000000 0.0000000 0.000000
#>  [5,] 0.0000000 0.0000000 0.000000
#>  [6,] 0.0000000 0.0000000 0.000000
#>  [7,] 0.0000000 0.0000000 0.000000
#>  [8,] 0.0000000 0.0000000 0.000000
#>  [9,] 0.2489919 0.0000000 0.000000
#> [10,] 0.0000000 0.5443548 0.000000
#> [11,] 0.0000000 0.0000000 2.608871