powered by
This function creates a number of diagnostic plots from lm models.
# S3 method for modelDiagnostics.lm plot(x, y, plot = TRUE, ask = TRUE, ncol, ...)
a list including plots of the residuals, residuals versus fitted values
A modelDiagnostics class object from lm.
modelDiagnostics
Included to match the generic. Not used.
A logical value whether or not to plot the results or simply return the graaphical objects.
A logical whether to ask before changing plots. Only applies to interactive environments.
The number of columns to use for plots. Missing by default which means individual plots are created. If specified, plots are put together in a grid.
testm <- stats::lm(mpg ~ hp * factor(cyl), data = mtcars) md <- modelDiagnostics(testm, ev.perc = .1) plot(md) plot(md, ncol = 2) ## clean up rm(testm, md)
Run the code above in your browser using DataLab