# NOT RUN {
library(lme4) # for cbpp data
# The default fitting method uses Firth's bias-corrected estimates
(gm.firth <- mhglm(cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp, family = binomial,
control=mhglm.control(fit.method="firthglm.fit")))
# Using maximum likelihood estimates is less reliable
(gm.ml <- mhglm(cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp, family = binomial,
control=mhglm.control(fit.method="glm.fit")))
# }
Run the code above in your browser using DataLab