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.)