Unformatted text preview: STAT 350 – Spring 2009 Lab #6 SOLUTION Corrected
2way ANOVA Unless otherwise indicated, all of the following should be done using SAS. Please put all SAS
input (Editor window) and all SAS output (Output window, NOT the Log window) as an
appendix. Nothing pasted directly from SAS should be given as an answer to the questions
below!
The Experiment
A wood scientist (yes, there are such people... even right here at Purdue) has come to you for
help analyzing an experiment. He had wanted to examine the durability of wood used for
decking. Deterioration of wood in use is commonly caused by decay fungi, certain insects
(including termites) as well as other organisms, and weathering. He wanted to examine various
species of wood and various preservatives. He used 7 species of wood: Maple, Ash, Red Oak,
Spruce, Northern White Cedar, Eastern Red Cedar, and Redwood. He used 4 types of
preservatives: creosote, pentachlorophenol (PCP), chromated copper arsenate (CCA), and
ammoniacal copper arsenate (ACA). He had 20 twobyfour boards of each species: of these 5
were treated with creosote, 5 with PCP, 5 with CCA, and 5 with ACA. The boards were dried
and weighed then placed outdoors (all in the same experimental plot) for 10 years. At the end of
10 years, the boards were collected, dried, and reweighed. For each board, the dry weightloss
(in grams) was recorded. The data are available in the accompanying Excel file.
1. Analyze the data as a 2way ANOVA, with "preservative" and "species" as the 2 factors.
Include the interaction effect. Give sums of squares and mean squares to 2 decimal places,
but do not round the F or pvalues.
a. Present the ANOVA table (with pvalues) in a reportquality table.
Source
Species
Preservative
S×P
Error
Total df
6
3
18
112
139 Sum of Squares
13085.49
19.80
68988.65
24542.65
106636.58 Mean Square
2180.91
6.60
3832.70
219.13 F
9.95
0.03
17.49 pvalue
< 0.0001
0.9929
< 0.0001 b. Was there a significant preservative effect (α = 0.05)?
i. Answer either. “Yes, the effect of preservative was significant” or “No, the effect of
preservative was not significant”.
No, the effect of preservative was not significant
ii. Give the value of the appropriate test statistic and its degrees of freedom.
The test statistic is 0.03, the degrees of freedom are df1 = 3, df2 = 112
iii. Give the pvalue.
0.9929 Lab #6 Page 1 iv. If the effect of preservative is significant, conduct Tukey's multiple comparison
procedure on the preservatives and present your results (with the means for each
level) using the line method discussed in class (you may draw the lines in by hand).
If this effect was not significant, just give a table summarizing the means for each
preservative. In either case, give means to 2 decimal places.
preservative:
mean loss: ACA
101.71 CCA
101.37 Creosote
101.34 PCP
100.67 c. Was there a significant species effect (α = 0.05)?
i. Answer either. “Yes, the effect of species was significant” or “No, the effect of
species was not significant”.
Yes, the effect of species was significant
ii. Give the value of the appropriate test statistic and its degrees of freedom.
The test statistic is 9.95, the degrees of freedom are df1 = 6, df2 = 112
iii. Give the pvalue.
< 0.0001
iv. If the effect of preservative is significant, conduct Tukey's multiple comparison
procedure on the species and present your results (with the means for each level)
using the line method discussed in class (you may draw the lines in by hand). If this
effect was not significant, just give a table summarizing the means for each species.
In either case, give means to 2 decimal places. Species:
Mean: Maple
119.53 Red
Oak
103.79 Redwood
103.54 Spruce
102.91 White
Cedar
97.34 Ash
97.08 Red
Cedar
84.73 d. Was the effect of the interaction between species and preservative significant (α = 0.05)?
i. Answer either. “Yes, there was a significant interaction effect” or “No, there was not
a significant interaction effect”.
Yes, there was a significant interaction effect.
ii. Give the value of the appropriate test statistic and its degrees of freedom.
The test statistic is 17.49, the degrees of freedom are df1 = 18, df2 = 112
iii. Give the pvalue.
< 0.0001 Lab #6 Page 2 e. Give interaction plots (I recommend making these in Excel). Make 2 separate plots. The
first should have the species levels on the xaxis and a separate series for each
preservative. The second should have the preservative levels on the xaxis and a separate
series for each species. Be sure that the xaxis and series are unambiguously labeled. If
you print in blackandwhite, make sure the different series are distinguishable after
printing!
180
160
140
120 Creosote 100 PCP 80 CCA 60 ACA 40
20
0
Maple Ash Spruce Red Oak White Cedar Redwood Red Cedar 180
160
140 Maple 120 Ash
Spruce 100 Red Oak 80 White Cedar 60 Redwood 40 Red Cedar 20
0
Creosote PCP CCA ACA 2. Now assume that instead of testing these preservatives on several different species of wood,
the wood scientist had only used boards made of Red Cedar. Using only the data collected
with Red Cedar boards, analyze the data as a 1way ANOVA with preservative as the only
factor.
a. Present the ANOVA table (with pvalues) in a reportquality table. Give sums of squares
and mean squares to 2 decimal places, but do not round the F or pvalues.
Source
Preservative
Error
Total
Lab #6 df
3
16
19 Sum of Squares
33830.22
3038.40
36868.62 Mean Square
11276.74
189.90 F
59.38 pvalue
< 0.0001 Page 3 b. Was there a significant preservative effect (α = 0.05)?
i. Answer either. “Yes, the effect of preservative was significant” or “No, the effect of
preservative was not significant”.
Yes, the effect of preservative was significant.
ii. Give the value of the appropriate test statistic and its degrees of freedom.
The test statistic is 59.38, the degrees of freedom are df1 = 3, df2 = 16
iii. Give the pvalue.
< 0.0001
iv. If the effect of preservative is significant, conduct Tukey's multiple comparison
procedure on the preservatives and present your results (with the means for each
level) using the line method discussed in class (you may draw the lines in by hand).
If this effect was not significant, just give a table summarizing the means for each
preservative. In either case, give means to 2 decimal places.
preservative:
mean loss: ACA
144.98 CCA
100.14 PCP
51.16 Creosote
42.64 3. Were the conclusions you obtained regarding the preservatives the same for both analyses?
Explain why or why not.
No, the conclusions regarding the preservatives were not the same in both analyses. In the
first analysis, it appeared that the four preservatives were equally effective. In the second
analysis, there was a clear difference in effectiveness among these preservatives.
The reason for the apparent inconsistency was the strong and significant interaction effect.
Looking at the interaction plots, you can see (for example) that Creosote was the most
effective preservative when used with Red Cedar and the least effective when used with
Maple. ACA, on the other hand, was most effective when used on Maple, and least effective
when used on Red Cedar. These differences between species are canceled out when the
effectiveness of a preservative is averaged across species.
4. Write a brief paragraph explaining your findings. Be sure to address your conclusions
regarding the species and preservatives (e.g., which would you recommend?)
Overall we found a significant difference in the durability among the 7 species tested. Red
Cedar, Ash, and White Cedar were the most durable species (these had the least loss of
mass) while Maple was clearly the least durable species. Results among the preservatives
were less conclusive. There was a highly significant interaction effect between species and
preservative, indicating that which preservative is most effectives depends on the species of
wood being used. With Red Cedar, Creosote and PCP proved to be the most effective
preservatives, while ACA was clearly the least effective. Separate analyses should be done
for each of the other 6 species of wood to determine if there is a significant difference in the
effectiveness of the 4 preservatives for each species.
Lab #6 Page 4 Appendix
Do not forget to include your SAS code (contents of the Editor window) and all SAS output
(contents of the Output window, NOT the Log window) as an appendix.
data wood;
input species $ preserv $ loss;
cards;
Maple
Creosote
161.3
Maple
Creosote
148.9
Maple
Creosote
173.8
Maple
Creosote
134.1
Maple
Creosote
154.1
Ash
Creosote
127.8
Ash
Creosote
110
Ash
Creosote
119.8
Ash
Creosote
109.2
Ash
Creosote
117
Spruce Creosote
112.3
Spruce Creosote
104.7
Spruce Creosote
118.5
Spruce Creosote
89.8
Spruce Creosote
129.6
RedOak Creosote
91.1
RedOak Creosote
79.3
RedOak Creosote
93.4
RedOak Creosote
127.9
RedOak Creosote
99
WhiteCedar
Creosote
118.3
WhiteCedar
Creosote
78
WhiteCedar
Creosote
87.2
WhiteCedar
Creosote
95.6
WhiteCedar
Creosote
87.2
Redwood Creosote
103.6
Redwood Creosote
84.8
Redwood Creosote
84.8
Redwood Creosote
95.3
Redwood Creosote
97.4
RedCedar
Creosote
54.6
RedCedar
Creosote
22.9
RedCedar
Creosote
59.9
RedCedar
Creosote
36
RedCedar
Creosote
39.8
Maple
PCP
138.4
Maple
PCP
111.2
Maple
PCP
142.7
Maple
PCP
142
Maple
PCP
115.7
Ash
PCP
100.2
Ash
PCP
106
Ash
PCP
107.6
Ash
PCP
100.2
Ash
PCP
98.7
Spruce PCP
84
Spruce PCP
125
Spruce PCP
137
Spruce PCP
102.9
Spruce PCP
118.7
RedOak PCP
92.5
RedOak PCP
95
RedOak PCP
127.4
RedOak PCP
89.9
RedOak PCP
99.6
WhiteCedar
PCP
87.8
WhiteCedar
PCP
119.1
WhiteCedar
PCP
83.5
WhiteCedar
PCP
105.6
WhiteCedar
PCP
104.2
Redwood PCP
106.3
Redwood PCP
111.3
Redwood PCP
116.2
Redwood PCP
104.2
Redwood PCP
94.8 Lab #6 RedCedar
RedCedar
RedCedar
RedCedar
RedCedar
Maple
CCA
Maple
CCA
Maple
CCA
Maple
CCA
Maple
CCA
Ash
CCA
Ash
CCA
Ash
CCA
Ash
CCA
Ash
CCA
Spruce CCA
Spruce CCA
Spruce CCA
Spruce CCA
Spruce CCA
RedOak CCA
RedOak CCA
RedOak CCA
RedOak CCA
RedOak CCA
WhiteCedar
WhiteCedar
WhiteCedar
WhiteCedar
WhiteCedar
Redwood CCA
Redwood CCA
Redwood CCA
Redwood CCA
Redwood CCA
RedCedar
RedCedar
RedCedar
RedCedar
RedCedar
Maple
ACA
Maple
ACA
Maple
ACA
Maple
ACA
Maple
ACA
Ash
ACA
Ash
ACA
Ash
ACA
Ash
ACA
Ash
ACA
Spruce ACA
Spruce ACA
Spruce ACA
Spruce ACA
Spruce ACA
RedOak ACA
RedOak ACA
RedOak ACA
RedOak ACA
RedOak ACA
WhiteCedar
WhiteCedar
WhiteCedar
WhiteCedar
WhiteCedar
Redwood ACA
Redwood ACA
Redwood ACA PCP
PCP
PCP
PCP
PCP
115.4
130.4
115.4
144.5
107
88.5
106.7
121.9
86.4
105.9
107.8
83.4
101.3
111.9
107.3
116.5
112.9
90.1
112.5
117.4
CCA
CCA
CCA
CCA
CCA
43.9
88.1
105.2
105.5
76.1
CCA
CCA
CCA
CCA
CCA
55.9
85.1
68.6
76
70.1
53.7
45.4
77.1
75.9
83.5
73.2
68.8
90.3
94.2
97.5
131.2
87.2
121.7
123.1
68.1
ACA
ACA
ACA
ACA
ACA
135.7
126.2
129.4 44.5
28.7
59.6
53.7
69.3 64.5
98.9
80
90.6
111.2 85.5
115.4
86.5
114.7
98.6 113.2
104
104.4
101
112.4 Page 5 Redwood ACA
Redwood ACA
RedCedar
RedCedar 119.1
142.9
ACA
ACA RedCedar
RedCedar
RedCedar
; 159.3
140 ACA
ACA
ACA 149.5
136.3
139.8 title 'All species 2way ANOVA';
proc anova data=wood;
class species preserv;
model loss = species preserv species*preserv;
means species/tukey;
means preserv;
run;
title 'Redwood only 1way ANOVA';
data redcedarwood;
set wood;
if species = 'RedCedar';
run;
*proc print data=redcedarwood;
*run;
proc anova data=redcedarwood;
class preserv;
model loss=preserv;
means preserv/tukey;
run;
All species 2way ANOVA 1 The ANOVA Procedure
Class Level Information
Class Levels Values species 7 Ash Maple RedCedar RedOak Redwood Spruce WhiteCed preserv 4 ACA CCA Creosote PCP Number of Observations Read
Number of Observations Used 140
140 All species 2way ANOVA 2 The ANOVA Procedure
Dependent Variable: loss Source DF Sum of
Squares Mean Square F Value Pr > F Model 27 82093.9289 3040.5159 13.88 <.0001 Error 112 24542.6480 219.1308 Corrected Total 139 106636.5769 RSquare Coeff Var Root MSE loss Mean 0.769848 14.61701 14.80307 101.2729 Source Anova SS Mean Square F Value Pr > F species
preserv
species*preserv Lab #6 DF
6
3
18 13085.48586
19.79686
68988.64614 2180.91431
6.59895
3832.70256 9.95
0.03
17.49 <.0001
0.9929
<.0001 Page 6 All species 2way ANOVA 3 The ANOVA Procedure
Tukey's Studentized Range (HSD) Test for loss
NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher
Type II error rate than REGWQ. Alpha
0.05
Error Degrees of Freedom
112
Error Mean Square
219.1308
Critical Value of Studentized Range 4.24635
Minimum Significant Difference
14.056 Means with the same letter are not significantly different. Tukey Grouping Mean N A 119.530 20 Maple B
B
B
B
B
B
B
B
B 103.790 20 RedOak 103.540 20 Redwood 102.910 20 Spruce 97.335 20 WhiteCed 97.075 20 Ash 84.730 20 RedCedar C
C
C
C
C species All species 2way ANOVA 4 The ANOVA Procedure Level of
preserv
ACA
CCA
Creosote
PCP Lab #6 N
35
35
35
35 lossMean
Std Dev
101.708571
101.368571
101.342857
100.671429 30.6168578
19.1031684
33.9074457
26.1486089 Page 7 Redwood only 1way ANOVA 5 The ANOVA Procedure
Class Level Information
Class Levels preserv 4 Values
ACA CCA Creosote PCP Number of Observations Read
Number of Observations Used 20
20 Redwood only 1way ANOVA 6 The ANOVA Procedure
Dependent Variable: loss DF Sum of
Squares Mean Square F Value Pr > F Model 3 33830.21800 11276.73933 59.38 <.0001 Error 16 3038.40400 189.90025 Corrected Total 19 36868.62200 Source RSquare Coeff Var Root MSE loss Mean 0.917588 16.26393 13.78043 84.73000 Source DF Anova SS Mean Square F Value Pr > F preserv 3 33830.21800 11276.73933 59.38 <.0001 Redwood only 1way ANOVA 7 The ANOVA Procedure
Tukey's Studentized Range (HSD) Test for loss
NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher
Type II error rate than REGWQ. Alpha
0.05
Error Degrees of Freedom
16
Error Mean Square
189.9002
Critical Value of Studentized Range 4.04609
Minimum Significant Difference
24.935 Means with the same letter are not significantly different. Tukey Grouping N preserv A 144.980 5 ACA B 100.140 5 CCA C
C
C Lab #6 Mean 51.160 5 PCP 42.640 5 Creosote Page 8 ...
View
Full
Document
This note was uploaded on 02/16/2010 for the course STAT 350 taught by Professor Staff during the Spring '08 term at Purdue.
 Spring '08
 Staff

Click to edit the document details