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

plot.lmfm

Comparison Diagnostic Plots for Linear Regression Models


Description

Produces a set of comparison diagnostic plots. The plot options are

  1. Normal QQ Plot of Residuals,

  2. Kernel Density Estimate of Residuals,

  3. Residuals vs. Mahalanobis Distance,

  4. Residuals vs. Fitted Values,

  5. Sqrt Residuals vs. Fitted Values,

  6. Response vs. Fitted Values,

  7. Residuals vs. Index (Time),

  8. Overlaid Normal QQ Plot of Residuals,

  9. Overlaid Kernel Density Estimate of Residuals,

  10. Scatter Plot with Overlaid Fits (for simple linear regression models).

Usage

## S3 method for class 'lmfm'
plot(x, which.plots = 1:10, ...)

Arguments

x

an lmfm object.

which.plots

either "ask" (character string) or an integer vector specifying which plots to draw. In the later case, the plot numbers are given above.

...

additional parameters are ignored.

Value

x is invisibly returned.

Side Effects

The selected plots are drawn on a graphics device.

See Also

Examples

data(stackloss)
stack.lm <- lm(stack.loss ~ ., data = stackloss)
stack.clean <- lm(stack.loss ~ ., data = stackloss, subset = 5:20)
fm <- fit.models(stack.clean, stack.lm)
plot(fm)

fit.models

Compare Fitted Models

v0.64
GPL
Authors
Kjell Konis [aut, cre]
Initial release
2020-08-02

We don't support your browser anymore

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