The ANOVA Procedure

Randomized Complete Block with One Factor

(View the complete code for this example.)

This example illustrates the use of PROC ANOVA in analyzing a randomized complete block design. Researchers are interested in whether three treatments have different effects on the yield and worth of a particular crop. They believe that the experimental units are not homogeneous. So, a blocking factor is introduced that allows the experimental units to be homogeneous within each block. The three treatments are then randomly assigned within each block.

The data from this study are input into the SAS data set RCB:

title1 'Randomized Complete Block';
data RCB;
   input Block Treatment $ Yield Worth @@;
   datalines;
1 A 32.6 112   1 B 36.4 130   1 C 29.5 106
2 A 42.7 139   2 B 47.1 143   2 C 32.9 112
3 A 35.3 124   3 B 40.1 134   3 C 33.6 116
;

The variables Yield and Worth are continuous response variables, and the variables Block and Treatment are the classification variables. Because the data for the analysis are balanced, you can use PROC ANOVA to run the analysis.

The statements for the analysis are

proc anova data=RCB;
   class Block Treatment;
   model Yield Worth=Block Treatment;
run;

The Block and Treatment effects appear in the CLASS statement. The MODEL statement requests an analysis for each of the two dependent variables, Yield and Worth.

Figure 26.5 shows the "Class Level Information" table.

Figure 26.5: Class Level Information

Randomized Complete Block

The ANOVA Procedure

Class Level Information
ClassLevelsValues
Block31 2 3
Treatment3A B C

Number of Observations Read9
Number of Observations Used9


The "Class Level Information" table lists the number of levels and their values for all effects specified in the CLASS statement. The number of observations in the data set are also displayed. Use this information to make sure that the data have been read correctly.

The overall ANOVA table for Yield in Figure 26.6 appears first in the output because it is the first response variable listed on the left side in the MODEL statement.

Figure 26.6: Overall ANOVA Table for Yield

Randomized Complete Block

The ANOVA Procedure
 
Dependent Variable: Yield

SourceDFSum of SquaresMean SquareF ValuePr > F
Model4225.277777856.31944448.940.0283
Error425.19111116.2977778  
Corrected Total8250.4688889   

R-SquareCoeff VarRoot MSEYield Mean
0.8994246.8400472.50953736.68889


The overall F statistic is significant , indicating that the model as a whole accounts for a significant portion of the variation in Yield and that you can proceed to evaluate the tests of effects.

The degrees of freedom (DF) are used to ensure correctness of the data and model. The Corrected Total degrees of freedom are one less than the total number of observations in the data set; in this case, 9 – 1 = 8. The Model degrees of freedom for a randomized complete block are , where b = number of block levels and t = number of treatment levels. In this case, this formula leads to model degrees of freedom.

Several simple statistics follow the ANOVA table. The R-Square indicates that the model accounts for nearly 90% of the variation in the variable Yield. The coefficient of variation (C.V.) is listed along with the Root MSE and the mean of the dependent variable. The Root MSE is an estimate of the standard deviation of the dependent variable. The C.V. is a unitless measure of variability.

The tests of the effects shown in Figure 26.7 are displayed after the simple statistics.

Figure 26.7: Tests of Effects for Yield

SourceDFAnova SSMean SquareF ValuePr > F
Block298.175555649.08777787.790.0417
Treatment2127.102222263.551111110.090.0274


For Yield, both the Block and Treatment effects are significant and , respectively) at the 95% level. From this you can conclude that blocking is useful for this variable and that some contrast between the treatment means is significantly different from zero.

Figure 26.8 shows the ANOVA table, simple statistics, and tests of effects for the variable Worth.

Figure 26.8: ANOVA Table for Worth

Randomized Complete Block

The ANOVA Procedure
 
Dependent Variable: Worth

SourceDFSum of SquaresMean SquareF ValuePr > F
Model41247.333333311.8333338.280.0323
Error4150.66666737.666667  
Corrected Total81398.000000   

R-SquareCoeff VarRoot MSEWorth Mean
0.8922274.9494506.137318124.0000

SourceDFAnova SSMean SquareF ValuePr > F
Block2354.6666667177.33333334.710.0889
Treatment2892.6666667446.333333311.850.0209


The overall F test is significant at the 95% level for the variable Worth. The Block effect is not significant at the 0.05 level but is significant at the 0.10 confidence level . Generally, the usefulness of blocking should be determined before the analysis. However, since there are two dependent variables of interest, and Block is significant for one of them (Yield), blocking appears to be generally useful. For Worth, as with Yield, the effect of Treatment is significant .

Issuing the following command produces the Treatment means.

   means Treatment;
run;

Figure 26.9 displays the treatment means and their standard deviations for both dependent variables.

Figure 26.9: Means of Yield and Worth

Randomized Complete Block

The ANOVA Procedure

Level of
Treatment
NYieldWorth
MeanStd DevMeanStd Dev
A336.86666675.22908532125.00000013.5277493
B341.20000005.43415127135.6666676.6583281
C332.00000002.19317122111.3333335.0332230