Efficient Estimation of Covariance and (Partial) Correlation
Overview
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 Schafer and Strimmer (2005) DOI:10.2202/1544-6115.1175 and Opgen-Rhein and Strimmer (2007) DOI:10.2202/1544-6115.1252. 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.
- update URLs
From NEWS in the release
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Korbinian Strimmer <strimmerlab@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: c(person(given = "Juliane",
family = "Schafer",
role = "aut"),
person(given = "Rainer",
family = "Opgen-Rhein",
role = "aut"),
person(given = "Verena",
family = "Zuber",
role = "aut"),
person(given = "Miika",
family = "Ahdesmaki",
role = "aut"),
person(given = c("A.", "Pedro", "Duarte"),
family = "Silva",
role = "aut"),
person(given = "Korbinian",
family = "Strimmer.",
role = "aut"),
person(given = "Korbinian",
family = "Strimmer",
role = "cre",
email = "strimmerlab@gmail.com"))
as necessary.- NOTE11 OK, 2 NOTENow
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 15 (1 internal)includes a package overview page
- Examples that run
- 100%13 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 47%
Downloads
Repository
Repository github.com/strimmerlab/software is linked, but repository-practices checks have not run for it yet.
Dependencies
Installing corpcor adds no packages beyond those that come with R.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 80 more dependents and 14 packages that suggest it on CRAN ↗
Code & Tests
People & History
Maintainer since 1.0.0 (2005)
Show 3 peopleHide 3 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 1.6.10Latest
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- 1.6.92017-04-01 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 1.6.82015-07-08 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 1.6.72014-09-29 · diff ↗
Show 48 earlier eventsHide 48 earlier events
- RR 3.1.0 released · 2014-04-10
- 1.6.62013-05-15 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 1.6.52013-03-27 · diff ↗
- 1.6.42012-09-02 · diff ↗
- 1.6.32012-05-09 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 1.6.2
- 1.6.12012-01-20 · diff ↗ ·
added 27 exports
cor.shrink, cor2pcor, cov.shrink, crossprod.powcor.shrink, decompose.cov, decompose.invcov, fast.svd, invcor.shrink, invcov.shrink, is.positive.definite, make.positive.definite, mpower, pcor.shrink, pcor2cor, powcor.shrink, pseudoinverse, pvar.shrink, rank.condition, rebuild.cov, rebuild.invcov, sm.index, sm2vec, var.shrink, vec2sm, wt.moments, wt.scale, wt.var - RR 2.14.0 released · 2011-10-31
- 1.6.02011-06-27 · diff ↗
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- 1.5.72010-08-07 · diff ↗
- RR 2.11.0 released · 2010-04-22
- 1.5.62010-03-10 · diff ↗
- 1.5.52010-01-14 · diff ↗
- 1.5.42009-12-16 · diff ↗
- RR 2.10.0 released · 2009-10-26
- 1.5.32009-10-11 · diff ↗
- RR 2.9.0 released · 2009-04-17
- 1.5.22009-01-26 · diff ↗
- 1.5.12008-12-23 · diff ↗
- 1.5.02008-12-01 · diff ↗
- 1.4.82008-11-17 · diff ↗
- RR 2.8.0 released · 2008-10-20
- RR 2.7.0 released · 2008-04-22
- 1.4.72007-10-21 · diff ↗
- 1.4.62007-10-20 · diff ↗
- RR 2.6.0 released · 2007-10-03
- RR 2.5.0 released · 2007-04-24
- 1.4.52007-04-11 · diff ↗
- RR 2.4.0 released · 2006-10-03
- 1.4.42006-09-18 · diff ↗
- 1.4.32006-07-17 · diff ↗
- 1.4.22006-06-06 · diff ↗
- 1.4.12006-04-26 · diff ↗
- RR 2.3.0 released · 2006-04-24
- 1.4.02006-04-18 · diff ↗
- 1.3.12006-04-03 · diff ↗
- 1.3.02006-03-29 · diff ↗
- 1.2.02006-03-10 · diff ↗
- 1.1.22005-12-12 · diff ↗
- 1.1.12005-11-26 · diff ↗
- RR 2.2.0 released · 2005-10-06
- 1.12005-09-30 · diff ↗
- 1.0.02005-08-20
- RR 2.1.0 released · 2005-04-18
Package metadata
- First published
- 2005-08-20
- Total releases
- 35 / 21 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.0.2
- Download size
- 22 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("corpcor")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.