* ch21eg.sas, illustrate RCBD using data of Table 21.1; options ls=78 nodate; ; data RiskPrem; input y block method; lines; 1 1 1 5 1 2 8 1 3 2 2 1 8 2 2 14 2 3 7 3 1 9 3 2 16 3 3 6 4 1 13 4 2 18 4 3 12 5 1 14 5 2 17 5 3 ; * plot the raw data; proc plot; plot y*block=method / vpos=20; title 'Risk Premium Experiment (chapter 21, page 895)'; title2 'Plot of raw data'; ; * analysis of RCBD data; proc glm; class block method; model y = block method; means method / Tukey; output out=stats r=e p=yhat; title2 'Analysis of RCBD data'; ; * Residual plots; proc rank normal=Blom; var e; ranks nscore; proc plot; plot e*yhat=method / vpos=18 vref=0; plot e*nscore=method / vpos=18 vref=0; title2 'Residual plots'; Risk Premium Experiment (chapter 21, page 895) 1 Plot of raw data Plot of y*block. Symbol is value of method. y | 18 + 3 17 + 3 16 + 3 15 + 14 + 3 2 13 + 2 12 + 1 11 + 10 + 9 + 2 8 + 3 2 7 + 1 6 + 1 5 + 2 4 + 3 + 2 + 1 1 + 1 | ---+--------------+--------------+--------------+--------------+-- 1 2 3 4 5 block Risk Premium Experiment (chapter 21, page 895) 2 Analysis of RCBD data The GLM Procedure Class Level Information Class Levels Values block 5 1 2 3 4 5 method 3 1 2 3 Number of observations 15 Risk Premium Experiment (chapter 21, page 895) 3 Analysis of RCBD data The GLM Procedure Dependent Variable: y Sum of Source DF Squares Mean Square F Value Pr > F Model 6 374.1333333 62.3555556 20.90 0.0002 Error 8 23.8666667 2.9833333 Corrected Total 14 398.0000000 R-Square Coeff Var Root MSE y Mean 0.940034 17.27233 1.727233 10.00000 Source DF Type I SS Mean Square F Value Pr > F block 4 171.3333333 42.8333333 14.36 0.0010 method 2 202.8000000 101.4000000 33.99 0.0001 Source DF Type III SS Mean Square F Value Pr > F block 4 171.3333333 42.8333333 14.36 0.0010 method 2 202.8000000 101.4000000 33.99 0.0001 Risk Premium Experiment (chapter 21, page 895) 4 Analysis of RCBD data The GLM Procedure Tukey's Studentized Range (HSD) Test for y 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 8 Error Mean Square 2.983333 Critical Value of Studentized Range 4.04101 Minimum Significant Difference 3.1214 Means with the same letter are not significantly different. Tukey Grouping Mean N method A 14.600 5 3 B 9.800 5 2 C 5.600 5 1 Risk Premium Experiment (chapter 21, page 895) 5 Residual plots Plot of e*yhat. Symbol is value of method. e | 2 + 1 | | 3 | | 3 | 1 1 2 3 | 2 | 2 0 +----------------------------------------------------------------- | 2 | | | | 3 | 1 2 | -2 + 1 3 ---+--------------+--------------+--------------+--------------+-- 0 5 10 15 20 yhat Risk Premium Experiment (chapter 21, page 895) 6 Residual plots Plot of e*nscore. Symbol is value of method. e | 2 + 1 | | 3 | | 3 | 1 1 2 | 2 | 2 0 +-------------------------------------------------------------------------- | 2 | | | | 3 | 1 2 | -2 + 3 1 -+--------+--------+--------+--------+--------+--------+--------+--------+- -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 Rank for Variable e NOTE: 1 obs hidden.