drizopoulos / GLMMadaptive

GLMMs with adaptive Gaussian quadrature
https://drizopoulos.github.io/GLMMadaptive/
59 stars 14 forks source link

mixed_model() fails for example model from glmer()-docs #9

Closed strengejacke closed 5 years ago

strengejacke commented 5 years ago

No idea where to locae the source from this error, but this rather simple looking model fails to fit with mixed_model(). Any ideas, why?

library(GLMMadaptive)
library(lme4)

m1 <- glmer(
  cbind(incidence, size - incidence) ~ period + (1 | herd), 
  data = cbpp, 
  family = binomial
)

m2 <- mixed_model(
  cbind(incidence, size - incidence) ~ period,
  random = ~ 1 | herd,
  data = cbpp, 
  family = binomial
)
#> Error in -(X * if (NCOL(y) == 2) y[, 1] else y) + sc: non-conformable arrays

Created on 2019-01-22 by the reprex package (v0.2.1)

drizopoulos commented 5 years ago

Thanks! This should now work in GLMMadaptive_version 0.4-9999999.