Correlation Plot: robust versus classical bivariate correlation
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.
corr.plot(x, y, quan=1/2, alpha=0.025, ...)
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 |
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 |
Moritz Gschwandtner <e0125439@student.tuwien.ac.at>
Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
http://cstat.tuwien.ac.at/filz/
# 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])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.