drizopoulos / GLMMadaptive

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

More than one random effect? #50

Closed datalorax closed 1 year ago

datalorax commented 1 year ago

Sorry to post an issue for a question. My question is equivalent to this stackoverflow post. Is it possible to use GLMMadaptive with more than one random effect? For example, with lme4 I might fit a model like

d <- ltm::LSAT
d$respondent <- seq_len(nrow(d))
d <- tidyr::pivot_longer(
  d,
  -respondent,
  names_to = "item",
  values_to = "response"
)

m <- lme4::glmer(
  response ~ 1 + (1 | respondent) + (1 | item),
  data = d,
  family = binomial(link = "logit")
)

Is this model possible with GLMMadaptive?

drizopoulos commented 1 year ago

Unfortunately, this is not possible.

datalorax commented 1 year ago

Okay, thanks for the reply.