Mice experiment: lifetime versus diet
The data for this discussion comes from the book The Statistical Sleuth, by Ramsey and Schafer (Duxbury, 1997). An experiment was conducted on female mice, which were randomly assigned to one of the following six treatment groups (as described by Ramsey and Schafer):
NOTE: This data comes from R. Weindruch, R.L. Walford, S. Fligiel, and D. Guthrie, "The Retardation of Aging in Mice by Dietary Restriction: Longevity, Cancer, Immunity and Lifetime Energy Intake," Journal of Nutrition 116(4) (1986): 641-54.
Generally the researchers' questions concerned comparisons of lifetimes between the various diets. There were specifically these questions:
These data are available as the data frame mice.df which should be
available to you automatically from my account. The data frame contains
two variables: Lifetime, which gives the lifetime of each mouse in months,
and Treatment, whose values are described above.
One-way ANOVA with R
Get the data and do basic descriptive statistics:
attach(mice.df)
summary(mice.df)
boxplot(Lifetime ~ Treatment)
nn <- tapply(Lifetime, Treatment, length)
mm <- tapply(Lifetime, Treatment, mean)
ss <- tapply(Lifetime, Treatment, sd)
round(cbind(nn,mm,ss),1)
Do the one-way ANOVA:
fm1 <-aov(Lifetime ~ Treatment) #Fit the one-way ANOVA model.
anova(fm1) #Obtain the ANOVA table.
Follow-up analysis:
pairwise.t.test(Lifetime, Treatment, p.adj="bonferroni")
Here is the Tukey analysis for the mice.short.df data.
diff lcl ucl conclusion
NN85-NP 4.90 3.29 6.51 reject
NN85-NR40 -13.94 -15.55 -12.33 reject
NN85-NR50 -9.00 -10.61 -7.39 reject
NN85-LOPRO -10.66 -12.27 -9.05 reject
NN85-RR50 -8.66 -10.27 -7.05 reject
NP-NR40 -18.84 -20.45 -17.23 reject
NP-NR50 -13.90 -15.51 -12.29 reject
NP-LOPRO -15.56 -17.17 -13.95 reject
NP-RR50 -13.56 -15.17 -11.95 reject
NR40-NR50 4.94 3.33 6.55 reject
NR40-LOPRO 3.28 1.67 4.89 reject
NR40-RR50 5.28 3.67 6.89 reject
NR50-LOPRO -1.66 -3.27 -0.05 reject
NR50-RR50 0.34 -1.27 1.95 NS
LOPRO-RR50 2.00 0.39 3.61 reject
Here is the Tukey analysis for full mice data set.
> round(cbind(nn,mm,ss),2)
nn mm ss
N/N85 57 32.69 5.13
NP 49 27.40 6.13
N/R40 60 45.12 6.70
N/R50 71 41.91 7.58
N/R50_lopro 56 42.89 6.68
R/R50 56 40.17 7.40
mu_i mu_j Y-bar_i - Y-bar_j Signif(.05)?
---------------------------------
NN85 NP 5.29 yes
NN85 NR40 -12.43 yes
NN85 NR50 -9.22 yes
NN85 LOPRO -10.22 yes
NN85 RR50 -7.48 yes
NP NR40 -17.72 yes
NP NR50 -14.51 yes
NP LOPRO -15.49 yes
NP RR50 -12.77 yes
NR40 NR50 3.21 yes
NR40 LOPRO 2.23 no
NR40 RR50 4.95 yes
NR50 LOPRO -.98 no
NR50 RR50 1.74 no
LOPRO RR50 2.72 no
NP NN85 RR50
NR50
LOPRO NR40
o o o o o o
___ ___ _______
_________
----|----------|----------|----------|----------|---
25 30 35 40 45