I have fitted a poisson and a negative binomial distribution to my count data using fitdist()in fitdistplus.
I want to assess which is the better fit to my data set using the gofstat()function but I would like to check if my interpretation, that a negative binomial is a better fit, is correct.
fnb <- fitdist(GrpSz_15$n_ans, "nbinom")
fpn <- fitdist(GrpSz_15$n_ans, "pois")
gofstat(list(fnb, fpn), fitnames = c("nbinom", "pois"))
Chi-squared statistic: 31.18916 73.59646
Degree of freedom of the Chi-squared distribution: 2 3
Chi-squared p-value: 1.687951e-07 7.242443e-16
the p-value may be wrong with some theoretical counts < 5
Chi-squared table:
obscounts theo nbinom theo pois
<= 2 99 68.874052 58.085759
<= 3 28 29.652668 36.857060
<= 4 16 23.929827 31.043298
<= 7 13 35.975958 38.315366
> 7 12 9.567495 3.698518
Goodness-of-fit criteria
nbinom pois
Akaike's Information Criterion 713.3276 752.3945
Bayesian Information Criterion 719.5755 755.5185
I understand that a lower information criteria means that distribution is a better fit. So in this case nbinom is a better fit to the observed data than poisson?
But I don't know how to fully interpret the chisq tables. Is it simply the value that is closer to the observed is better? Or should I be looking at the p value as well? And how do I interpret that? That both are significantly different from my observed, and therefore neither are good fits to the observed data?