plot.tsglm: Diagnostic Plots for a Fitted GLM-type Model for Time Series...

Description Usage Arguments Details Author(s) See Also Examples

Description

Produces several diagnostic plots to asses the fit of a GLM-type model for time series of counts.

Usage

1
2
## S3 method for class 'tsglm'
plot(x, ask = TRUE, ...)

Arguments

x

an object of class "tsglm". Usually the result of a call to tsglm.

ask

logical value. If TRUE (and the R session is interactive) the user is asked for input, before a new figure is drawn (see devAskNewPage).

...

further arguments are currently ignored. Only for compatibility with generic function.

Details

Produces plots of the acf of the Pearson residuals, the Pearson residuals plotted against time, a cumulative periodogramm of the Pearson residuals, a probability integral transform (PIT) histogram (see function pit) and a marginal calibration plot (see function marcal). The cumulative periodogramm is plotted with the function cpgram from package MASS and is omitted with a warning if this package is not available.

Author(s)

Tobias Liboschik and Philipp Probst

See Also

tsglm for fitting a GLM for time series of counts.

Examples

1
2
3
4
5
6
7
###Campylobacter infections in Canada (see help("campy"))
interventions <- interv_covariate(n=length(campy), tau=c(84, 100),
  delta=c(1, 0)) #detected by Fokianos and Fried (2010, 2012)
#Linear link function with Negative Binomial distribution:
campyfit <- tsglm(campy, model=list(past_obs=1, past_mean=13),
  xreg=interventions, dist="nbinom")
plot(campyfit)


Search within the tscount package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.