corpcor

Efficient Estimation of Covariance and (Partial) Correlation

CRAN Package

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.


Documentation


Team


Insights

Last 30 days

This package has been downloaded 44,258 times in the last 30 days. The academic equivalent of having a dedicated subreddit. There are fans, and maybe even a few trolls! The following heatmap shows the distribution of downloads per day. Yesterday, it was downloaded 1,706 times.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
0 downloadsMar 23, 2025
1,777 downloadsMar 24, 2025
1,675 downloadsMar 25, 2025
1,937 downloadsMar 26, 2025
1,967 downloadsMar 27, 2025
1,454 downloadsMar 28, 2025
976 downloadsMar 29, 2025
854 downloadsMar 30, 2025
1,451 downloadsMar 31, 2025
1,730 downloadsApr 1, 2025
1,711 downloadsApr 2, 2025
1,789 downloadsApr 3, 2025
1,212 downloadsApr 4, 2025
754 downloadsApr 5, 2025
819 downloadsApr 6, 2025
1,737 downloadsApr 7, 2025
1,870 downloadsApr 8, 2025
2,538 downloadsApr 9, 2025
1,654 downloadsApr 10, 2025
1,566 downloadsApr 11, 2025
988 downloadsApr 12, 2025
1,020 downloadsApr 13, 2025
1,820 downloadsApr 14, 2025
1,711 downloadsApr 15, 2025
1,954 downloadsApr 16, 2025
1,628 downloadsApr 17, 2025
1,143 downloadsApr 18, 2025
757 downloadsApr 19, 2025
731 downloadsApr 20, 2025
1,329 downloadsApr 21, 2025
1,706 downloadsApr 22, 2025
0 downloadsApr 23, 2025
0 downloadsApr 24, 2025
0 downloadsApr 25, 2025
0 downloadsApr 26, 2025
731
2,538

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Last 365 days

This package has been downloaded 430,947 times in the last 365 days. That's a whole lot of downloads. Somewhere, a librarian is trying to figure out why more bandwidth is needed. The day with the most downloads was Apr 09, 2025 with 2,538 downloads.

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Data provided by CRAN


Binaries


Dependencies

  • Reverse Depends25 packages
  • Reverse Imports94 packages
  • Reverse Suggests10 packages