# Dispersion parameter in mass and PSCL package (zero-inflated negative binomial and negative binomial)

I have run Zero inflated negative binomial and negative binomial model with same data set in R. I get log(theta)= -2.47 for Zero inflated negative binomial and log(theta)= -5.149 for negative binomial model. Where can I get an explain of the difference between these two dispersion parameter?

This is not surprising. If we assume that there is indeed zero-inflation in the data, i.e., more zeros observed than expected from a negative binomial (NB) distribution, then a ZINB would be the "true" model. If you then fit only a plain NB model rather than the true ZINB, the model somehow has to try to accomodate both the many zeros but also the larger count observations. And the easiest way to accomplish this is by increasing the variance of the distribution while keeping its mean relatively constant. In a NB model this means that you have to decrease the theta parameter. So this is likely what you get in your application.

An artificial data set that replicates the same phenomenon is: First, we simulate a regressor x and plain NB response y:

set.seed(0)
d <- data.frame(x = runif(500, -1, 1))
d$y <- rnbinom(500, mu = exp(0 + 1 * d$x), size = 1)


Then we add zero-inflation with probability 20% to y:

d$y[runif(500) < 0.2] <- 0  And then we can fit the "true" ZINB model and the misspecified plain NB model: library("pscl") zinb <- zeroinfl(y ~ x | 1, data = d, dist = "negbin") nb <- glm.nb(y ~ x, data = d)  While the ZINB gets the true coefficients and the true theta parameter, the misspecified NB leads to biased coefficient estimates (affecting the intercept in this case) and a smaller theta estimate: coef(zinb) ## count_(Intercept) count_x zero_(Intercept) ## 0.001301265 1.015114871 -1.151903296 coef(nb) ## (Intercept) x ## -0.2731501 1.0018826 zinb$theta
##  0.8881113
nb\$theta
##  0.5047