plots {DGLMExtPois} | R Documentation |
Plot Diagnostics for glm_hP and glm_CMP Objects
Description
Two plots are currently available: a plot of residuals against fitted values and a Normal Q-Q plot.
Usage
## S3 method for class 'glm_hP'
plot(
x,
type = c("quantile", "pearson", "response"),
ask = prod(graphics::par("mfcol")) < 2 && grDevices::dev.interactive(),
...
)
## S3 method for class 'glm_CMP'
plot(
x,
type = c("quantile", "pearson", "response"),
ask = prod(graphics::par("mfcol")) < 2 && grDevices::dev.interactive(),
...
)
Arguments
x |
|
type |
the type of residuals. The alternatives are: "quantile" (default), "pearson" and "response". Can be abbreviated. |
ask |
logical; if TRUE, the user is asked before each plot, see
|
... |
other parameters to be passed through to plotting functions. |
Examples
## Fit the hyper-Poisson model
Bids$size.sq <- Bids$size ^ 2
hP.fit <- glm.hP(formula.mu = numbids ~ leglrest + rearest + finrest +
whtknght + bidprem + insthold + size + size.sq + regulatn,
formula.gamma = numbids ~ 1, data = Bids)
oldpar <- par(mfrow = c(1, 2))
## Plot diagnostics
plot(hP.fit)
par(oldpar)
## Fit the COM-Poisson model
Bids$size.sq <- Bids$size ^ 2
CMP.fit <- glm.CMP(formula.mu = numbids ~ leglrest + rearest + finrest +
whtknght + bidprem + insthold + size + size.sq + regulatn,
formula.nu = numbids ~ 1, data = Bids)
oldpar <- par(mfrow = c(1, 2))
## Plot diagnostics
plot(CMP.fit)
par(oldpar)
[Package DGLMExtPois version 0.2.3 Index]