0

I would like to perform a Shapiro-Wilk test on my data which takes the form of an LMER.

The LMER model is named lmerabsolute.

lmerabsolute <- lmer(transform ~ Target*Type + (1|ID), Errortrial)

Would I be right in performing a shapiro-wilk test with the following formula:

shapiro.test(resid(lmerabsolute))

Additionally, I have also performed a repeated-measures ANOVA on another dataset.

Oneway <- aov(data=Errortrialraw, Absolutefirststoperror~Trialnumber+Error(ID/Trialnumber))

Would I be right in performing a shapiro-wilk test with the following formula:

Onewayproject <- proj(Oneway)
residuals <- Onewayproject[[3]]["Residuals"] #here I extract residuals from the 'within stratum'
shapiro.test(residuals)
Caledonian26
  • 113
  • 1
  • 7
  • I would first question why you believe using a hypothesis test for normality with model residuals is a sensible approach. Have you read the answers to [this question](https://stats.stackexchange.com/q/2492/11849)? – Roland Mar 10 '20 at 14:11
  • @Roland yes; I have visually inspected the residuals through a qqplot and they don't seem so convincing but mostly do fall on a straight line: shall I do a Friedman test instead? – Caledonian26 Mar 10 '20 at 14:15

0 Answers0