Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.lmRob

Diagnostic Regression Plots


Description

Creates a set plots useful for assessing a robustly fitted linear model. The plot options are (2) Normal QQ-Plot of Residuals, (3) Estimated Kernel Density of Residuals, (4) Robust Residuals vs Robust Distances, (5) Residuals vs Fitted Values, (6) Sqrt of abs(Residuals) vs Fitted Values, (7) Response vs Fitted Values, (8) Standardized Residuals vs Index (Time), (9) Overlaid Normal QQ-Plot of Residuals, and (10) Overlaid Estimated Density of Residuals. For simple linear regression models there is also the option to have a side-by-side plots of the the fit over a scatter plot of the data.

Usage

## S3 method for class 'lmRob'
plot(x, which.plots = c(5, 2, 6, 4), ...)

Arguments

x

an lmRob object.

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 in the description above (or in the "ask" menu).

...

additional arguments are pass to the ploting subfunctions which are listed in the see also section.

Details

This function casts the lmRob object as an lmfm object containing a single model. The actual ploting is then done by the function plot.lmfm.

Value

x is invisibly returned.

Side Effects

The selected plots are drawn on a graphics device.

References

Atkinson, A. C. (1985). Plots, Transformations and Regression. New York: Oxford University Press.

See Also

Examples

data(stack.dat)
stack.rob <- lmRob(Loss ~ ., data = stack.dat)
plot(stack.rob, which.plots = 6)

robust

Port of the S+ "Robust Library"

v0.5-0.0
GPL-2
Authors
Jiahui Wang, Ruben Zamar <ruben@stat.ubc.ca>, Alfio Marazzi <Alfio.Marazzi@inst.hospvd.ch>, Victor Yohai <vyohai@dm.uba.ar>, Matias Salibian-Barrera <matias@stat.ubc.ca>, Ricardo Maronna <maron@mate.unlp.edu.ar>, Eric Zivot <ezivot@u.washington.edu>, David Rocke <dmrocke@ucdavis.edu>, Doug Martin, Martin Maechler <maechler@stat.math.ethz.ch>, Kjell Konis <kjell.konis@me.com>.
Initial release
2020-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.