shrinkcovmat: Linear Shrinkage of the Sample Covariance

View source: R/shrinkcovmat.R

shrinkcovmatR Documentation

Linear Shrinkage of the Sample Covariance

Description

Provides a nonparametric Stein-type shrinkage estimator of the covariance matrix that is a linear combination of the sample covariance matrix and of a target matrix.

Usage

shrinkcovmat(data, target = "spherical", centered = FALSE)

Arguments

data

a numeric matrix containing the data.

target

a character indicating the target matrix. Options include 'spherical', 'identity' or 'diagonal'.

centered

a logical indicating if the mean vector is the zero vector.

Details

Options for the target matrix include the spherical sample covariance matrix (the diagonal matrix with diagonal elements the average of the sample variances), the diagonal sample covariance matrix (the diagonal matrix with diagonal elements the corresponding sample variances), and (c) the identity matrix.

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

To select the target covariance matrix see targetselection.

Value

Returns an object of the class 'shrinkcovmathat' that has components:

Sigmahat

The Stein-type shrinkage estimator of the covariance matrix.

lambdahat

The estimated optimal shrinkage intensity.

Sigmasample

The sample covariance matrix.

Target

The target covariance matrix.

centered

If the data are centered around their mean vector.

Author(s)

Anestis Touloumis

References

Touloumis, A. (2015) nonparametric Stein-type Shrinkage Covariance Matrix Estimators in High-Dimensional Settings. Computational Statistics & Data Analysis 83, 251–261.

See Also

targetselection.

Examples

data(colon)
normal_group <- colon[, 1:40]
sigma_hat_normal_group <- shrinkcovmat(normal_group, target = "spherical")
sigma_hat_normal_group

AnestisTouloumis/ShrinkCovMat documentation built on July 30, 2023, 7:38 a.m.