Data from Chapter 2 from Table 2.2, page 22
data table2_2; input a score; datalines; 1 16 1 18 1 10 1 12 1 19 2 4 2 7 2 8 2 10 2 1 3 2 3 10 3 9 3 13 3 11 ; run;
Table 3.2, page 37. One way Analysis of Variance
For the between subject design, SAS’s syntax for proc glm and proc
mixed are essentially the same. The inclusion of a within-subject factor the
differences in procedures become more pronounced, and until then, we are going
to stay exclusively with proc glm.
proc glm data = table2_2; class a; model score = a/ ss3; run; quit;
The GLM Procedure
Class Level Information Class Levels Values a 3 1 2 3 Number of observations 15 Dependent Variable: score Sum of Source DF Squares Mean Square F Value Pr > F Model 2 210.0000000 105.0000000 7.00 0.0097 Error 12 180.0000000 15.0000000 Corrected Total 14 390.0000000 R-Square Coeff Var Root MSE score Mean 0.538462 38.72983 3.872983 10.00000 Source DF Type III SS Mean Square F Value Pr > F a 2 210.0000000 105.0000000 7.00 0.0097
Data from Table 3.5, page 51
data table3_5; input a errors; datalines; 1 37 1 22 1 22 1 25 2 36 2 45 2 47 2 23 3 43 3 75 3 66 3 46 4 76 4 66 4 43 4 62 ; run;
Table 3.6, page 53. One-way Analysis of Variance
proc glm data = table3_5; class a; model errors = a/ ss3; run; quit;
The GLM Procedure Class Level Information Class Levels Values a 4 1 2 3 4 Number of observations 16 Dependent Variable: errors Sum of Source DF Squares Mean Square F Value Pr > F Model 3 3314.250000 1104.750000 7.34 0.0047 Error 12 1805.500000 150.458333 Corrected Total 15 5119.750000 R-Square Coeff Var Root MSE errors Mean 0.647346 26.73819 12.26615 45.87500 Source DF Type III SS Mean Square F Value Pr > F a 3 3314.250000 1104.750000 7.34 0.0047
Data from Table 3.6, page 57
data table3_6; input a score; datalines; 1 5 1 9 1 7 2 12 2 10 2 10 2 8 2 11 2 9 3 3 3 6 3 5 3 6 ; run;
Table 3.7, page 57. One-way Analysis of Variance with unequal sample size
proc glm data = table3_6; class a; model score = a/ ss3; run; quit;
The GLM Procedure Class Level Information Class Levels Values a 3 1 2 3
Number of observations 13 Dependent Variable: score Sum of Source DF Squares Mean Square F Value Pr > F Model 2 62.30769231 31.15384615 12.98 0.0017 Error 10 24.00000000 2.40000000 Corrected Total 12 86.30769231 R-Square Coeff Var Root MSE score Mean 0.721925 19.94011 1.549193 7.769231 Source DF Type III SS Mean Square F Value Pr > F a 2 62.30769231 31.15384615 12.98 0.0017