# 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