lshr.cov: Linear shrinkage estimates of covariance and inverse...

Description Usage Arguments Details Value References Examples

Description

Linear shrinkage estimates of covariance and inverse covariance matrix.

Usage

1
lshr.cov(X,scaling=FALSE)

Arguments

X

An observed dataset from a specific condition.

scaling

a logical flag for scaling variable to have unit variance. Default is FALSE.

Details

shr_covp returns the optimal linear shrinkage parameter, the linear shrinkage estimates of the covariance and the precision matrix.

Value

shr_cov

Linear shrinkage estimate of the covariance matrix.

shr_inv

Linear shrinkage estimate of the inverse covariance matrix.

References

Ledoit, O. and M.~Wolf, M. (2004). A well-conditioned estimator for large-dimensional covariance matrices, Journal of Multivariate Analysis, 88, 365–411.

Yu, D., Lee, S. H., Lim, J., Xiao, G., Craddock, R. C., and Biswal, B. B. (2018). Fused Lasso Regression for Identifying Differential Correlations in Brain Connectome Graphs. Statistical Analysis and Data Mining, 11, 203–226.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(MASS)

## True precision matrix
omega <- matrix(0,5,5)
omega[1,2] <- omega[1,3] <- omega[1,4] <- 1
omega[2,3] <- omega[3,4] <- 1.5
omega <- t(omega) + omega
diag(omega) <- 3

Sig = solve(omega)
X = mvrnorm(50,rep(0,5),Sig)
lshr.cov(X)

dpcid documentation built on May 2, 2019, 8:55 a.m.

Related to lshr.cov in dpcid...