View source: R/renewal_tools.R
compareToGLM | R Documentation |
Compare renewals fit to glm models fit on the same data.
compareToGLM(poisson_model, breaks, nbinom_model, ...)
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. |
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 ...
).
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.
cameron2013regressionCountr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.