plotCumRes | R Documentation |
The output is plots of cumulative residuals.
plotCumRes(
model,
varlist = NULL,
label = "",
save = FALSE,
variableonly = FALSE
)
model |
Fitted model object (glm or gam) |
varlist |
Vector of covariate names (continous covariates only) |
label |
Label printed at the end of the plot name to identify it if |
save |
( |
Cumulative residual plots are returned for residuals ordered by each covariate in varlist
, predicted value and index of observations (temporally).
The blue dots are the residuals
The black line is the line of cumulative residual.
On the covariate plots (those in varlist
) the grey line indicates what we would expect from a well fitted covariate. i.e. one that is fitted with excessive knots.
Note: if the covariate is discrete in nature (like the example below), there will be a lot of overplotting of residuals.
# load data
data(ns.data.re)
model<-gamMRSea(birds ~ observationhour + as.factor(floodebb) + as.factor(impact),
family='quasipoisson', data=ns.data.re)
plotCumRes(model, varlist=c('observationhour'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.