Practice

Computer Programs

SAS headstart
SAS procedures
Program 1
Program 2
Program 3
Program 4
Program 5
Program 6
Program 7
Program 8
Program 9
Program 10
Program 11
Program 12
Program 13
Program 14

Topical Bibliographies (Readings)

Datasets and Stories

Software Help  


Search for 

Program 11

TITLE 'Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions';
OPTIONS LS=80 NODATE PAGENO=1;
DATA SPF22_4;
        INPUT  A  C  B  S  score;
CARDS;
1  1  1  1  3
1  1  1  2  6
1  2  1  3  3
1  2  1  4  3
2  1  1  5  1
2  1  1  6  2
2  2  1  7  2
2  2  1  8  2
1  1  2  1  4
1  1  2  2  5
1  2  2  3  4
1  2  2  4  3
2  1  2  5  2
2  1  2  6  3
2  2  2  7  4
2  2  2  8  3
1  1  3  1  7
1  1  3  2  8
1  2  3  3  7
1  2  3  4  6
2  1  3  5  5
2  1  3  6  6
2  2  3  7  5
2  2  3  8  6
1  1  4  1  7
1  1  4  2  8
1  2  4  3  9
1  2  4  4  8
2  1  4  5  10
2  1  4  6  10
2  2  4  7  9
2  2  4  8  11
;
PROC PRINT;
*This analysis lists all the terms in the model statement*;
            
PROC GLM  DATA=SPF22_4;
        CLASS  A  C  B  S;
        MODEL  score=A  C  A*C  S(A C)  B  A*B  B*C  A*B*C  B*S(A C);
            
        TEST  H=A  C  A*C  E=S(A C);
        TEST  H=B  A*B  B*C  A*B*C  E=B*S(A C);
            
        MEANS  A  C  A*C           /E=S(A C)  BON;
        MEANS  B  A*B  B*C  A*B*C  /E=B*S(A C)  BON;
RUN;
            
*This analysis leaves out the last error term from the model statement*;
            
PROC GLM  DATA=SPF22_4;
        CLASS  A  C  B  S;
        MODEL  score=A  C  A*C  S(A C)  B  A*B  B*C  A*B*C;
            
        TEST  H=A  C  A*C  E=S(A C);
            
        MEANS  A  C  A*C  /E=S(A C)  BON;
        MEANS  B  A*B  B*C  A*B*C  / BON;
RUN;
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         1
            
                        OBS    A    C    B    S    SCORE
            
                          1    1    1    1    1       3
                          2    1    1    1    2       6
                          3    1    2    1    3       3
                          4    1    2    1    4       3
                          5    2    1    1    5       1
                          6    2    1    1    6       2
                          7    2    2    1    7       2
                          8    2    2    1    8       2
                          9    1    1    2    1       4
                         10    1    1    2    2       5
                         11    1    2    2    3       4
                         12    1    2    2    4       3
                         13    2    1    2    5       2
                         14    2    1    2    6       3
                         15    2    2    2    7       4
                         16    2    2    2    8       3
                         17    1    1    3    1       7
                         18    1    1    3    2       8
                         19    1    2    3    3       7
                         20    1    2    3    4       6
                         21    2    1    3    5       5
                         22    2    1    3    6       6
                         23    2    2    3    7       5
                         24    2    2    3    8       6
                         25    1    1    4    1       7
                         26    1    1    4    2       8
                         27    1    2    4    3       9
                         28    1    2    4    4       8
                         29    2    1    4    5      10
                         30    2    1    4    6      10
                         31    2    2    4    7       9
                         32    2    2    4    8      11
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         2
            
                        General Linear Models Procedure
                            Class Level Information
            
                       Class    Levels    Values
            
                       A             2    1 2
            
                       C             2    1 2
            
                       B             4    1 2 3 4
            
                       S             8    1 2 3 4 5 6 7 8
            
                    Number of observations in data set = 32
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         3
            
                        General Linear Models Procedure
            
Dependent Variable: SCORE
                                     Sum of            Mean
Source                  DF          Squares          Square   F Value     Pr > F
            
Model                   31     235.50000000      7.59677419       .        .
            
Error                    0        .               .
            
Corrected Total         31     235.50000000
            
                  R-Square             C.V.        Root MSE           SCORE Mean
            
                  1.000000                0               0            5.3750000
            
            
Source                  DF        Type I SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000       .        .
C                        1       0.12500000      0.12500000       .        .
A*C                      1       2.00000000      2.00000000       .        .
S(A*C)                   4       7.25000000      1.81250000       .        .
B                        3     194.50000000     64.83333333       .        .
A*B                      3      19.37500000      6.45833333       .        .
C*B                      3       1.37500000      0.45833333       .        .
A*C*B                    3       3.00000000      1.00000000       .        .
B*S(A*C)                12       4.75000000      0.39583333       .        .
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000       .        .
C                        1       0.12500000      0.12500000       .        .
A*C                      1       2.00000000      2.00000000       .        .
S(A*C)                   4       7.25000000      1.81250000       .        .
B                        3     194.50000000     64.83333333       .        .
A*B                      3      19.37500000      6.45833333       .        .
C*B                      3       1.37500000      0.45833333       .        .
A*C*B                    3       3.00000000      1.00000000       .        .
B*S(A*C)                12       4.75000000      0.39583333       .        .
            
Tests of Hypotheses using the Type III MS for S(A*C) as an error term
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000      1.72     0.2594
C                        1       0.12500000      0.12500000      0.07     0.8058
A*C                      1       2.00000000      2.00000000      1.10     0.3528
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         4
            
                        General Linear Models Procedure
            
Dependent Variable: SCORE
            
Tests of Hypotheses using the Type III MS for B*S(A*C) as an error term
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
B                        3     194.50000000     64.83333333    163.79     0.0001
A*B                      3      19.37500000      6.45833333     16.32     0.0002
C*B                      3       1.37500000      0.45833333      1.16     0.3660
A*C*B                    3       3.00000000      1.00000000      2.53     0.1068
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         5
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                        Alpha= 0.05  df= 4  MSE= 1.8125
                           Critical Value of T= 2.78
                     Minimum Significant Difference= 1.3215
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  A
            
                               A            5.6875     16  1
                               A
                               A            5.0625     16  2
            
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         6
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                        Alpha= 0.05  df= 4  MSE= 1.8125
                           Critical Value of T= 2.78
                     Minimum Significant Difference= 1.3215
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  C
            
                               A            5.4375     16  1
                               A
                               A            5.3125     16  2
            
            Level of   Level of       ------------SCORE------------
            A          C          N       Mean              SD
            
            1          1          8     6.00000000       1.85164020
            1          2          8     5.37500000       2.44584195
            2          1          8     4.87500000       3.56320482
            2          2          8     5.25000000       3.28416112
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         7
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                       Alpha= 0.05  df= 12  MSE= 0.395833
                           Critical Value of T= 3.15
                     Minimum Significant Difference= 0.9918
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  B
            
                               A            9.0000      8  4
            
                               B            6.2500      8  3
            
                               C            3.5000      8  2
                               C
                               C            2.7500      8  1
            
            
            Level of   Level of       ------------SCORE------------
            A          B          N       Mean              SD
            
            1          1          4     3.75000000       1.50000000
            1          2          4     4.00000000       0.81649658
            1          3          4     7.00000000       0.81649658
            1          4          4     8.00000000       0.81649658
            2          1          4     1.75000000       0.50000000
            2          2          4     3.00000000       0.81649658
            2          3          4     5.50000000       0.57735027
            2          4          4    10.00000000       0.81649658
            
            Level of   Level of       ------------SCORE------------
            C          B          N       Mean              SD
            
            1          1          4     3.00000000       2.16024690
            1          2          4     3.50000000       1.29099445
            1          3          4     6.50000000       1.29099445
            1          4          4     8.75000000       1.50000000
            2          1          4     2.50000000       0.57735027
            2          2          4     3.50000000       0.57735027
            2          3          4     6.00000000       0.81649658
            2          4          4     9.25000000       1.25830574
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         8
            
                        General Linear Models Procedure
            
       Level of   Level of   Level of       ------------SCORE------------
       A          C          B          N       Mean              SD
            
       1          1          1          2     4.50000000       2.12132034
       1          1          2          2     4.50000000       0.70710678
       1          1          3          2     7.50000000       0.70710678
       1          1          4          2     7.50000000       0.70710678
       1          2          1          2     3.00000000       0.00000000
       1          2          2          2     3.50000000       0.70710678
       1          2          3          2     6.50000000       0.70710678
       1          2          4          2     8.50000000       0.70710678
       2          1          1          2     1.50000000       0.70710678
       2          1          2          2     2.50000000       0.70710678
       2          1          3          2     5.50000000       0.70710678
       2          1          4          2    10.00000000       0.00000000
       2          2          1          2     2.00000000       0.00000000
       2          2          2          2     3.50000000       0.70710678
       2          2          3          2     5.50000000       0.70710678
       2          2          4          2    10.00000000       1.41421356
            
            
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions         9
            
                        General Linear Models Procedure
                            Class Level Information
            
                       Class    Levels    Values
            
                       A             2    1 2
            
                       C             2    1 2
            
                       B             4    1 2 3 4
            
                       S             8    1 2 3 4 5 6 7 8
            
            
                    Number of observations in data set = 32
            
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions        10
            
                        General Linear Models Procedure
            
Dependent Variable: SCORE
                                     Sum of            Mean
Source                  DF          Squares          Square   F Value     Pr > F
            
Model                   19     230.75000000     12.14473684     30.68     0.0001
            
Error                   12       4.75000000      0.39583333
            
Corrected Total         31     235.50000000
            
                  R-Square             C.V.        Root MSE           SCORE Mean
            
                  0.979830         11.70517       0.6291529            5.3750000
            
            
Source                  DF        Type I SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000      7.89     0.0158
C                        1       0.12500000      0.12500000      0.32     0.5845
A*C                      1       2.00000000      2.00000000      5.05     0.0442
S(A*C)                   4       7.25000000      1.81250000      4.58     0.0178
B                        3     194.50000000     64.83333333    163.79     0.0001
A*B                      3      19.37500000      6.45833333     16.32     0.0002
C*B                      3       1.37500000      0.45833333      1.16     0.3660
A*C*B                    3       3.00000000      1.00000000      2.53     0.1068
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000      7.89     0.0158
C                        1       0.12500000      0.12500000      0.32     0.5845
A*C                      1       2.00000000      2.00000000      5.05     0.0442
S(A*C)                   4       7.25000000      1.81250000      4.58     0.0178
B                        3     194.50000000     64.83333333    163.79     0.0001
A*B                      3      19.37500000      6.45833333     16.32     0.0002
C*B                      3       1.37500000      0.45833333      1.16     0.3660
A*C*B                    3       3.00000000      1.00000000      2.53     0.1068
            
Tests of Hypotheses using the Type III MS for S(A*C) as an error term
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
A                        1       3.12500000      3.12500000      1.72     0.2594
C                        1       0.12500000      0.12500000      0.07     0.8058
A*C                      1       2.00000000      2.00000000      1.10     0.3528
            
 
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions        11
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                        Alpha= 0.05  df= 4  MSE= 1.8125
                           Critical Value of T= 2.78
                     Minimum Significant Difference= 1.3215
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  A
            
                               A            5.6875     16  1
                               A
                               A            5.0625     16  2
            
            
            
          Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions        12
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                        Alpha= 0.05  df= 4  MSE= 1.8125
                           Critical Value of T= 2.78
                     Minimum Significant Difference= 1.3215
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  C
            
                               A            5.4375     16  1
                               A
                               A            5.3125     16  2
            
            
            
            
            Level of   Level of       ------------SCORE------------
            A          C          N       Mean              SD
            
            1          1          8     6.00000000       1.85164020
            1          2          8     5.37500000       2.44584195
            2          1          8     4.87500000       3.56320482
            2          2          8     5.25000000       3.28416112
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions        13
            
                        General Linear Models Procedure
            
                 Bonferroni (Dunn) T tests for variable: SCORE
            
          NOTE: This test controls the type I experimentwise error rate, but
                generally has a higher type II error rate than REGWQ.
            
                       Alpha= 0.05  df= 12  MSE= 0.395833
                           Critical Value of T= 3.15
                     Minimum Significant Difference= 0.9918
            
          Means with the same letter are not significantly different.
            
                    Bon Grouping              Mean      N  B
            
                               A            9.0000      8  4
            
                               B            6.2500      8  3
            
                               C            3.5000      8  2
                               C
                               C            2.7500      8  1
            
            
            
            
            Level of   Level of       ------------SCORE------------
            A          B          N       Mean              SD
            
            1          1          4     3.75000000       1.50000000
            1          2          4     4.00000000       0.81649658
            1          3          4     7.00000000       0.81649658
            1          4          4     8.00000000       0.81649658
            2          1          4     1.75000000       0.50000000
            2          2          4     3.00000000       0.81649658
            2          3          4     5.50000000       0.57735027
            2          4          4    10.00000000       0.81649658
            
            Level of   Level of       ------------SCORE------------
            C          B          N       Mean              SD
            
            1          1          4     3.00000000       2.16024690
            1          2          4     3.50000000       1.29099445
            1          3          4     6.50000000       1.29099445
            1          4          4     8.75000000       1.50000000
            2          1          4     2.50000000       0.57735027
            2          2          4     3.50000000       0.57735027
            2          3          4     6.00000000       0.81649658
            2          4          4     9.25000000       1.25830574
            
           Table 12.8-1, p.542 Kirk, SPF-22.4 -- Univariate, 2 versions        14
            
                        General Linear Models Procedure
            
       Level of   Level of   Level of       ------------SCORE------------
       A          C          B          N       Mean              SD
            
       1          1          1          2     4.50000000       2.12132034
       1          1          2          2     4.50000000       0.70710678
       1          1          3          2     7.50000000       0.70710678
       1          1          4          2     7.50000000       0.70710678
       1          2          1          2     3.00000000       0.00000000
       1          2          2          2     3.50000000       0.70710678
       1          2          3          2     6.50000000       0.70710678
       1          2          4          2     8.50000000       0.70710678
       2          1          1          2     1.50000000       0.70710678
       2          1          2          2     2.50000000       0.70710678
       2          1          3          2     5.50000000       0.70710678
       2          1          4          2    10.00000000       0.00000000
       2          2          1          2     2.00000000       0.00000000
       2          2          2          2     3.50000000       0.70710678
       2          2          3          2     5.50000000       0.70710678
       2          2          4          2    10.00000000       1.41421356
            



Comments: peng@indiana.edu
Dr. Peng's Home Page: Dr. Chao-Ying Joanne Peng
Copyright 1999, The Trustees of Indiana University