Learn R Programming

rrcov (version 0.4-01)

plot-methods: Methods for Function 'plot' in Package 'rrcov'

Description

Shows the Mahalanobis distances based on robust and/or classical estimates of the location and the covariance matrix in different plots. The following plots are available: - index plot of the robust and mahalanobis distances - distance-distance plot - Chisquare QQ-plot of the robust and mahalanobis distances - plot of the tolerance ellipses (robust and classic) - Scree plot - Eigenvalues comparison plot

Usage

## S3 method for class 'Cov':
plot(x, which = c("all","distance","qqchi2","tolellipse","screeplot"), 
        ask=(which=="all" && dev.interactive()), 
        cutoff, id.n, tol=1e-7, ...)
## S3 method for class 'CovRobust':
plot(x, which = c("all","dd","distance","qqchi2","tolellipse","screeplot"), 
        classic=FALSE, ask=(which=="all" && dev.interactive()), 
        cutoff, id.n, tol=1e-7, ...)

Arguments

x
an object of class "Cov" or "CovRobust"
which
Which plot to show? See Details for description of the options. Default is which="all".
classic
whether to plot the classical distances too. Default is classic=FALSE.
ask
logical; if 'TRUE', the user is asked before each plot, see 'par(ask=.)'. Default is ask = which=="all" && dev.interactive().
cutoff
The cutoff value for the distances.
id.n
Number of observations to identify by a label. If not supplied, the number of observations with distance larger than cutoff is used.
tol
tolerance to be used for computing the inverse see 'solve'. Default is tol = 10e-7
...
other parameters to be passed through to plotting functions.

concept

High breakdown point

Examples

Run this code
data(hbk)
hbk.x <- data.matrix(hbk[, 1:3])
cv <- Cov(hbk.x)
plot(cv)
rcv <- CovMest(hbk.x)
plot(rcv)

Run the code above in your browser using DataLab