compareToGLM {Countr}  R Documentation 
Compare renewals fit to glm models fit
Description
Compare renewals fit to glm models fit on the same data.
Usage
compareToGLM(poisson_model, breaks, nbinom_model, ...)
Arguments
poisson_model 
fitted Poisson glm model 
breaks 
integer values at which the breaks should happen. The function
will compute the observed frequencies in the intervals 
nbinom_model 
fitted negative binomial (fitted using

... 
renewal models to be considered. 
Details
This function computes a data.frame similar to Table 5.6 in Cameron(2013),
using the observed frequencies and predictions from different
models. Supported models accepted are Poisson and negative binomial (fitted
using MASS::glm.nb()
) from the glm family and any model from the
renewal family (passed in ...
).
Value
data.frame with columns Counts
, Actual
(observed
probability) and then 2 columns per model passed (predicted probability
and pearson statistic) for the associated count value.
References
Cameron AC, Trivedi PK (2013). Regression Analysis of Count Data, volume 53. Cambridge University Press.