This function compares four models for count responses, namely Poisson regression, negative binomial regression, zero-inflated Poisson regression, and zero-inflated negative binomial regression. To do so, it takes a Poisson regression model object (as specified via glm), and the range on the count outcome. This function mimics the countfit function developed in Long and Freese (2006).
For example:
library(catregs)
data("LF06art")
p1 <- glm(art ~ fem + mar + kid5 + phd + ment , family = "poisson", data = LF06art)
table(LF06art$art)
##
## 0 1 2 3 4 5 6 7 8 9 10 11 12 16 19
## 275 246 178 84 67 27 17 12 1 2 1 1 2 1 1
## [1] "ic" "pic" "models" "models.pic"