* fruit.sas; options ls=72; ; data fruit; do B=1 to 3; do rep=1 to 2; do A=1 to 4; input y @@; output; end; end; end; lines; 49 50 43 53 39 55 38 48 55 67 53 85 41 58 42 73 66 85 69 85 68 92 62 99 ; proc sort; by A B rep; proc print; var A B rep y; proc glm; class A B; model y = A | B; output out=fruit2 p=yhat r=e; means A | B; proc rank normal=Blom; var e; ranks nscore; proc plot; plot e*yhat / vpos=18 vref=0; plot e*nscore / vpos=18 vref=0 href=0; plot yhat*A=B / vpos=25; The SAS System 1 OBS A B REP Y 1 1 1 1 49 2 1 1 2 39 3 1 2 1 55 4 1 2 2 41 5 1 3 1 66 6 1 3 2 68 7 2 1 1 50 8 2 1 2 55 9 2 2 1 67 10 2 2 2 58 11 2 3 1 85 12 2 3 2 92 13 3 1 1 43 14 3 1 2 38 15 3 2 1 53 16 3 2 2 42 17 3 3 1 69 18 3 3 2 62 19 4 1 1 53 20 4 1 2 48 21 4 2 1 85 22 4 2 2 73 23 4 3 1 85 24 4 3 2 99 The SAS System 2 General Linear Models Procedure Class Level Information Class Levels Values A 4 1 2 3 4 B 3 1 2 3 Number of observations in data set = 24 The SAS System 3 General Linear Models Procedure Dependent Variable: Y Sum of Mean Source DF Squares Square F Value Pr > F Model 11 6680.4583 607.3144 14.36 0.0001 Error 12 507.5000 42.2917 Corrected Total 23 7187.9583 R-Square C.V. Root MSE Y Mean 0.929396 10.58149 6.5032 61.458 Source DF Type I SS Mean Square F Value Pr > F A 3 2227.4583 742.4861 17.56 0.0001 B 2 3996.0833 1998.0417 47.24 0.0001 A*B 6 456.9167 76.1528 1.80 0.1817 Source DF Type III SS Mean Square F Value Pr > F A 3 2227.4583 742.4861 17.56 0.0001 B 2 3996.0833 1998.0417 47.24 0.0001 A*B 6 456.9167 76.1528 1.80 0.1817 The SAS System 4 General Linear Models Procedure Level of --------------Y-------------- A N Mean SD 1 6 53.0000000 12.2800651 2 6 67.8333333 17.0811787 3 6 51.1666667 12.3517880 4 6 73.8333333 19.9240224 Level of --------------Y-------------- B N Mean SD 1 8 46.8750000 6.2664070 2 8 59.2500000 15.1256641 3 8 78.2500000 13.7087042 Level of Level of --------------Y-------------- A B N Mean SD 1 1 2 44.0000000 7.07106781 1 2 2 48.0000000 9.89949494 1 3 2 67.0000000 1.41421356 2 1 2 52.5000000 3.53553391 2 2 2 62.5000000 6.36396103 2 3 2 88.5000000 4.94974747 3 1 2 40.5000000 3.53553391 3 2 2 47.5000000 7.77817459 3 3 2 65.5000000 4.94974747 4 1 2 50.5000000 3.53553391 4 2 2 79.0000000 8.48528137 4 3 2 92.0000000 9.89949494 The SAS System 5 Plot of E*YHAT. Legend: A = 1 obs, B = 2 obs, etc. E | 10 + | | A A | A 5 + A A A | A A | A A A | A 0 +------------------------------------------------------------------- | A | A A A | A A -5 + A A A | A | A A | -10 + -+----------+----------+----------+----------+----------+----------+ 40 50 60 70 80 90 100 YHAT The SAS System 6 Plot of E*NSCORE. Legend: A = 1 obs, B = 2 obs, etc. E | | 10 + | | | | | A A | | A 5 + | AA A | | A A | | A B | |A 0 +----------------------------+---------------------------- | A| | A B | | A A | -5 + A AA | | A | | A A | | | -10 + | ---+------------+------------+------------+------------+-- -2 -1 0 1 2 RANK FOR VARIABLE E The SAS System 7 Plot of YHAT*A. Symbol is value of B. YHAT | | | | | 100 + | | 3 | 3 | | 80 + 2 | | | | 3 3 | 2 60 + | | 1 | 1 | 2 2 | 1 40 + 1 | ---+----------------+----------------+----------------+-- 1 2 3 4 A NOTE: 12 obs hidden.