modelcheck: Model checking plots Compact layout for model checking plots.

View source: R/modelcheck.R

modelcheckR Documentation

Model checking plots Compact layout for model checking plots.

Description

Model checking plots Compact layout for model checking plots.

Usage

modelcheck(x, ...)

## S3 method for class 'lm'
modelcheck(x, which = 1:3, mar = c(3, 4, 1.5, 4), ...)

Arguments

x

The fitted model.

which

The plot(s) to be drawn. Residuals vs fitted values ( which = v1), histogram and QQ plot of residuals (which = 2), Cook's distance plot (which = 2).

mar

Margins applied to each selected plot.

...

any other arguments to pass to plot

Methods (by class)

  • modelcheck(lm): Model checking plots

Examples

x = 1:30
y = rnorm(30)
lm.fit = lm(y~x)
# Plot resids vs fitted only
modelcheck(lm.fit, 1)

# Plot resids vs fitted, and histogram and QQ plot
modelcheck(lm.fit, 1:2)

# Plot all
modelcheck(lm.fit)

s20x documentation built on Aug. 21, 2023, 5:07 p.m.