# NOT RUN {
if (spaMM.getOption("example_maxtime")>0.9) {
# 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())
# glm(), HLCor() and HLfit() handle spaMM::COMPoisson() with fixed overdispersion:
#
glm(broken ~ transfers, data=freight, family = COMPoisson(nu=10))
HLfit(broken ~ transfers+(1|id), data=freight, family = COMPoisson(nu=10),method="ML")
# 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