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)