One-Way ANOVA Model #1

Fixed-Effects Model

Rust Inhibitor Example

Note that the contrasts below followed the example in the class notes.

Program Listing

filename ri URL "http://www.stat.lsu.edu/exstweb/statlab/datasets/KNNLData/CH17TA02.txt";
PROC FORMAT;
 INVALUE $brand 1='A'  2='B'  3='C'  4='D';
RUN;

DATA rust;
 INFORMAT brand $brand1.;
 INFILE ri;
 INPUT y brand unit;
RUN;

OPTIONS LS=80 NODATE;
TITLE1 'One-Way ANOVA';
TITLE2 'Rust Inhibitor Data';
PROC GLM DATA=rust;
 CLASS brand;
 TITLE3 'One-Way ANOVA Model';
 * ANOVA Table ;
 MODEL y = brand;
 RUN;

 TITLE3 'Least Square Means, Tukey Method';
 LSMEANS brand/adjust=tukey alpha=.10 CL PDIFF;
 RUN;

 TITLE3 'Pairwise Mean Differences, Fisher LSD Method';
 MEANS brand/lsd alpha=.05 CLDIFF;
 RUN;

 TITLE3 'Contrasts';
 * Estimates of contrasts and t tests ;
 ESTIMATE 'Named Brands vs Generics' brand -.5  .5 .5 -.5;
 ESTIMATE 'A vs D' brand 1 0 0 -1;
 ESTIMATE 'B vs C' brand 0 1 -1 0;
 RUN;

 TITLE3 'Contrasts, Tests Only';
 * Components (of contrasts) and F tests;
 CONTRAST 'Psi 1' brand -.5  .5 .5 -.5;
 CONTRAST 'Psi 2' brand 1 0 0 -1;
 CONTRAST 'Psi 3' brand 0 1 -1 0;
 RUN;

QUIT;

Output Listing

                                 One-Way ANOVA
                              Rust Inhibitor Data
                              One-Way ANOVA Model

                               The GLM Procedure
 
Dependent Variable: y   

                               Sum of
 Source             DF        Squares    Mean Square   F Value   Pr > F
 Model               3    15953.46600     5317.82200    866.12   <.0001
 Error              36      221.03400        6.13983                   
 Corrected Total    39    16174.50000                                  


               R-Square     Coeff Var      Root MSE        y Mean
               0.986334      4.112645      2.477869      60.25000


 Source             DF      Type I SS    Mean Square   F Value   Pr > F
 BRAND               3    15953.46600     5317.82200    866.12   <.0001

 Source             DF    Type III SS    Mean Square   F Value   Pr > F
 BRAND               3    15953.46600     5317.82200    866.12   <.0001


                                 One-Way ANOVA
                              Rust Inhibitor Data
                        Least Square Means, Tukey Method

                               The GLM Procedure
                              Least Squares Means
                   Adjustment for Multiple Comparisons: Tukey

                                                  LSMEAN
                       BRAND        y LSMEAN      Number
                       A          43.1400000           1
                       B          89.4400000           2
                       C          67.9500000           3
                       D          40.4700000           4

                      Least Squares Means for effect BRAND
                      Pr > |t| for H0: LSMean(i)=LSMean(j)
                                        
                             Dependent Variable: y
 
          i/j              1             2             3             4
             1                      <.0001        <.0001        0.0933
             2        <.0001                      <.0001        <.0001
             3        <.0001        <.0001                      <.0001
             4        0.0933        <.0001        <.0001              


               BRAND        y LSMEAN      90% Confidence Limits  
               A           43.140000       41.817099    44.462901
               B           89.440000       88.117099    90.762901
               C           67.950000       66.627099    69.272901
               D           40.470000       39.147099    41.792901


                      Least Squares Means for Effect BRAND
 
                          Difference         Simultaneous 90%
                             Between      Confidence Limits for
              i    j           Means       LSMean(i)-LSMean(j)   
              1    2      -46.300000      -48.933400   -43.666600
              1    3      -24.810000      -27.443400   -22.176600
              1    4        2.670000        0.036600     5.303400
              2    3       21.490000       18.856600    24.123400
              2    4       48.970000       46.336600    51.603400
              3    4       27.480000       24.846600    30.113400


                                 One-Way ANOVA
                              Rust Inhibitor Data
                  Pairwise Mean Differences, Fisher LSD Method

                               The GLM Procedure
 
                              t Tests (LSD) for y

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

                     Alpha                            0.05
                     Error Degrees of Freedom           36
                     Error Mean Square            6.139833
                     Critical Value of t           2.02809
                     Least Significant Difference   2.2474


         Comparisons significant at the 0.05 level are indicated by ***.
 
                             Difference
                 BRAND          Between      95% Confidence
               Comparison         Means          Limits     
                 B - C           21.490      19.243   23.737  ***
                 B - A           46.300      44.053   48.547  ***
                 B - D           48.970      46.723   51.217  ***
                 C - B          -21.490     -23.737  -19.243  ***
                 C - A           24.810      22.563   27.057  ***
                 C - D           27.480      25.233   29.727  ***
                 A - B          -46.300     -48.547  -44.053  ***
                 A - C          -24.810     -27.057  -22.563  ***
                 A - D            2.670       0.423    4.917  ***
                 D - B          -48.970     -51.217  -46.723  ***
                 D - C          -27.480     -29.727  -25.233  ***
                 D - A           -2.670      -4.917   -0.423  ***


                                 One-Way ANOVA
                              Rust Inhibitor Data
                                   Contrasts

                               The GLM Procedure
 
Dependent Variable: y   

                                          Standard
Parameter                    Estimate        Error  t Value   Pr > |t|
Named Brands vs Generics   36.8900000   0.78357089    47.08     <.0001
A vs D                      2.6700000   1.10813657     2.41     0.0212
B vs C                     21.4900000   1.10813657    19.39     <.0001


                                 One-Way ANOVA
                              Rust Inhibitor Data
                             Contrasts, Tests Only

                               The GLM Procedure
 
Dependent Variable: y   

                        (Component)
 Contrast         DF    Contrast SS    Mean Square   F Value   Pr > F
 Psi 1             1    13608.72100    13608.72100   2216.46   <.0001
 Psi 2             1       35.64450       35.64450      5.81   0.0212
 Psi 3             1     2309.10050     2309.10050    376.09   <.0001