Learn R Programming

DAAG (version 1.17)

plotSimDiags: Show regression diagnostics or a scatterplot for simulated data.

Description

Generic function for returning graphics objects that show regression diagnostics or (for plotSimScat) scatterplot(s) for simulated data. Currently the only plot method for plotSimDiags is plotSimDiags.lm that accepts lm objects and objects of a class that inherits from lm

Usage

plotSimDiags(obj, ...)
plotSimScat(obj, sigma = NULL, layout = c(4, 1), type = c("p",
    "r"), show = c("points", "residuals"), ...)

Arguments

obj
An object of class code{lm}, or of a class that inherits from lm. For plotSimScat, a straight line lm object.
sigma
Standard error of residual (plotSimScat).
layout
Controls the number of simulations and the layout of the plots. For example layout=c(3,4) will give 12 plots in a 3 by 4 layout.
type
'"p"' denotes points, '"r"' denotes a regression line, '"smooth"' adds a smooth curve (plotSimScat).
show
'"points"' shows the y-variable values, '"residuals"' shows residuals on the vertical axis (plotSimScat).
...
For other parameters that can be passed to the lattice function call(s), see plotSimDiags.lm

Value

  • A list of lattice (trellis) graphics objects. Or if which is of length 1, a lattice graphics object. See the help page for plotSimDiags.lm For plotSimScat, a lattice graphics object.

References

See the help page for plot.lm

See Also

plot.lm, plotSimDiags.lm

Examples

Run this code
htwt.lm <- lm(height ~ weight, data=women)
gphlist <- plotSimDiags(obj=htwt.lm, which=c(1:3,5))

Run the code above in your browser using DataLab