My outcome variable is binomial, and I have 11 independent variables and a time variable. The time variable has different slopes, so I fixed it to
time-after. I used the
lme4 package (the
glmer function). I have a random intercept and two random slopes. I created my model like this:
m3.glmm <- glmer(y ~ timebefore + timeafter + x1 + x2 +...+ x11 + (1+timebefore+timeafter|id), data = data, family = binomial (link="logit"), nAGQ=3)
When I used this model, I had this error:
Error in updateGlmerDevfun(devfun, glmod$reTrms, nAGQ = nAGQ) : nAGQ > 1 is only available for models with a single, scalar random-effects term
Anyone have a simple explanation of how to fit (or code) this model?