# Dispersion parameter in GAM output

I have a question about Negative Binomial distribution. I’m modeling a count data, as following example:

require(MASS)
require(MGCV)
Model<-gam(A~B, family=nb)


Is the value returned at the top of a call to summary() the overdispersion parameter?

Example:

summary(Model)

Family: Negative Binomial(0.502)

Formula:
A ~ s(B)


Is this value (0.502) the over dispersion parameter?

Yes, up to a caveat about what you mean by "overdispersion parameter". In the standard parameterization of the negative binomial, this value is usually designated as $k$ or $\theta$, and controls the variance: $\textrm{Var} = \mu(1+\mu/k)$. As $k \to \infty$ we get a Poisson: when $k=1$ we get a geometric distribution.

When in doubt, try experimenting: if I generate data from rnbinom() with a size parameter of 0.5, I get a value of $\approx 0.5$ back from gam().

library(mgcv)
library(MASS)
set.seed(101)
d <- data.frame(y=rnbinom(1000,size=0.5,mu=5))
summary(gam(y~1,data=d,family=nb))

Family: Negative Binomial(0.529)
[... snip ...]

• if this answers your question, please consider clicking the checkmark to accept it ... – Ben Bolker Nov 29 '15 at 19:40