Learn R Programming

ShrinkCovMat (version 1.0.2)

shrinkcovmat.equal: Shrinking the Sample Covariance Matrix Towards a Diagonal Matrix with Equal Diagonal Elements

Description

This function provides a nonparametric Stein-type shrinkage estimator of the covariance matrix that is a linear combination of the sample covariance matrix and of a diagonal matrix with diagonal elements the average of the sample variances.

Usage

shrinkcovmat.equal(data, centered = FALSE)

Arguments

data
a numeric matrix containing the data.
centered
a logical indicating if the mean vector is the zero vector.

Value

  • Returns an object of the class "covmat" that has components:
  • SigmahatThe Stein-type shrinkage estimator of the covariance matrix.
  • lambdahatThe estimated optimal shrinkage intensity.
  • SigmasamThe sample covariance matrix.
  • TargetThe target covariance matrix.
  • centeredIf the data are centered around their mean vector.

Details

The rows of the data matrix data correspond to variables and the columns to subjects.

References

Touloumis, A. (2014). Nonparametric Stein-type Shrinkage Covariance Matrix Estimators in High-Dimensional Settings. To appear in Computational Statistics and Data Analysis, http://arxiv.org/abs/1410.4726.

See Also

shrinkcovmat.unequal and shrinkcovmat.identity.

Examples

Run this code
data(colon)
normal.group <- colon[,1:40]
colon.group <- colon[,41:62]
Sigma.normal <- shrinkcovmat.equal(normal.group)
Sigma.normal
Sigma.colon <- shrinkcovmat.equal(colon.group)
Sigma.colon

Run the code above in your browser using DataLab