Learn R Programming

robust (version 0.3-11)

plot.covfm: Plot Method

Description

The generic plot method for objects of class "cov", "covRob", and "covfm".

Usage

## S3 method for class 'cov':
plot(x, which.plots = "ask", ...)
## S3 method for class 'covRob':
plot(x, which.plots = "ask", ...)
## S3 method for class 'covfm':
plot(x, which.plots = "ask", ...)

Arguments

x
an oject of class "cov", "covRob", or "covfm".
which.plots
either "ask", "all", or an integer vector specifying which plots to draw. If which.plots is an integer vector, use the plot numbers given here (or in the "ask" menu). The plot options are (2) Eigenvalues of Covariance Estimate, (3) Sqrt of Mahalanobis D
...
additional arguments to be passed to the plotting subfunctions.

Value

  • x is invisibly returned.

Side Effects

The requested plots are drawn on a graphics device.

Details

The actual plot functions are only implemented for "fit.models" objects. When this method is dispatched on an object of class "cov" or "covRob" the object is cast as a "fit.models" object containing a single element and plotted with plot.covfm. The actual plotting is done by the subfunctions listed in the See Also section.

See Also

plot, ccov, covRob, fit.models, covfmDistance2Plot, covfmEllipsesPlot, covfmScreePlot, covfmSqrtMDPlot.

Examples

Run this code
data(woodmod.dat)
woodmod.cov    <- ccov   (woodmod.dat)
woodmod.covRob <- covRob(woodmod.dat)
plot(woodmod.cov, which.plots = 1)
plot(woodmod.covRob, which = 1)

woodmod.fm <- fit.models(list(Robust = "covRob", Classical = "ccov"),
                         data = woodmod.dat)
plot(woodmod.fm, which = 1)

Run the code above in your browser using DataLab