Edit: I think the data was poorly given, varables coke, pepsi, and sprite were just given in 2 columns when I got it, but it has nothing to do with before and after treatment?
here's the original questions since someone asked For the study, 2 males and 2 females are picked randomly from NYC, and a random sample of 2 males and 2 females are picked from LA. Each person is given 6 drinks (2 from each brand), where the order of the drinks for each person is randomized. Each person rates the drink’s taste, Y, on a scale of 60 to 100, where 100 is the best tasted.
Please let me know if I can provide any other info. Pretty much I am asked to fit ANOVA. End of Edit#
I would like to understand ANOVA in R, I am working in this data set.
dat <- structure(list(city = structure(c(2L, 2L, 2L, 2L, 1L, 1L, 1L,
1L), .Label = c("LA", "NY"), class = "factor"), sex = structure(c(2L,
2L, 1L, 1L, 2L, 2L, 1L, 1L), .Label = c("F", "M"), class = "factor"),
rater = 1:8, frit0 = c(77L, 72L, 78L, 84L, 77L, 78L, 83L,
81L), frit1 = c(76L, 71L, 78L, 84L, 76L, 77L, 86L, 84L),
utz0 = c(78L, 73L, 78L, 84L, 74L, 81L, 85L, 83L), utz1 = c(80L,
75L, 80L, 86L, 72L, 73L, 81L, 79L), weiss0 = c(78L, 76L,
84L, 90L, 78L, 79L, 88L, 86L), weiss1 = c(81L, 73L, 81L,
87L, 81L, 82L, 92L, 90L)), .Names = c("city", "sex", "rater",
"coke0", "coke1", "pepsi0", "pepsi1", "sprite0", "sprite1"),
class = "data.frame", row.names = c(NA, -8L))
I want to do an analysis of variance, check assumptions, and interpret results. I am sure this is done many times by the experts, so, what is the correct step to do it?
I have tried
am1 <- aov(coke1 ~ coke0 + sex, data=dat2)
summary(am1)
Is this correct? Or even relevant? thanks in advance!