topmodels | R Documentation |
A quick overview plot with panels for all graphical evaluation methods provided
for probabilistic (regression) model objects. If plot = TRUE
, the
resulting objects are plotted by plot
or autoplot
before they are returned within a single list, depending on whether the package
ggplot2
is loaded.
topmodels( object, plot = TRUE, class = NULL, newdata = NULL, na.action = na.pass, which = NULL, ask = dev.interactive(), spar = TRUE, single_page = NULL, envir = parent.frame(), ... )
object |
An object supported by |
plot |
Should the |
class |
Should the invisible return value be either a |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used. |
na.action |
function determining what should be done with missing
values in |
which |
Character or integer, selects the type of plot:
|
ask |
For multiple plots, the user is asked to show the next plot. Argument is
ignored for |
spar |
Should graphical parameters be set? Will be ignored for
|
single_page |
Logical. Should all plots be shown on a single page? Only
choice for |
envir |
environment, default is |
... |
Arguments to be passed to |
Render the diagnostic graphics rootogram
, pithist
, reliagram
qqrplot
, and wormplot
.
A list containing the objects plotted conditional on the arguemnt which
.
rootogram
, pithist
, reliagram
qqrplot
, wormplot
data("CrabSatellites", package = "countreg") CrabSatellites2 <- CrabSatellites[CrabSatellites$satellites <= 1, ] m1 <- glm(satellites ~ width + color, data = CrabSatellites, family = poisson) m2 <- glm(satellites ~ width + color, data = CrabSatellites2, family = binomial) ## ggplot2 graphics topmodels(m1, single_page = TRUE, nsim = 30, plot = "ggplot2") topmodels(m2, single_page = TRUE, nsim = 30, plot = "ggplot2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.