"pit"(object, bins=10, ...)
"pit"(response, pred, distr=c("poisson", "nbinom"), distrcoefs, bins=10, ...)
"tsglm"
.
"poisson"
)and the Negative Binomial ("nbinom"
) distribution.
distr="poisson"
no additional parameters need to be provided. For distr="nbinom"
the additional parameter size
needs to be specified (e.g. by distrcoefs=2
), see tsglm
for details.
plot
.
Czado, C., Gneiting, T. and Held, L. (2009) Predictive model assessment for count data. Biometrics 65, 1254--1261, http://dx.doi.org/10.1111/j.1541-0420.2009.01191.x.
Gneiting, T., Balabdaoui, F. and Raftery, A.E. (2007) Probabilistic forecasts, calibration and sharpness. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 69, 243--268, http://dx.doi.org/10.1111/j.1467-9868.2007.00587.x.
tsglm
for fitting a GLM for time series of counts.marcal
and scoring
for other predictive model assessment tools.
###Campylobacter infections in Canada (see help("campy"))
campyfit <- tsglm(ts=campy, model=list(past_obs=1, past_mean=c(7,13)))
pit(campyfit)
Run the code above in your browser using DataCamp Workspace