|
Chapter Contents |
Previous |
Next |
| The ANOVA Procedure |
The input data are the 96 values of Y, arranged so that the calcium value (Calcium) changes most rapidly, then the fertilizer value (Fertilizer), then the Soil value, and, finally, the Rep value. Values are shown for Calcium (0 and 1); Fertilizer (0, 1, 2, 3); Soil (1, 2, 3); and Rep (1, 2, 3, 4). The following example produces Output 17.5.1, Output 17.5.2, and Output 17.5.3.
title 'Strip-split Plot';
data Barley;
do Rep=1 to 4;
do Soil=1 to 3; /* 1=d 2=h 3=p */
do Fertilizer=0 to 3;
do Calcium=0,1;
input Yield @;
output;
end;
end;
end;
end;
datalines;
4.91 4.63 4.76 5.04 5.38 6.21 5.60 5.08
4.94 3.98 4.64 5.26 5.28 5.01 5.45 5.62
5.20 4.45 5.05 5.03 5.01 4.63 5.80 5.90
6.00 5.39 4.95 5.39 6.18 5.94 6.58 6.25
5.86 5.41 5.54 5.41 5.28 6.67 6.65 5.94
5.45 5.12 4.73 4.62 5.06 5.75 6.39 5.62
4.96 5.63 5.47 5.31 6.18 6.31 5.95 6.14
5.71 5.37 6.21 5.83 6.28 6.55 6.39 5.57
4.60 4.90 4.88 4.73 5.89 6.20 5.68 5.72
5.79 5.33 5.13 5.18 5.86 5.98 5.55 4.32
5.61 5.15 4.82 5.06 5.67 5.54 5.19 4.46
5.13 4.90 4.88 5.18 5.45 5.80 5.12 4.42
;
proc anova;
class Rep Soil Calcium Fertilizer;
model Yield =
Rep
Fertilizer Fertilizer*Rep
Calcium Calcium*Fertilizer Calcium*Rep(Fertilizer)
Soil Soil*Rep
Soil*Fertilizer Soil*Rep*Fertilizer
Soil*Calcium Soil*Fertilizer*Calcium
Soil*Calcium*Rep(Fertilizer);
test h=Fertilizer e=Fertilizer*Rep;
test h=Calcium
Calcium*Fertilizer e=Calcium*Rep(Fertilizer);
test h=Soil e=Soil*Rep;
test h=Soil*Fertilizer e=Soil*Rep*Fertilizer;
test h=Soil*Calcium
Soil*Fertilizer*Calcium e=Soil*Calcium*Rep(Fertilizer);
means Fertilizer Calcium Soil Calcium*Fertilizer;
run;
Output 17.5.1: Class Level Information and ANOVA Table
|
| ||||||||||||||||||||||
As the model is completely specified by the MODEL statement, the entire top portion of output (Output 17.5.1) should be ignored. Look at the following output produced by the various TEST statements.
Output 17.5.2: Tests of Effects|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Output 17.5.3: Results of MEANS statement
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In this example, you could reduce memory requirements by omitting the Soil*Calcium*Rep(Fertilizer) effect from the model in the MODEL statement. This effect then becomes the ERROR effect, and you can omit the last TEST statement (in the code shown earlier). The test for the Soil*Calcium effect is then given in the Analysis of Variance table in the top portion of output. However, for all other tests, you should look at the results from the TEST statement. In large models, this method may lead to significant reductions in memory requirements.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.