# Evaluate the quality of the negative binomial regression model fit

Our response variable is highly skewed and there is evidence of overdispersion as well. We tried with the Poisson, and Quasi-Poisson models. Both Poisson and Quasi-Poisson models failed to satisfy Pearson's $$\chi^2$$ goodness of fit test. Then we used the negative binomial regression model. We used $$pseudo R-squared$$ to assess the quality of the model fit. However, we don't know how can we validate the use of the negative binomial regression model like we did for Poisson, and Quasi-Poisson models using the goodness of fit test. Is there any way to check that the negative binomial regression model fits the data well?

Our fit results:

glm(formula = Infected ~ log(1 + PopDensity) + log(1 + GDPPPP) +
LifeExpectancy + log(1 + HealthExpend) + Humidity + AvgHigh +
AvgLow + AQI + PM1 + PM2 + log(1 + TotalTest), family = negative.binomial(1),
data = df, maxit = 10000)

Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.9231  -0.8082  -0.2303   0.3280   1.8219

Coefficients:
Estimate Std. Error t value         Pr(>|t|)
(Intercept)            8.992467   6.879656   1.307          0.19633
log(1 + PopDensity)    0.137216   0.057273   2.396          0.01983 *
log(1 + GDPPPP)       -1.636393   0.683709  -2.393          0.01995 *
LifeExpectancy         0.024059   0.056888   0.423          0.67392
log(1 + HealthExpend)  0.614003   0.326203   1.882          0.06482 .
Humidity               0.003370   0.010989   0.307          0.76021
AvgHigh               -0.062498   0.046816  -1.335          0.18710
AvgLow                 0.061456   0.040870   1.504          0.13809
AQI                    0.002927   0.003672   0.797          0.42867
PM1                    0.016954   0.006471   2.620          0.01120 *
PM2                   -0.021772   0.006481  -3.359          0.00139 **
log(1 + TotalTest)     0.809103   0.091449   8.848 0.00000000000237 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for Negative Binomial(1) family taken to be 0.8757727)

Null deviance: 200.335  on 69  degrees of freedom
Residual deviance:  63.787  on 58  degrees of freedom
AIC: 1373


# Pseudo R-squared

pR32 = 1 - p3$$deviance /p3$$null.deviance
pR32

[1] 0.6815972


Q-Q plot:

Distribution of the response variable, Y:

Simulation using the DHARMA package

• The conditional distribution of Y is highly discrete, and therefore grossly non-normal. Further, this is the point of the NB model: to model a specific, discrete non-normal distribution. So other than for providing insights into the data (which are better accomplished using other graphs), there no use for the normal q-q plot here. A first thing I would like to see is a frequency distribution of Y. Commented Jan 14, 2021 at 11:53
• @BigBendRegion I added the distribution of Y. My concern here is: How can we say that our negative binomial regression model fits the data well? Commented Jan 14, 2021 at 12:06
• "Fits well" is always relative, because all models are wrong. At least the frequency distribution provides no red flags. You can try alternative models for discrete Y including different discrete distributions, quadratic X terms and interactions, etc and compare likelihood based statistics (such as AIC) to see which models fit better. Commented Jan 14, 2021 at 13:23
• @BigBendRegion Since Pseudo R-squared = 0.68, Can I say that my model was not bad? How can I favor my model? I am not sure why my reviewer commented that my model did not fit the data well! By the way, interactions did not workout well. Commented Jan 14, 2021 at 16:24
• Why did the reviewer say it was bad? Commented Jan 14, 2021 at 16:30