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 8

OPTIONS LS=80 NODATE PAGENO=1;
TITLE 'Latin-Square designs, Y603';
DATA ls;
     INPUT wheel car rubber repeat score;
LABEL wheel='the first nuisance variable--a fixed factor'
      car  ='the second nuisance variable--a random factor'
      rubber='the treatment factor--fixed'
      repeat='repetition of the test'
      score ='thickness of tread remaining after 10,000 miles of driving';
CARDS;
1 1 1 1 3
1 1 1 2 1
2 1 2 1 4
2 1 2 2 2
3 1 3 1 7
3 1 3 2 5
4 1 4 1 7
4 1 4 2 10
1 2 2 1 5
1 2 2 2 3
2 2 3 1 8
2 2 3 2 6
3 2 4 1 8
3 2 4 2 10
4 2 1 1 6
4 2 1 2 2
1 3 3 1 7
1 3 3 2 5
2 3 4 1 9
2 3 4 2 9
3 3 1 1 3
3 3 1 2 2
4 3 2 1 4
4 3 2 2 4
1 4 4 1 8
1 4 4 2 11
2 4 1 1 3
2 4 1 2 2
3 4 2 1 3
3 4 2 2 3
4 4 3 1 6
4 4 3 2 6
;
PROC PRINT;
PROC GLM;
     CLASS car wheel rubber;
     MODEL score=car wheel rubber car*wheel*rubber;
TITLE2 'This is the analysis result based on Example 9 in the handout';
PROC GLM;
     CLASS repeat car wheel rubber;
     MODEL score=repeat car wheel rubber repeat*car repeat*wheel repeat*rubber;
TITLE2 'This is the analysis result based on Example 9b in the handout';
RUN;
                            Latin-Square designs, Y603                          1
            
                OBS    WHEEL    CAR    RUBBER    REPEAT    SCORE
            
                  1      1       1        1         1         3
                  2      1       1        1         2         1
                  3      2       1        2         1         4
                  4      2       1        2         2         2
                  5      3       1        3         1         7
                  6      3       1        3         2         5
                  7      4       1        4         1         7
                  8      4       1        4         2        10
                  9      1       2        2         1         5
                 10      1       2        2         2         3
                 11      2       2        3         1         8
                 12      2       2        3         2         6
                 13      3       2        4         1         8
                 14      3       2        4         2        10
                 15      4       2        1         1         6
                 16      4       2        1         2         2
                 17      1       3        3         1         7
                 18      1       3        3         2         5
                 19      2       3        4         1         9
                 20      2       3        4         2         9
                 21      3       3        1         1         3
                 22      3       3        1         2         2
                 23      4       3        2         1         4
                 24      4       3        2         2         4
                 25      1       4        4         1         8
                 26      1       4        4         2        11
                 27      2       4        1         1         3
                 28      2       4        1         2         2
                 29      3       4        2         1         3
                 30      3       4        2         2         3
                 31      4       4        3         1         6
                 32      4       4        3         2         6
                           Latin-Square designs, Y603                          2
         This is the analysis result based on Example 9 in the handout
            
                        General Linear Models Procedure
                            Class Level Information
            
                           Class    Levels    Values
            
                           CAR           4    1 2 3 4
            
                           WHEEL         4    1 2 3 4
            
                           RUBBER        4    1 2 3 4
            
            
                    Number of observations in data set = 32
            
                           Latin-Square designs, Y603                          3
         This is the analysis result based on Example 9 in the handout
            
                        General Linear Models Procedure
            
Dependent Variable: SCORE   thickness of tread remaining after 10,00
                                     Sum of            Mean
Source                  DF          Squares          Square   F Value     Pr > F
            
Model                   15     203.50000000     13.56666667      6.78     0.0002
            
Error                   16      32.00000000      2.00000000
            
Corrected Total         31     235.50000000
            
                  R-Square             C.V.        Root MSE           SCORE Mean
            
                  0.864119         26.31095       1.4142136            5.3750000
            
            
 Source                  DF        Type I SS     Mean Square   F Value     Pr > F
            
CAR                      3       5.25000000      1.75000000      0.88     0.4746
WHEEL                    3       1.00000000      0.33333333      0.17     0.9173
RUBBER                   3     194.50000000     64.83333333     32.42     0.0001
CAR*WHEEL*RUBBER         6       2.75000000      0.45833333      0.23     0.9610
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
CAR                      3       5.25000000      1.75000000      0.88     0.4746
WHEEL                    3       1.00000000      0.33333333      0.17     0.9173
RUBBER                   3     194.50000000     64.83333333     32.42     0.0001
CAR*WHEEL*RUBBER         6       2.75000000      0.45833333      0.23     0.9610
            
            
            
                           Latin-Square designs, Y603                          4
         This is the analysis result based on Example 9b in the handout
            
                        General Linear Models Procedure
                            Class Level Information
            
                           Class    Levels    Values
            
                           REPEAT        2    1 2
            
                           CAR           4    1 2 3 4
            
                           WHEEL         4    1 2 3 4
            
                           RUBBER        4    1 2 3 4
            
            
                    Number of observations in data set = 32
            
            
                           Latin-Square designs, Y603                          5
         This is the analysis result based on Example 9b in the handout
            
                        General Linear Models Procedure
            
Dependent Variable: SCORE   thickness of tread remaining after 10,00
                                     Sum of            Mean
Source                  DF          Squares          Square   F Value     Pr > F
            
Model                   19     228.75000000     12.03947368     21.40     0.0001
            
Error                   12       6.75000000      0.56250000
            
Corrected Total         31     235.50000000
            
                  R-Square             C.V.        Root MSE           SCORE Mean
            
                  0.971338         13.95349       0.7500000            5.3750000
            
 Source                  DF        Type I SS     Mean Square   F Value     Pr > F
            
REPEAT                   1       3.12500000      3.12500000      5.56     0.0362
CAR                      3       5.25000000      1.75000000      3.11     0.0667
WHEEL                    3       1.00000000      0.33333333      0.59     0.6317
RUBBER                   3     194.50000000     64.83333333    115.26     0.0001
REPEAT*CAR               3       4.12500000      1.37500000      2.44     0.1144
REPEAT*WHEEL             3       1.37500000      0.45833333      0.81     0.5100
REPEAT*RUBBER            3      19.37500000      6.45833333     11.48     0.0008
            
Source                  DF      Type III SS     Mean Square   F Value     Pr > F
            
REPEAT                   1       3.12500000      3.12500000      5.56     0.0362
CAR                      3       5.25000000      1.75000000      3.11     0.0667
WHEEL                    3       1.00000000      0.33333333      0.59     0.6317
RUBBER                   3     194.50000000     64.83333333    115.26     0.0001
REPEAT*CAR               3       4.12500000      1.37500000      2.44     0.1144
REPEAT*WHEEL             3       1.37500000      0.45833333      0.81     0.5100
REPEAT*RUBBER            3      19.37500000      6.45833333     11.48     0.0008
            



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