4
I’m having a problem with an analysis of shapiro.test in the R. I want to analyze the normality of a certain variable x, but I want to do this in stratified samples that together correspond to variable y.
set.seed(1)
df_1 <- data.frame(
x = rnorm(n = 30, mean = 10, sd = 1),
y = sample(x = 1:3, size = 30, replace = TRUE)
)
- It is possible to analyze
xfor each group that is iny?