View source: R/residuals.tsglm.R
| residuals.tsglm | R Documentation | 
Returns the residuals of a fitted GLM-type model for time series of counts.
## S3 method for class 'tsglm'
residuals(object, type = c("response", "pearson", "anscombe"), ...)
| object | an object of class  | 
| type | character value giving the type of residuals which should be returned. Choose  | 
| ... | further arguments are currently ignored. Only for compatibility with generic function. | 
Computes a vector with the respective residuals of the fit given in argument object.
Numerical vector of the residuals.
Tobias Liboschik and Philipp Probst
tsglm for fitting a GLM for time series of counts.
###Campylobacter infections in Canada (see help("campy"))
campyfit <- tsglm(ts=campy, model=list(past_obs=1, past_mean=c(7,13)))
campyfit_resid <- residuals(campyfit, type="pearson")
plot(campyfit_resid)
acf(campyfit_resid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.