My data has a binary response acc
(correct/incorrect), one continuous predictor score
, three categorical predictors (race
, sex
, emotion
) and a random factor subj
. All predictors are within-subject.
By selecting the random effects first and then the fixed effects, I ended up with this model:
M<-glmer(acc ~ race + sex + emotion + sex:emotion + race:emotion + score +(1+sex|subj), family=binomial, data=subset)
I need help on interpreting validation plots, figuring out if they show a "ceiling effect" in acc
, and fix any problems that need to be fixed.
To validate the model I get the residuals and fitted values
fitted<-predict(M,type="response")
resid<-resid(M,type="pearson")
And plot the residuals against the categorical predictors
plot(subset$race,resid)
plot(subset$sex,resid)
plot(subset$emotion,resid)
Those three plots show a slight pattern of more negative and dispersed residuals in "easy" conditions. The pattern looks slight to me (i may be wrong).
I plot the residuals against the continuous predictor
plot(subset$score,resid)
This plot of residuals against the continuous predictor is worrying and shows a clear pattern of more negative and dispersed residuals when score
increases (the task becomes easier).
plot(fitted,resid)
This plot is also worrying showing a clear pattern of more negative and dispersed residuals when the probability of a correct answer increases (either for y=0 or y=1, not sure which one).
Apparently these patterns may simply be coming from the log() in the link function.
I further tried to plot a regression line as shown in here: link.
Supposedly it should be straight.
Are these patterns strong enough to abandon the model? I would think that they are not, since the plots look very much like the ones from the links, except there is a general tendency to predict more "y=1" i gather.
I know there is a ceiling effect in my data, with some easy conditions having almost only correct responses (y=1). This is why I am being maybe overly skeptical about my model. Are these patterns a symptom of this?