Returns a GLM family object for negative-binomial model with variance quadratically related to the mean \(\mu\): variance=\(\mu+\mu^2\)/shape, with known or unknown underlying Gamma shape parameter. The zero-truncated variant can be specified as negbin2(., trunc = 0L). See negbin1 for the alternative negative-binomial model with variance “linearly” related to the mean.
A fixed-effect residual-dispersion model can be fitted, using the resid.model argument, which is used to specify the form of the logarithm of the shape parameter. Thus the variance of the response become \(\mu+\mu^2\)/exp(<specified linear expression>).
negbin(.) is an alias for negbin2(.) (truncated or not), and Tnegbin(.) is an alias for negbin2(., trunc = 0L).