Learn R Programming

robcor (version 0.1-6)

robcor: Robust Pairwise Correlations.

Description

Compute a robust estimate of the correlation coefficient or correlation matrix via pairwise correlations.

Usage

robcor(x, y = NULL, method = c("ssd", "quadrant", "mcd"), partial = FALSE, post = "psdcor", scaler = "s_FastQn", regress = "lmrob")

Arguments

x
a numeric vector, matrix or data frame.
y
NULL (default) or a vector, matrix or data frame with compatible dimensions to x. The default is equivalent to y = x (but more efficient).
method
a character string indicating which correlation coefficient is to be computed.
partial
logical. Should a partial correlation algorithm be used?
post
function to apply after the matrix is built or NULL. By default, positive semidefinite correction is applied (psdcor()).
scaler
function to use as a location-scale estimator in "ssd" method. By default, s_FastQn() is used.
regress
function to use as a regression estimator in partial correlations algorithm. By default, lmrob() is used.

Value

Either a single correlation coefficient or a correlation matrix estimate.

Details

This function is a robust replacement for cor().

Note, that implementation and documentation is not finished/polished yet.

References

Shevlyakov, G. L., Smirnov, P. O. (2011). Robust Estimation of the Correlation Coefficient: An Attempt of Survey. Austrian Journal of Statistics, 40(1&2), 147-156.