One-way ANOVA

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):

  1. NP: Mice in this group ate as much as they pleased of a nonpurified, standard diet for laboratory mice.
  2. N/N85: This group was fed normally both before and after weaning. (The slash distinguishes the two periods.) After weaning, the ration was controlled at 85 kcal/wk. This, rather than NP, serves as the control group because caloric intake is held reasonably constant.
  3. N/R50: This group was fed a normal diet before weaning and a reduced-calorie diet of 50 kcal/wk after weaning.
  4. R/R50: This group was fed a reduced-calorie diet of 50 kcal/wk both before and after weaning.
  5. N/R50 lopro: This group was fed a normal diet before weaning, a restricted diet of 50 kcal/wk after weaning, and had dietary protein content decreased with advancing age.
  6. N/R40: This group was fed normally before weaning and was given a severely reduced diet of 40 kcal/wk after weaning.

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:

  1. Does lifetime for the 50 kcal/wk diet exceed that for the 85 kcal/wk diet, and, if so, by how much, (This calls for a comparison of the N/R50 group to the N/N85group.)
  2. Is lifetime affected by providing a reduced calorie diet before weaning, given that a 50 kcal/wk diet is provided after weaning? (This calls for a comparison of the R/R50 group to the N/R50 group.)
  3. Does lifetime on the 40 kcal/wk diet exceed the lifetime on the 50 kcal/wk diet? (This calls for a comparison of the N/R40 group to the N/R50 group.)
  4. Given a reduced calorie intake diet of 50 kcal/wk, is there any additional effect on lifetime due to decreasing the protein intake? (This calls for a comparison of the N/R lopro diet to the N/R50 diet.)
  5. Is there an effect on lifetime due to restriction at 85 kcal/week? This would indicate the extent to which the 85 kcal/wk diet served as a proper control and possibly whether there was any effect of restricting the diet, even with a standard caloric intake. (This calls for a comparison of the N/N85 group to the NP group.)


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

TukeyHSD(mice.aov)

                        diff       lwr        upr     p adj
NP-N/N85          -5.2891873 -9.032153 -1.5462215 0.0008921
N/R40-N/N85       12.4254386  8.871759 15.9791182 0.0000000
N/R50-N/N85        9.2228564  5.805921 12.6397919 0.0000000
N/R50_lopro-N/N85 10.1944862  6.579504 13.8094685 0.0000000
R/R50-N/N85        7.4802005  3.865218 11.0951828 0.0000001
N/R40-NP          17.7146259 14.015169 21.4140828 0.0000000
N/R50-NP          14.5120437 10.943740 18.0803473 0.0000000
N/R50_lopro-NP    15.4836735 11.725291 19.2420560 0.0000000
R/R50-NP          12.7693878  9.011005 16.5277703 0.0000000
N/R50-N/R40       -3.2025822 -6.571801  0.1666368 0.0731183
N/R50_lopro-N/R40 -2.2309524 -5.800866  1.3389615 0.4729247
R/R50-N/R40       -4.9452381 -8.515152 -1.3753242 0.0012230
N/R50_lopro-N/R50  0.9716298 -2.462187  4.4054461 0.9654234
R/R50-N/R50       -1.7426559 -5.176472  1.6911604 0.6934788
R/R50-N/R50_lopro -2.7142857 -6.345228  0.9166568 0.2681131


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 

Full data set


    Lifetime   Treatment
1       35.5          NP
2       35.4          NP
3       34.9          NP
4       34.8          NP
5       33.8          NP
6       33.5          NP
7       32.6          NP
8       32.4          NP
9       31.8          NP
10      31.6          NP
11      31.5          NP
12      31.4          NP
13      31.4          NP
14      31.3          NP
15      30.8          NP
16      30.7          NP
17      30.5          NP
18      30.4          NP
19      30.2          NP
20      30.2          NP
21      30.1          NP
22      30.0          NP
23      29.6          NP
24      29.3          NP
25      28.9          NP
26      28.3          NP
27      28.0          NP
28      27.5          NP
29      27.3          NP
30      27.1          NP
31      26.8          NP
32      26.6          NP
33      26.5          NP
34      26.3          NP
35      25.9          NP
36      25.1          NP
37      24.8          NP
38      24.7          NP
39      24.3          NP
40      24.1          NP
41      24.0          NP
42      22.1          NP
43      21.5          NP
44      21.8          NP
45      20.0          NP
46      18.0          NP
47      13.8          NP
48       9.2          NP
49       6.4          NP
50      42.3       N/N85
51      40.1       N/N85
52      39.5       N/N85
53      38.6       N/N85
54      38.4       N/N85
55      38.3       N/N85
56      37.8       N/N85
57      37.6       N/N85
58      37.4       N/N85
59      37.3       N/N85
60      36.8       N/N85
61      36.5       N/N85
62      36.5       N/N85
63      36.5       N/N85
64      36.4       N/N85
65      35.9       N/N85
66      35.5       N/N85
67      35.5       N/N85
68      35.3       N/N85
69      35.3       N/N85
70      34.9       N/N85
71      34.6       N/N85
72      34.5       N/N85
73      34.4       N/N85
74      33.8       N/N85
75      33.5       N/N85
76      33.3       N/N85
77      33.3       N/N85
78      33.1       N/N85
79      33.0       N/N85
80      32.9       N/N85
81      32.5       N/N85
82      32.4       N/N85
83      32.3       N/N85
84      31.7       N/N85
85      31.7       N/N85
86      31.6       N/N85
87      31.6       N/N85
88      31.5       N/N85
89      33.1       N/N85
90      31.5       N/N85
91      31.4       N/N85
92      31.4       N/N85
93      31.0       N/N85
94      30.3       N/N85
95      30.1       N/N85
96      29.6       N/N85
97      29.3       N/N85
98      29.2       N/N85
99      28.8       N/N85
100     27.9       N/N85
101     24.5       N/N85
102     22.3       N/N85
103     21.9       N/N85
104     19.8       N/N85
105     19.3       N/N85
106     17.9       N/N85
107     49.7       N/R50
108     49.3       N/R50
109     48.6       N/R50
110     48.3       N/R50
111     48.0       N/R50
112     47.7       N/R50
113     47.5       N/R50
114     47.2       N/R50
115     47.1       N/R50
116     47.0       N/R50
117     47.0       N/R50
118     47.0       N/R50
119     46.9       N/R50
120     46.9       N/R50
121     46.3       N/R50
122     45.9       N/R50
123     45.9       N/R50
124     44.5       N/R50
125     44.1       N/R50
126     44.0       N/R50
127     43.6       N/R50
128     43.3       N/R50
129     42.1       N/R50
130     42.0       N/R50
131     42.0       N/R50
132     41.9       N/R50
133     41.9       N/R50
134     41.6       N/R50
135     40.5       N/R50
136     40.1       N/R50
137     39.2       N/R50
138     38.9       N/R50
139     37.4       N/R50
140     37.3       N/R50
141     36.7       N/R50
142     36.4       N/R50
143     36.2       N/R50
144     35.8       N/R50
145     35.7       N/R50
146     35.4       N/R50
147     35.3       N/R50
148     35.0       N/R50
149     35.0       N/R50
150     34.8       N/R50
151     34.7       N/R50
152     33.5       N/R50
153     32.8       N/R50
154     31.5       N/R50
155     30.8       N/R50
156     30.6       N/R50
157     29.9       N/R50
158     29.2       N/R50
159     28.0       N/R50
160     26.3       N/R50
161     24.7       N/R50
162     23.4       N/R50
163     51.9       N/R50
164     51.7       N/R50
165     51.4       N/R50
166     51.3       N/R50
167     50.9       N/R50
168     50.5       N/R50
169     50.5       N/R50
170     50.2       N/R50
171     50.0       N/R50
172     49.4       N/R50
173     49.2       N/R50
174     49.2       N/R50
175     49.1       N/R50
176     49.1       N/R50
177     49.1       N/R50
178     49.1       R/R50
179     48.7       R/R50
180     48.3       R/R50
181     48.1       R/R50
182     48.0       R/R50
183     47.8       R/R50
184     47.7       R/R50
185     47.6       R/R50
186     47.5       R/R50
187     47.3       R/R50
188     47.2       R/R50
189     46.9       R/R50
190     46.7       R/R50
191     46.5       R/R50
192     46.3       R/R50
193     45.6       R/R50
194     45.2       R/R50
195     45.1       R/R50
196     44.4       R/R50
197     43.9       R/R50
198     43.6       R/R50
199     42.9       R/R50
200     42.7       R/R50
201     42.6       R/R50
202     42.5       R/R50
203     42.4       R/R50
204     42.0       R/R50
205     41.5       R/R50
206     41.3       R/R50
207     40.9       R/R50
208     40.7       R/R50
209     40.4       R/R50
210     39.9       R/R50
211     39.4       R/R50
212     38.9       R/R50
213     38.2       R/R50
214     37.7       R/R50
215     37.6       R/R50
216     37.2       R/R50
217     35.4       R/R50
218     35.4       R/R50
219     35.2       R/R50
220     34.3       R/R50
221     32.7       R/R50
222     32.5       R/R50
223     31.8       R/R50
224     31.1       R/R50
225     30.9       R/R50
226     29.8       R/R50
227     26.8       R/R50
228     25.7       R/R50
229     25.1       R/R50
230     23.5       R/R50
231     18.6       R/R50
232     42.4       R/R50
233     48.1       R/R50
234     50.7 N/R50_lopro
235     50.6 N/R50_lopro
236     50.5 N/R50_lopro
237     50.3 N/R50_lopro
238     50.1 N/R50_lopro
239     50.1 N/R50_lopro
240     50.0 N/R50_lopro
241     50.0 N/R50_lopro
242     49.8 N/R50_lopro
243     49.7 N/R50_lopro
244     49.6 N/R50_lopro
245     49.0 N/R50_lopro
246     48.9 N/R50_lopro
247     48.5 N/R50_lopro
248     48.3 N/R50_lopro
249     48.3 N/R50_lopro
250     48.1 N/R50_lopro
251     47.7 N/R50_lopro
252     47.0 N/R50_lopro
253     46.8 N/R50_lopro
254     46.8 N/R50_lopro
255     46.8 N/R50_lopro
256     46.2 N/R50_lopro
257     46.2 N/R50_lopro
258     45.1 N/R50_lopro
259     45.0 N/R50_lopro
260     45.0 N/R50_lopro
261     44.3 N/R50_lopro
262     43.6 N/R50_lopro
263     43.1 N/R50_lopro
264     42.3 N/R50_lopro
265     42.9 N/R50_lopro
266     42.7 N/R50_lopro
267     42.4 N/R50_lopro
268     42.0 N/R50_lopro
269     41.8 N/R50_lopro
270     41.6 N/R50_lopro
271     40.6 N/R50_lopro
272     40.4 N/R50_lopro
273     39.9 N/R50_lopro
274     39.5 N/R50_lopro
275     39.2 N/R50_lopro
276     39.0 N/R50_lopro
277     38.5 N/R50_lopro
278     38.2 N/R50_lopro
279     38.0 N/R50_lopro
280     36.2 N/R50_lopro
281     36.3 N/R50_lopro
282     35.8 N/R50_lopro
283     34.0 N/R50_lopro
284     33.4 N/R50_lopro
285     32.2 N/R50_lopro
286     30.6 N/R50_lopro
287     27.5 N/R50_lopro
288     26.3 N/R50_lopro
289     24.2 N/R50_lopro
290     54.6       N/R40
291     54.0       N/R40
292     53.8       N/R40
293     53.3       N/R40
294     52.9       N/R40
295     52.7       N/R40
296     52.5       N/R40
297     52.4       N/R40
298     52.0       N/R40
299     51.8       N/R40
300     51.3       N/R40
301     51.3       N/R40
302     51.0       N/R40
303     50.8       N/R40
304     50.3       N/R40
305     50.1       N/R40
306     49.8       N/R40
307     48.7       N/R40
308     48.3       N/R40
309     48.1       N/R40
310     47.6       N/R40
311     47.6       N/R40
312     47.6       N/R40
313     47.5       N/R40
314     47.5       N/R40
315     47.5       N/R40
316     50.5       N/R40
317     47.5       N/R40
318     46.4       N/R40
319     45.3       N/R40
320     45.7       N/R40
321     44.2       N/R40
322     43.8       N/R40
323     43.8       N/R40
324     43.7       N/R40
325     43.6       N/R40
326     43.6       N/R40
327     43.3       N/R40
328     43.2       N/R40
329     43.1       N/R40
330     42.7       N/R40
331     42.7       N/R40
332     42.5       N/R40
333     42.3       N/R40
334     42.2       N/R40
335     42.2       N/R40
336     41.6       N/R40
337     40.8       N/R40
338     40.3       N/R40
339     40.0       N/R40
340     38.9       N/R40
341     37.2       N/R40
342     36.7       N/R40
343     36.6       N/R40
344     36.1       N/R40
345     33.9       N/R40
346     31.0       N/R40
347     29.4       N/R40
348     19.6       N/R40
349     47.6       N/R40