Learn R Programming

GSE (version 4.2-1)

plot-methods: Plot methods for objects of class 'CovRobMiss'

Description

Plot methods for objects of class 'CovRobMiss'. The following plots are available:

- chi-square qqplot for adjusted square partial Mahalanobis distances

- index plot for adjusted square partial Mahalanobis distances

- distance-distance plot comparing the adjusted distances based on classical MLE and robust estimators

Cases with completely missing data will be dropped out. Outliers are identified using some pre-specific cutoff value, for instance 99% quantile of chi-square with p degrees of freedom, where p is the column dimension of the data. Identified outliers can also be retrieved using getOutliers with an optional argument of cutoff, ranged from 0 to 1.

Usage

# S4 method for CovRobMiss
plot(x, which = c("all","distance","qqchi2", "dd"), 
		which = c("all", "distance", "qqchisq", "dd"),
		ask = (which=="all" && dev.interactive(TRUE)),
		cutoff = 0.99, xlog10 = FALSE, ylog10 = FALSE)

Arguments

x

an object of class "CovRobMiss"

which

Which plot to show? Default is which="all".

ask

logical; if 'TRUE', the user is asked before each plot, see 'par(ask=.)'. Default is ask = which=="all" && dev.interactive().

cutoff

The quantile cutoff for the distances. Default is 0.99.

xlog10

Base-10 logged x-axis? Default is FALSE.

ylog10

Base-10 logged y-axis? Default is FALSE.

Examples

Run this code
if (FALSE) {
data(boston)
res <- GSE(boston)

## plot all graphs
plot(res)

## plot individuals plots
plot(res, which="qqchisq")
plot(res, which="index")
plot(res, which="dd")

## control the coordinates, e.g. log10 transform the y-axis
plot(res, which="qqchisq", xlog10=TRUE, ylog10=TRUE)
plot(res, which="index", ylog10=TRUE)
plot(res, which="dd", xlog10=TRUE, ylog10=TRUE)
}

Run the code above in your browser using DataLab