In: Statistics and Probability
A researcher wanted to study the effect of type of diet on weight gain in mice. The researcher was interested in 3 specific diets: standard mouse chow diet, “junk” food diet, and an organic diet. A total of 54 mice were randomly assigned to receive one of the 3 types of diets (18 in each group). The outcome variable (response variable) was weight gain (in grams) over a 1 month period. The 3 data sets provided below are for the same study conducted by different researchers from completely different labs. For the sake of comparison, we will assume that they all followed the exact same procedures and that the only difference is the samples. For each study (A, B, and C), determine whether it would be appropriate to use a one-way ANOVA to analyze the data. If it is, conduct the analysis and any additional analysis that might be necessary. If it does not seem appropriate to use a one-way ANOVA, use an appropriate alternative, including any posthoc tests. Remember, we are interested in determining whether the diet groups differ with respect to weight gain. Use a significance level of .05.
Study B
stand2<-c(8.43, 9.22, 12.43, 8.39, 12.53, 9.64, 9.30, 8.84, 13.22, 8.00, 10.74, 11.85, 10.95, 10.62,
11.19, 9.77, 9.66 , 8.65)
junk2<-c(10.53 , 9.14, 13.24, 11.99, 10.63, 11.44, 10.43, 10.44, 11.25, 11.36, 12.17, 10.46, 10.75,
10.20, 13.33, 12.60, 12.15, 12.41)
organic2<-c(9.51, 9.37, 9.95, 10.16 ,11.29, 9.54, 10.31, 9.92, 10.41, 10.18 ,11.78, 10.04, 11.18, 9.44, 9.05,
9.33, 10.45, 10.53)
a. Based on graphs and statistical tests, does it seem reasonable to assume normality?
b. Based on statistical tests, does it seem reasonable to assume equal variances?
c. Given the evidence regarding the ANOVA assumptions, which statistical result would be used to determine whether there is an effect for type of diet?
d. Assuming there is an overall effect, which groups differ, if any?
We have run the problem in R and the code and comments are
#R- code
stand2<-c(8.43, 9.22, 12.43, 8.39, 12.53, 9.64, 9.30, 8.84,
13.22, 8.00, 10.74, 11.85, 10.95, 10.62,
11.19, 9.77, 9.66 , 8.65)
junk2<-c(10.53 , 9.14, 13.24, 11.99, 10.63, 11.44, 10.43, 10.44, 11.25, 11.36, 12.17, 10.46, 10.75,
10.20, 13.33, 12.60, 12.15, 12.41)
organic2<-c(9.51, 9.37, 9.95, 10.16 ,11.29, 9.54, 10.31, 9.92, 10.41, 10.18 ,11.78, 10.04, 11.18, 9.44, 9.05,
9.33, 10.45, 10.53)
#part a
shapiro.test(stand2)
shapiro.test(junk2)
shapiro.test(organic2)
Both of 3 are has normally distributed.
#part b
library(lmtest)
data=c(stand2,junk2,organic2)
f=as.factor(rep(seq(1,3),each=18))
fit=lm(data~f)
bptest(fit)
Data has homosecdusticity
#part c
anova(fit)
#here we run for ANOVA and get that p-value is very low. Hence
There is significant difference in the means of different
# 3 groups.
#part d
TukeyHSD(aov(data~f))
From it we can say group junk has significantly different
mean
That stand2 and organic. Alos stands and organic has insignificant
mean difference.
Please up vote the solution if you like the answer to the question