Learn R Programming

spaMM (version 3.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 that quantifies such dispersion. It includes the Poisson, geometric and Bernoulli as special (or limit) cases (see Details). 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 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. The fitme and corrHLfit functions called with family=COMPoisson() (no given nu value) will estimate this parameter. In other usage of this family, nu must be specified. COMPoisson(nu=1) is the Poisson family.

Value

A family object.

Details

For nu>1, the distribution is under-dispersed. The limit as nu\(\to \infty\) is the Bernoulli distribution with expectation \(\lambda/(1+\lambda)\).

The link inverse function, as shown in Description, involves an infinite summation. In this summation and related computations for the COMPoisson model, the sum can be easily approximated by a finite sum for large nu but not when nu approaches zero. For this reason, the code may fail to fit distributions with nu approaching 0 (strong residual over-dispersion). The case nu=0 itself is the geometric distribution with parameter \(\lambda\) and is fitted by an ad hoc algorithm devoid of such problems. Otherwise, spaMM truncates the sum, and uses numerical integrals to approximate missing terms (which slows down the fitting operation). In addition, it applies an ad hoc continuity correction to ensure continuity of the result in nu=1 (Poisson case). These corrections affect numerical results for the case of residual overdispersion but are negligible for the case of residual underdispersion. Alternatively, spaMM uses Gaunt et al.'s approximations when the condition defined in spaMM.getOption("CMP_asympto_cond") is satisfied. All approximations reduces the accuracy of computations, in a way that can impede the extended Levenberg-Marquardt algorithm sometimes needed by spaMM.

The name COMP_nu should be used to set initial values or bounds on nu in control arguments of the fitting functions (e.g., fitme(.,init=list(COMP_nu=1))). Fixed values should be set by the family argument (COMPoisson(nu=.)).

References

Gaunt, Robert E. and Iyengar, Satish and Olde Daalhuis, Adri B. and Simsek, Burcin. An asymptotic expansion for the normalizing constant of the Conway--Maxwell--Poisson distribution. Ann Inst Stat Math (2017) 10.1007/s10463-017-0629-6.

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 {
# 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 DataLab