2
$\begingroup$

I am trying to fit accuracy data (taking values 0 or 1) using glmer and I am puzzled to observe that the residuals of the model don't have a null mean. Wasn't this the whole point of the optimization..? Does it mean that the model fails to converge although there was no warning message? I observe the same behavior with simple glm models. My data has very high mean accuracy (.88), could it be part of the problem?

An example model:

final<- glmer(acc ~ group*I(soa/10) + group*I(scale(soa*soa)) + 
            (1 |suj),  family=binomial(link="probit") ,data.f, glmerControl(optimizer="bobyqa", optCtrl = list(maxfun = 150000)))

and here the binned plot for fitted vs residuals

binnedplot(predict(final), resid(final), cex.pts=1, col.int="black")

enter image description here

Thank you very much for your answers.

(A reproducible example can be found here)

$\endgroup$
4
  • 1
    $\begingroup$ this is probably a Jensen's inequality issue en.wikipedia.org/wiki/Jensen's_inequality ... can we have a (simple) reproducible example please? $\endgroup$
    – Ben Bolker
    May 30, 2016 at 1:38
  • $\begingroup$ e.g. stats.stackexchange.com/questions/162676/… $\endgroup$
    – Ben Bolker
    May 30, 2016 at 1:55
  • $\begingroup$ Thank you very much for your answer Dr Bolker. I'm afraid there is a need for a certain number of data points to observe this strange pattern so I put a dataframe and a minimal script on this drive: drive.google.com/… $\endgroup$
    – Tom Bug
    May 30, 2016 at 11:25
  • $\begingroup$ Do you know if that completely invalidates my model or if I am authorized to draw some conclusions e.g. on the effect of the predictor SOA (considering that the residuals all seem equally biased when plotted against SOA)? $\endgroup$
    – Tom Bug
    May 30, 2016 at 11:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.