spaMM (version 1.9.16)

COMPoisson: Conway-Maxwell-Poisson (COM-Poisson) GLM family

Description

The COM-Poisson family is a generalization of the Poisson family which can describe over-dispersed as well as under-dispersed count data. It is indexed by a parameter $\nu_CMP$ that quantifies such dispersion. The COM-Poisson family with given $\nu_CMP$ is here implemented as a family object, so that it can be fitted by glm, and further used to model conditional responses in mixed models fitted by this package's functions (see Examples). $\nu_CMP$ is distinct from the dispersion parameter $\nu=1/\phi$ considered elsewhere in this package and in the GLM literature, as $\nu$ affects in a more specific way the log-likelihood. The “canonical link” $\theta(\mu)$ between the canonical GLM parameter $\theta$ and the expectation $\mu$ of the response do not have a known expression in terms of elementary functions. The link inverse is $\mu(\theta)=\sum_(i=0)^\infty \lambda^i / (i!)^\nu$ for $\lambda=e^\theta$ (hence the link is here nicknamed "loglambda").

Usage

COMPoisson(nu =  stop("COMPoisson's 'nu' must be specified"), link = "loglambda")

Arguments

link
GLM link function. Cannot be modified.
nu
Under-dispersion parameter $\nu_CMP$. COMPoisson(nu=1) is the Poisson family. For $\nu>1$, the distribution is under-dispersed. The limit as $\nu -> 0$ is the Bernoulli distribution with expectation $\lambda/(1+\lambda)$. COMPoisson(nu=0) would describe a geometric distribution with parameter $\lambda$. However the code may fail to fit distributions with $\nu$ approaching 0 because this requires various sums that have to be truncated and cannot be easily approximated. $\nu=0$ may more easily be fitted thanks to special code for this case.

Value

A family object. The 'simulate' member function is not yet implemented.

Details

Fitting will be very slow when $\nu_CMP$ approaches zero, i.e. for strong overdispersion of (conditional) response. It may be faster if the value of the control parameter COMP_maxn is reduced by using spaMM.options(), but this will reduce the accuracy of the results for high overdispersion. This trade-off occurs because the link inverse function, as shown in Description, involves an infinite summation. This sum can be easily approximated for large $\nu_CMP$ but not when $\nu_CMP$ approaches zero. By default, spaMM truncates the sum at spaMM.getOption(COMP_maxn)= 10000 terms, which should be more than enough for underdispersed response.

References

G. Shmueli, T. P. Minka, J. B. Kadane, S. Borle and P. Boatwright (2005) A useful distribution for fitting discrete data: revival of the Conway-Maxwell-Poisson distribution. Appl. Statist. 54: 127-142.

Sellers KF, Shmueli G (2010) A Flexible Regression Model for Count Data. Ann. Appl. Stat. 4: 943–961

Examples

Run this code
## Fitting COMPoisson model with estimated nu parameter:
if (spaMM.getOption("example_maxtime")>8) {          
  data(freight) ## example from Sellers & Shmueli, Ann. Appl. Stat. 4: 943–961 (2010)
  fitme(broken ~ transfers,family = COMPoisson(),data=freight)
}
## Not run: 
#   data(freight)
#   # Equivalence of poisson() and COMPoisson(nu=1):
#   COMPglm <- glm(broken ~ transfers, data=freight, family = poisson())
#   coef(COMPglm)
#   logLik(COMPglm)
#   COMPglm <- glm(broken ~ transfers, data=freight, family = COMPoisson(nu=1))
#   coef(COMPglm)
#   logLik(COMPglm)
#   HLfit(broken ~ transfers, data=freight, family = COMPoisson(nu=1))
#   # GLMM with under-dispersed conditional response
#   HLfit(broken ~ transfers+(1|id), data=freight, family = COMPoisson(nu=10),HLmethod="ML")
# ## End(Not run)

Run the code above in your browser using DataLab