plot4in1 {MVQuickGraphs} | R Documentation |
Plot 4-in-1
Description
Generates a 2x2 panel graph including four residual diagnostic plots as is popular in some other statistics packages. This was initially written to support students learning R for the first time in a regression modeling course. plot4in1
generates four commonly-used residual diagnostic plots that can be used to assess the linear regression assumptions and ensures a consistent, reasonably-pleasing graphical style across each plot.
Usage
plot4in1(out, type="Regular", PP=TRUE, pch=19, col="steelblue", cex=1.2, ...)
Arguments
out |
the output of the |
type |
the type of residuals to be used. There are three possible values: |
PP |
logical. If |
pch |
symbol to be used in plotting. |
col |
color of symbol specified in |
cex |
character expansion value, used to adjust the size of the symbol specified in |
... |
other arguments to be passed to the graphing functions. |
Details
plot4in1
creates a 2 by 2 panel using par(mfrow = c(2,2))
and then generates four residual diagnostic plots: a Percentile-Percentile (or Quantile-Quantile plot if PP = FALSE
), a scatterplot of the fitted.values
against the residuals, a histogram of the residuals, and scatterplot of the residuals against their order, overplotted.
Value
None
See Also
influence.measures
for more information about standardized (rstandard
) and studentized (rstudent
) residuals; qqnorm
for more information about the Quantile-Quanitle (Q-Q) plot; par
for information about the graphical parameters.
Examples
out <- lm(Girth ~ Volume, data = trees)
plot4in1(out)