Chapter 16 Negative binomial GLMM

One option for a distribution where the variance increases more rapidly with the mean is the negative binomial (or Poisson-gamma) distribution. Recall that the negative binomial distribution meets the assumption that the variance is proportional to the square of the mean.

We can model this distribution using the function glmer.nb():

# Negative binomial GLMM using the function glmer.nb()
mnb1 <- glmer.nb(total.fruits ~ nutrient * amd + rack + status +
    (1 | popu) + (1 | gen), data = dat.tf, control = glmerControl(optimizer = "bobyqa"))
# Control argument specifies the way we optimize the
# parameter values

We test again for over-dispersion:

# Over-dispersion check
overdisp_fun(mnb1)
##         chisq         ratio             p          logp 
## 721.034461131   1.170510489   0.002143425  -6.145350288
# Ratio is now much closer to 1 although p < 0.05

Ratio is now much closer to 1 although p < 0.05