# if residuals of proportional data are normally distributed is it OK to use lmer? how many tests should I trust to assess normality?

I have 36 rats, some are highly impulsive (HI), some are low-impulsive (LI) and some are MIDs. I ran them on two separate days on an attention task with a variable ITI paradigm whereby a cue is presented pseudo-randomly after 3s, 5s, 7s and 9s. I'm looking at the probability of making a correct response (DV) as a function of the impulsivity phenotype (3 levels); Day (2 levels) and the ITI (4 levels), my random effect is rat_ID.

I read around that for proportional data of this type I should use glmer, I tried this with the afex package and I think I managed to make it work, see code below:

m1 <- mixed(prob_correct ~ Day*impulsivity*ITI +(1|rat_ID), data = mydat2, method = "LRT", family = binomial, weight = mydat2\$count)
m1 # prints tests of effects

main_contrasts = emmeans(m1, pairwise~ impulsivity|ITI, type = "response")
main_contrasts

Mixed Model Anova Table (Type 3 tests, LRT-method)

Model: prob_correct ~ Day * impulsivity * ITI + (1 | rat_ID)
Data: mydat2
Df full model: 25
Effect df       Chisq p.value
1                 Day  1  210.18 ***   <.001
2         impulsivity  2    13.12 **    .001
3                 ITI  3 2070.49 ***   <.001
4     Day:impulsivity  2   19.40 ***   <.001
5             Day:ITI  3  120.19 ***   <.001
6     impulsivity:ITI  6  457.07 ***   <.001
7 Day:impulsivity:ITI  6   49.38 ***   <.001


The way I report this data is, for e.g. <<there was an interaction between ITI and impulsivity chi^2(6) = 457.07, p<.001. Post-hoc contrasts found that etc.. >>

However I'm not 100% sure that this method is fitting my data properly, I get a lot of significant contrasts so I'm getting a bit worried. However the emmean that I get in the contrast output does look like my actual data.

On the other hand I was told that if I fit lmer on this data and the residuals look approximately normally distributed, I can use lmer (which I'm more confident about). code below:

lmecoeff<- lmer(prob_correct~Day*ITI*impulsivity+(1|rat_ID), na.action=na.omit, data= mydat2)


I look at residuals by plotting a histogram; doing a shapiro test; plotting QQ plots, looking at kurtosis and skewness. Often histograms, QQ plots and skewness look fine but my shapiro test tells me the data are not normally distributed and kurtosis also has high values sometimes, should I then use glmer? How many normality tests should I rely on to judge whether I can use lmer or whether, instead, I have to resort to glmer?

Thank you!

• A linear mixed model has quite some assumptions, e.g. normality of the random effects. Just studying residual distribution won't be sufficient. Note that this sort of model is less robust to violation of assumptions than a normal linear model. Jul 27, 2020 at 20:09