spikedOperatorShrinkEst() implements the asymptotically optimal shrinkage estimator with respect to the operator loss in a spiked covariance matrix model. Informally, this model admits Gaussian data-generating processes whose covariance matrix is a scalar multiple of the identity, save for a few number of large "spikes". A thorough review of this estimator, or more generally spiked covariance matrix estimation, is provided in Donoho et al. (2018) .

spikedOperatorShrinkEst(dat, p_n_ratio, num_spikes = NULL, noise = NULL)

Arguments

dat

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

p_n_ratio

A numeric between 0 and 1 representing the asymptotic ratio of the number of features, p, and the number of observations, n.

num_spikes

A numeric integer equal to or larger than one which providing the known number of spikes in the population covariance matrix. Defaults to NULL, indicating that this value is not known and must be estimated.

noise

A numeric representing the known scalar multiple of the identity matrix giving the approximate population covariance matrix. Defaults to NULL, indicating that this values is not known and must be estimated.

Value

A matrix corresponding to the covariance matrix estimate.

References

Donoho D, Gavish M, Johnstone I (2018). “Optimal shrinkage of eigenvalues in the spiked covariance model.” The Annals of Statistics, 46(4), 1742 -- 1778.

Examples

spikedOperatorShrinkEst(dat = mtcars, p_n_ratio = 0.1, num_spikes = 2L)
#>              [,1]        [,2]        [,3]        [,4]        [,5]        [,6]
#>  [1,]   27.663217  -8.5966703  -633.37314 -320.953638   1.8380109  -4.3684737
#>  [2,]   -8.596670   3.1720692   199.67712  101.953669  -0.5776385   1.3759270
#>  [3,] -633.373137 199.6771237 15360.74540 6721.151894 -47.0761604 107.7051931
#>  [4,] -320.953638 101.9536687  6721.15189 4700.814136 -16.4565755  44.2089877
#>  [5,]    1.838011  -0.5776385   -47.07616  -16.456575   0.6095354  -0.3369676
#>  [6,]   -4.368474   1.3759270   107.70519   44.208988  -0.3369676   1.2155679
#>  [7,]    5.074492  -1.6193754   -96.02650  -86.791351   0.1888862  -0.5990422
#>  [8,]    1.968810  -0.6231283   -44.37716  -24.997787   0.1228697  -0.3019112
#>  [9,]    1.317146  -0.4118830   -36.58047   -8.326759   0.1301928  -0.2692416
#> [10,]    1.700203  -0.5290602   -50.81805   -6.363260   0.1931188  -0.3826690
#> [11,]   -4.468236   1.4298631    79.09369   83.075125  -0.1282958   0.4741832
#>               [,7]         [,8]         [,9]        [,10]       [,11]
#>  [1,]   5.07449224   1.96880984   1.31714647   1.70020332 -4.46823619
#>  [2,]  -1.61937536  -0.62312829  -0.41188299  -0.52906022  1.42986313
#>  [3,] -96.02649548 -44.37716096 -36.58046933 -50.81804965 79.09369318
#>  [4,] -86.79135137 -24.99778700  -8.32675870  -6.36326002 83.07512477
#>  [5,]   0.18888624   0.12286971   0.13019280   0.19311880 -0.12829576
#>  [6,]  -0.59904220  -0.30191122  -0.26924161  -0.38266899  0.47418321
#>  [7,]   2.19521536   0.41942372   0.03325537  -0.08624220 -1.72783406
#>  [8,]   0.41942372   0.60140890   0.08132867   0.09647754 -0.38221551
#>  [9,]   0.03325537   0.08132867   0.57614074   0.19030722  0.02318964
#> [10,]  -0.08624220   0.09647754   0.19030722   0.76683372  0.17558034
#> [11,]  -1.72783406  -0.38221551   0.02318964   0.17558034  2.19787794