spaMM (version 2.2.0)

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 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 does 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}\). The fitme and corrHLfit functions called with family=COMPoisson() (no given \(\nu_{CMP}\) value) will estimate \(\nu_{CMP}\). In other usage, \(\nu_{CMP}\) must be specified. 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 it evaluates various sums that have to be truncated and cannot be easily approximated. However it is possible to fit the case \(\nu=0\), thanks to an ad-hoc algorithm for this case.

Value

A family object.

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<U+2013>961

Examples

Run this code
# NOT RUN {
if (spaMM.getOption("example_maxtime")>7) {          
  # Fitting COMPoisson model with estimated nu parameter:
  data(freight) ## example from Sellers & Shmueli, Ann. Appl. Stat. 4: 943<U+2013>961 (2010)
  fitme(broken ~ transfers, data=freight, family = COMPoisson())
  # GLMM with under-dispersed conditional response
  HLfit(broken ~ transfers+(1|id), data=freight, family = COMPoisson(nu=10),HLmethod="ML")
}
# }
# 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))
# }

Run the code above in your browser using DataCamp Workspace