Compare two Covariance Matrices in Plots
allows a direct comparison of two estimations of the covariance matrix (e.g. resulting from covPC) in a plot.
plotcov(cov1, cov2, method1, labels1, method2, labels2, ndigits, ...)
cov1 |
a covariance matrix (from cov, covMcd, covPC, covPCAgrid, covPCAproj, etc. |
cov2 |
a covariance matrix (from cov, covMcd, covPC, covPCAgrid, covPCAproj, etc. |
method1 |
legend for ellipses of estimation method1 |
method2 |
legend for ellipses of estimation method2 |
labels1 |
legend for numbers of estimation method1 |
labels2 |
legend for numbers of estimation method2 |
ndigits |
number of digits to use for printing covariances, by default ndigits=4 |
... |
additional arguments for text or plot |
Since (robust) PCA can be used to re-compute the (robust) covariance matrix,
one might be interested to compare two different methods of covariance
estimation visually. This routine takes as input objects for the covariances
to compare the output of cov
, but also the return objects
from covPCAgrid
, covPCAproj
, covPC
,
and covMcd
. The comparison of the two covariance matrices
is done by numbers (the covariances) and by ellipses.
only the plot is generated
Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
C. Croux, P. Filzmoser, M. Oliveira, (2007). Algorithms for Projection-Pursuit Robust Principal Component Analysis, Chemometrics and Intelligent Laboratory Systems, Vol. 87, pp. 218-225.
# multivariate data with outliers library(mvtnorm) x <- rbind(rmvnorm(200, rep(0, 6), diag(c(5, rep(1,5)))), rmvnorm( 15, c(0, rep(20, 5)), diag(rep(1, 6)))) plotcov(covPCAproj(x),covPCAgrid(x))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.