Provides nonparametric Steinian shrinkage estimators of the covariance matrix that are suitable in high dimensional settings, that is when the number of variables is larger than the sample size.
Anestis Touloumis: https://brighton.academia.edu/AnestisTouloumis
School of Computing, Engineering and Mathematics, University of Brighton.
You can install the release version of ShrinkCovMat:
install.packages("ShrinkCovMat")
The source code for the release version of ShrinkCovMat is available on CRAN at:
Or you can install the development version of ShrinkCovMat:
devtools::install_github("AnestisTouloumis/ShrinkCovMat")
The source code for the development version of ShrinkCovMat is available on github at:
To use ShrinkCovMat, you should first load the package as follows:
library(ShrinkCovMat)
This package provides the nonparametric Stein-type shrinkage covariance matrix estimators proposed by Touloumis (2015). These estimators are suitable and statistically efficient regardless of the dimensionality.
Each of the implemented shrinkage covariance matrix estimators is a convex linear combination of the sample covariance matrix and of a target matrix. Three options are considered for the target matrix:
shrinkcovmat.identity
),shrinkcovmat.equal
),shrinkcovmat.unequal
).Estimation of the corresponding optimal shrinkage intensities is discussed in Touloumis (2015).
The utility function targetselection
is designed to ease the selection of the target matrix.
Consider the colon cancer data example analyzed in Touloumis (2015). The data consists of two tissue groups: the normal tissue group and the tumor tissue group.
data(colon)NormalGroup <- colon[, 1:40]TumorGroup <- colon[, 41:62]
To decide the target matrix for covariance matrix of the normal group, inspect the output of the function targetselection
:
targetselection(NormalGroup)#> OPTIMAL SHRINKAGE INTENSITIES FOR THE TARGET MATRIX WITH#> Equal variances : 0.1401#> Unit variances : 0.1125#> Unequal variances : 0.14#>#> SAMPLE VARIANCES#> Range : 0.4714#> Average : 0.0882
The estimated optimal shrinkage intensity for the scaled identity matrix is slightly larger than the other two and the sample variances appear to be of similar magnitude. Thus, the scaled identity matrix seems to be the most appropriate target for the covariance estimated. The resulting covariance matrix estimator is:
EstimatedCovarianceNormal <- shrinkcovmat.equal(NormalGroup)EstimatedCovarianceNormal#> SHRINKAGE ESTIMATION OF THE COVARIANCE MATRIX#>#> Estimated Optimal Shrinkage Intensity = 0.1401#>#> Estimated Covariance Matrix [1:5,1:5] =#> [,1] [,2] [,3] [,4] [,5]#> [1,] 0.0396 0.0107 0.0101 0.0214 0.0175#> [2,] 0.0107 0.0499 0.0368 0.0171 0.0040#> [3,] 0.0101 0.0368 0.0499 0.0147 0.0045#> [4,] 0.0214 0.0171 0.0147 0.0523 0.0091#> [5,] 0.0175 0.0040 0.0045 0.0091 0.0483#>#> Target Matrix [1:5,1:5] =#> [,1] [,2] [,3] [,4] [,5]#> [1,] 0.0882 0.0000 0.0000 0.0000 0.0000#> [2,] 0.0000 0.0882 0.0000 0.0000 0.0000#> [3,] 0.0000 0.0000 0.0882 0.0000 0.0000#> [4,] 0.0000 0.0000 0.0000 0.0882 0.0000#> [5,] 0.0000 0.0000 0.0000 0.0000 0.0882
We follow a similar procedure for the tumor group:
targetselection(TumorGroup)#> OPTIMAL SHRINKAGE INTENSITIES FOR THE TARGET MATRIX WITH#> Equal variances : 0.1956#> Unit variances : 0.1705#> Unequal variances : 0.1955#>#> SAMPLE VARIANCES#> Range : 0.4226#> Average : 0.0958
As before, we may conclude that the scaled identity matrix seems to be the most suitable target matrix. The resulting covariance matrix estimate for the tumor group is:
EstimatedCovarianceTumor <- shrinkcovmat.equal(TumorGroup)EstimatedCovarianceTumor#> SHRINKAGE ESTIMATION OF THE COVARIANCE MATRIX#>#> Estimated Optimal Shrinkage Intensity = 0.1956#>#> Estimated Covariance Matrix [1:5,1:5] =#> [,1] [,2] [,3] [,4] [,5]#> [1,] 0.0490 0.0179 0.0170 0.0195 0.0052#> [2,] 0.0179 0.0450 0.0265 0.0092 0.0034#> [3,] 0.0170 0.0265 0.0465 0.0084 0.0031#> [4,] 0.0195 0.0092 0.0084 0.0498 0.0036#> [5,] 0.0052 0.0034 0.0031 0.0036 0.0361#>#> Target Matrix [1:5,1:5] =#> [,1] [,2] [,3] [,4] [,5]#> [1,] 0.0958 0.0000 0.0000 0.0000 0.0000#> [2,] 0.0000 0.0958 0.0000 0.0000 0.0000#> [3,] 0.0000 0.0000 0.0958 0.0000 0.0000#> [4,] 0.0000 0.0000 0.0000 0.0958 0.0000#> [5,] 0.0000 0.0000 0.0000 0.0000 0.0958
To cite the R package 'ShrinkCovMat' in publications, please use:
Touloumis, A. (2015) Nonparametric Stein-type Shrinkage
Covariance Matrix Estimators in High-Dimensional Settings,
Computational Statistics & Data Analysis 83, 251-261.
A BibTeX entry for LaTeX users is
@Article{,
title = {Nonparametric Stein-type Shrinkage Covariance Matrix Estimators in High-Dimensional Settings},
author = {{Anestis Touloumis}},
year = {2015},
journal = {Computational Statistics & Data Analysis},
volume = {83},
pages = {251--261},
}
Touloumis, Anestis. 2015. “Nonparametric Stein-Type Shrinkage Covariance Matrix Estimators in High-Dimensional Settings.” Computational Statistics & Data Analysis 83 (March): 251–61. doi:10.1016/j.csda.2014.10.018.
Version 1.2.0 [2017-07-11]
Version 1.1.9 [2017-07-10]
Version 1.1.8 [2017-07-08]
Version 1.1.7 [2017-07-07]
Version 1.1.6 [2017-06-21]
Version 1.1.5 [2017-06-20]
Version 1.1.4 [2017-06-15]
Version 1.1.3 [2017-06-12]
Version 1.1.2 [2016-05-22]
Version 1.1.1 [2015-09-08]
Version 1.1.0 [2015-01-08]
Version 1.0.3 [2014-11-02]
Version 1.0.2 [2014-10-20]
Version 1.0.1 [2014-08-12]
Version 1.0.0 [2014-04-17]