corpcor: Efficient Estimation of Covariance and (Partial) Correlation

Implements a James-Stein-type shrinkage estimator for the covariance matrix, with separate shrinkage for variances and correlations. The details of the method are explained in Sch\"afer and Strimmer (2005) and Opgen-Rhein and Strimmer (2007). The approach is both computationally as well as statistically very efficient, it is applicable to "small n, large p" data, and always returns a positive definite and well-conditioned covariance matrix. In addition to inferring the covariance matrix the package also provides shrinkage estimators for partial correlations and partial variances. The inverse of the covariance and correlation matrix can be efficiently computed, as well as any arbitrary power of the shrinkage correlation matrix. Furthermore, functions are available for fast singular value decomposition, for computing the pseudoinverse, and for checking the rank and positive definiteness of a matrix.

AuthorJuliane Sch\"afer, Rainer Opgen-Rhein, Verena Zuber, Miika Ahdesm\"aki, A. Pedro Duarte Silva, and Korbinian Strimmer.
Date of publication2015-07-08 13:21:51
MaintainerKorbinian Strimmer <>
LicenseGPL (>= 3)

View on CRAN


cor2pcor Man page
corpcor-package Man page
cor.shrink Man page
cov.shrink Man page
crossprod.powcor.shrink Man page
decompose.cov Man page
decompose.invcov Man page
estimate.lambda Man page
estimate.lambda.var Man page
fast.svd Man page
invcor.shrink Man page
invcov.shrink Man page
is.positive.definite Man page
make.positive.definite Man page
mpower Man page
nsmall.svd Man page
pcor2cor Man page
pcor.shrink Man page
positive.svd Man page
powcor.shrink Man page
print.shrinkage Man page
pseudoinverse Man page
psmall.svd Man page
pvar.shrink Man page
pvt.check.w Man page
pvt.cppowscor Man page
pvt.powscor Man page
pvt.svar Man page
rank.condition Man page
rebuild.cov Man page
rebuild.invcov Man page
sm2vec Man page
sm.index Man page
var.shrink Man page
vec2sm Man page
wt.moments Man page
wt.scale Man page
wt.var Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.