plot.wbaconlm {wbacon}R Documentation

Plot Diagnostics for an Object of Class wbaconlm

Description

Four plots (selectable by which) are available for an object of class wbaconlm (see wBACON_reg): A plot of residuals against fitted values, a scale-location plot of \sqrt{| residuals |} against fitted values, a Normal Q-Q plot, and a plot of the standardized residuals versus the robust Mahalanobis distances.

Usage

## S3 method for class 'wbaconlm'
plot(x, which = c(1, 2, 3, 4), hex = FALSE,
	caption = c("Residuals vs Fitted", "Normal Q-Q", "Scale-Location",
		"Standardized Residuals vs Robust Mahalanobis Distance"),
	panel = if (add.smooth) function(x, y, ...)
		panel.smooth(x, y, iter = iter.smooth, ...) else points,
    sub.caption = NULL, main = "",
	ask = prod(par("mfcol")) < length(which) && dev.interactive(),
	...,
	id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
	qqline = TRUE,
	add.smooth = getOption("add.smooth"), iter.smooth = 3,
	label.pos = c(4, 2), cex.caption = 1, cex.oma.main = 1.25)

Arguments

x

object of class wbaconlm.

which

if a subset of the plots is required, specify a subset of the numbers 1:4, [integer].

hex

toogle a hexagonally binned plot, [logical], default hex = FALSE.

caption

captions to appear above the plots; [character] vector of valid graphics annotations. It can be set to "" or NA to suppress all captions.

panel

panel function. The useful alternative to points, panel.smooth can be chosen by add.smooth = TRUE.

sub.caption

common title [character]—above the figures if there are more than one; used as sub (s.title) otherwise. If NULL, as by default, a possible abbreviated version of deparse(x$call) is used.

main

title to each plot [character]—in addition to caption.

ask

[logical]; if TRUE, the user is asked before each plot, see par(ask=.).

...

other parameters to be passed through to plotting functions.

id.n

number of points to be labelled in each plot, starting with the most extreme, [integer].

labels.id

vector of labels [character], from which the labels for extreme points will be chosen. NULL uses observation numbers.

cex.id

magnification of point labels, [numeric].

qqline

[logical] indicating if a qqline() should be added to the normal Q-Q plot.

add.smooth

[logical] indicating if a smoother should be added to most plots; see also panel above.

iter.smooth

the number of robustness iterations [integer], the argument iter in panel.smooth().

label.pos

positioning of labels [numeric], for the left half and right half of the graph respectively, for plots 1-3.

cex.caption

controls the size of caption, [numeric].

cex.oma.main

controls the size of the sub.caption only if that is above the figures when there is more than one, [numeric].

Details

The plots for which %in% 1:3 are identical with the plot method for linear models (see plot.lm). There you can find details on the implementation and references.

The standardized residuals vs. robust Mahalanobis distance plot (which = 4) has been proposed by Rousseeuw and van Zomeren (1990).

Value

[no return value]

References

Rousseeuw, P.J. and B.C. van Zomeren (1990). Unmasking Multivariate Outliers and Leverage Points, Journal of the American Statistical Association 411, 633–639. doi:10.2307/2289995

See Also

wBACON_reg


[Package wbacon version 0.6-1 Index]