Learn R Programming

mvoutlier (version 2.1.1)

corr.plot: Correlation Plot: robust versus classical bivariate correlation

Description

The function corr.plot plots the (two-dimensional) data and adds two correlation ellipsoids, based on classical and robust estimation of location and scatter. Robust estimation can be thought of as estimating the mean and covariance of the 'good' part of the data.

Usage

corr.plot(x, y, quan=1/2, alpha=0.025, ...)

Arguments

x

vector to be plotted against y and of which the correlation with y is calculated.

y

vector to be plotted against x and of which the correlation with x is calculated.

quan

amount of observations which are used for mcd estimations. has to be between 0.5 and 1, default ist 0.5

alpha

Determines the size of the ellipsoids. An observation will be outside of the ellipsoid if its mahalanobis distance exceeds the 1-alpha quantile of the chi-squared distribution.

...

additional graphical parameters

Value

cor.cla

correlation between x and y based on classical estimation of location and scatter

cor.rob

correlation between x and y based on robust estimation of location and scatter

See Also

covMcd

Examples

Run this code
# NOT RUN {
# create data:
x <- cbind(rnorm(100), rnorm(100))
y <- cbind(rnorm(10, 3, 1), rnorm(10, 3, 1))
z <- rbind(x,y)
# execute:
corr.plot(z[,1], z[,2])
# }

Run the code above in your browser using DataLab