I am trying to fit a mixed-effect negative binomial model with glmer.nb()
from package lme4
.
m1 <- glmer.nb(NumberEvents ~ offset(log(days)) + x + (1|ID), data=dfr, nAGQ = 20)
I get the following warning:
Warning message: In theta.ml(Y, mu, weights = object@resp$weights, limit = limit, : iteration limit reached
I suppose I should increase the limit in the number of iterations of theta.ml
.
theta.ml(limit = 1000)
How to do it? How can I call theta.ml()
within glmer.nb()
?
Any help is appreciated!