I am trying to use lme4::glmer()
to fit a binomial generalized mixed model (GLMM) with dependent variable that is not binary, but a continuous variable between zero and one. One can think of this variable as a probability; in fact it is probability as reported by human subjects (in an experiment that I help analyzing). I.e. it's not a "discrete" fraction, but a continuous variable.
My glmer()
call doesn't work as expected (see below). Why? What can I do?
Later edit: my answer below is more general than the original version of this question, so I modified the question to be more general too.
More details
Apparently it is possible to use logistic regression not only for binary DV but also for continuous DV between zero and one. Indeed, when I run
glm(reportedProbability ~ a + b + c, myData, family="binomial")
I get a warning message
Warning message:
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
but a very reasonable fit (all factors are categorical, so I can easily check whether model predictions are close to the across-subjects-means, and they are).
However, what I actually want to use is
glmer(reportedProbability ~ a + b + c + (1 | subject), myData, family="binomial")
It gives me the identical warning, returns a model, but this model is clearly very much off; the estimates of the fixed effects are very far from the glm()
ones and from the across-subject-means. (And I need to include glmerControl(optimizer="bobyqa")
into the glmer
call, otherwise it does not converge at all.)
glmmadmb(reportedProbability ~ a + b + c + (1 | subject), myData, family="beta")
, I get correct fit and reasonable confidence intervals, but a convergence failed warning :-/ Trying to figure out how to increase the number of iterations. Beta might work for me because I don't have DV=0 or DV=1 cases. $\endgroup$+ (1 | rowid)
to my glmer call and this yields stable estimates and stable confidence intervals, independent of my weight choice (I tried 100 and 500). I also tried running lmer on logit(reportedProbability) and I get almost exactly the same thing. So both solutions seem to work well! Beta MM with glmmadmb gives also very close results, but for some reason fails to converge completely and takes forever to run. Consider posting an answer listing these options and explaining a bit the differences and pros/cons! (Confidence intervals that I mention are all Wald.) $\endgroup$