library(lme4) out <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial, contrasts = list(period = "contr.sum")) summary(out) Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.32337 0.22129 -10.499 < 2e-16 *** period1...