modelcheck | R Documentation |
Model checking plots Compact layout for model checking plots.
modelcheck(x, ...)
## S3 method for class 'lm'
modelcheck(x, which = 1:3, mar = c(3, 4, 1.5, 4), ...)
x |
The fitted model. |
which |
The plot(s) to be drawn. Residuals vs fitted values (
|
mar |
Margins applied to each selected plot. |
... |
any other arguments to pass to |
modelcheck(lm)
: Model checking plots
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.