Home

Awesome

Build Status Coverage status Maintained

correlateR

General purpose correlation and covariance estimation

The R-package correlateR is planned to be a comprehensive resource of functions related to correlations and covariances. It features fast, robust, and efficient (as well as inefficient) marginal, partial, semi-partial correlations and covariances of arbitrary conditional order. A good discussion and explanation of marginal (unconditioned), partial, and semi-partial (or, part) correlations can be found here. Another good resource is found here.

The package is designed to perform well in both high and low dimensional cases as well as both on dense and sparse matrices.

The package is not being actively developed as of 2019. I might pick it up again in the future if there is a need.

Installation

If you wish to install the latest version of correlateR directly from the master branch here at GitHub, run

#install.packages("devtools")  # Uncomment if devtools is not installed
devtools::install_github("AEBilgrau/correlateR")

The package is still under heavy development and should be considered unstable. Be sure that you have the package development prerequisites if you wish to install the package from the source.

NOTE The interface and function names may still see significant changes and modifications!

Features

Currently, the packages is planned to feature:

Hence the following core-functons are available:

Naming conventions and interface

To easily navigate the package some naming conventions has been decided upon.

Lower-case x, y, z always denotes numeric vectors while the upper-case counterparts X, Y, or Z denote a numeric matrix where observations correspond to rows and variables/feature to columns. The Z and z always express the variables conditioned on. Furthermore, S is used to denote the empirical (marginal) covariance matrix.

Function names are in camelCase except for some special cases. Otherwise cor is for correlation cov is for covariance. These are prefixed with x or p (or both) to denote cross or partial correlations/covariance respectively. For example, pcor is the partial correlation and pxcov is the partial cross covariance.

Alternative packages

There are some alternative packages on CRAN form which some inspiration have been drawn.