Learn R Programming

wavethresh (version 4.7.3)

rcov: Computes robust estimate of covariance matrix

Description

Computes a robust correlation matrix from x.

Usage

rcov(x)

Value

The robust covariance matrix

Arguments

x

Matrix that you wish to find robust covariance of. Number of variables is number of rows, number of observations is number of columns. This is the opposite way round to the convention expected by var, for example

Author

Tim Downie

Details

Method originates from Huber's "Robust Statistics" book. Note that the columns of x must be observations, this is the opposite way around to the usual way for functions like var.

See Also

threshold.mwd

Examples

Run this code
#
# A standard normal data matrix with 3 variables, 100 observations
#
v <- matrix(rnorm(100*3), nrow=3, ncol=100)
#
# Robust covariance
#
rcov(v)

Run the code above in your browser using DataLab