Skip to Main Content

Design and Analysis, Fourth Edition, by Keppel and WickensChapter 6: Simultaneous Comparisons | SAS Textbook Examples

Data from Chapter 6, Table 6.1, page 121

data table6_1;
input a score;
datalines;
1 16
1 11
1 22
1 8
1 15
1 6
1 16
1 15
1 12
1 11
2 10
2 5
2 8
2 12
2 0
2 16
2 8
2 12
2 10
2 6
3 9
3 3 
3 4
3 8
3 8
3 6
3 13
3 5
3 9
3 7
4 9
4 12
4 12
4 4
4 5
4 10
4 7
4 12
4 9
4 8
5 11
5 9
5 10
5 13
5 13
5 12
5 11
5 18
5 14
5 12
;
run;

Pairwise Comparison (Tukey HSD, SNK) and Post-Hoc Error Correction (Scheffe)
: Section 6.4-6.5, page 120-130

proc glm data = table6_1;
class a;
model score = a/ ss3;
means a /tukey snk scheffe;
run; quit;
The GLM Procedure
     Class Level Information
Class         Levels    Values
a                  5    1 2 3 4 5

Number of observations    50
Dependent Variable: score
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                        4     264.9200000      66.2300000       5.22    0.0015
Error                       45     571.0000000      12.6888889
Corrected Total             49     835.9200000

R-Square     Coeff Var      Root MSE    score Mean
0.316920      35.47955      3.562147      10.04000

Source                      DF     Type III SS     Mean Square    F Value    Pr > F
a                            4     264.9200000      66.2300000       5.22    0.0015

Student-Newman-Keuls Test for score

NOTE: This test controls the Type I experimentwise error rate under the complete null 
hypothesis but not under partial null hypotheses.

Alpha                        0.05
Error Degrees of Freedom       45
Error Mean Square        12.68889
Number of Means              2              3              4              5
Critical Range       3.2086011      3.8609173      4.2497535      4.5265481
Means with the same letter are not significantly different.
 SNK
Grouping        Mean      N    a

     A        13.200     10    1
     A
B    A        12.300     10    5
B
B    C         8.800     10    4
B    C
B    C         8.700     10    2
     C
     C         7.200     10    3

Tukey's Studentized Range (HSD) Test for score

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                  45
Error Mean Square                   12.68889
Critical Value of Studentized Range  4.01842
Minimum Significant Difference        4.5265

Means with the same letter are not significantly different.

Tukey
Grouping        Mean      N    a
     A        13.200     10    1
     A
     A        12.300     10    5
     A
B    A         8.800     10    4
B    A
B    A         8.700     10    2
B
B              7.200     10    3

Scheffe's Test for score

NOTE: This test controls the Type I experimentwise error rate.

Alpha                              0.05
Error Degrees of Freedom             45
Error Mean Square              12.68889
Critical Value of F             2.57874
Minimum Significant Difference   5.1164

Means with the same letter are not significantly different.

Scheffe
Grouping        Mean      N    a
     A        13.200     10    1
     A
B    A        12.300     10    5
B    A
B    A         8.800     10    4
B    A
B    A         8.700     10    2
B
B              7.200     10    3