powered by
Model checking plots Compact layout for model checking plots.
modelcheck(x, ...)# S3 method for lm modelcheck(x, which = 1:3, mar = c(3, 4, 1.5, 4), ...)
# S3 method for lm modelcheck(x, which = 1:3, mar = c(3, 4, 1.5, 4), ...)
The fitted model.
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).
which = v1
which = 2
Margins applied to each selected plot.
any other arguments to pass to plot
plot
modelcheck(lm): Model checking plots
modelcheck(lm)
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)
Run the code above in your browser using DataLab