Shapiro-Wilk normality test

Hello all,
I'm trying to check for normality using Shapiro-Wilk normality test.
I have a two-way ANOVA (2x3) and would like to run this test on each of the 6 groups.
Data set:

x1 x2 y
Group 1 Group 1 900
Group 1 Group 1 600
Group 1 Group 1 800
Group 1 Group 2 600
Group 1 Group 2 100
Group 1 Group 2 1000
Group 1 Group 3 600
Group 1 Group 3 800
Group 1 Group 3 900
Group 2 Group 1 200
Group 2 Group 1 1000
Group 2 Group 1 1000
Group 2 Group 2 1100
Group 2 Group 2 900
Group 2 Group 2 1100
Group 2 Group 3 900
Group 2 Group 3 600
Group 2 Group 3 900

Which function should I use to be able to run it per group?
Thank you!!! :slight_smile:

See the FAQ: How to do a minimal reproducible example reprex for beginners.

res_aov <- aov(Sepal.Length ~ Species, data = iris)
shapiro.test(res_aov$residuals)
#> 
#>  Shapiro-Wilk normality test
#> 
#> data:  res_aov$residuals
#> W = 0.9879, p-value = 0.2189

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.