2          *****************************************************************;
3          *** Example of unbalanced CRD with experimental error         ***;
4          *** From Snedecor & Cochran, 1967 (pg 278)                    ***;
5          *****************************************************************;
6          OPTIONS PS=256 LS=132 NOCENTER NODATE PAGENO=1 NONUMBER;
7          dm 'log;clear;output;clear';
8          DATA MICE onebyone; INFILE CARDS MISSOVER;
9             INPUT STRAIN $ 1-4 DAYS NUMBER;
10             TITLE1 'EXST7015: DAYS TO DEATH FOR MICE INOCULATED WITH 3 TYPHOID STRAINS';
11             TITLE2 'UNEQUAL NUMBER OF MICE IN EACH TREATMENT';
12            do i = 1 to number by 1;  output onebyone; end;
13            output mice;
14         CARDS;
NOTE: The data set WORK.MICE has 31 observations and 4 variables.
NOTE: The data set WORK.ONEBYONE has 224 observations and 4 variables.
NOTE: DATA statement used:
      real time           0.08 seconds
      cpu time            0.08 seconds
14       !        RUN;
46         ;
47         PROC MIXED DATA=OnebyOne cl covtest; CLASSES STRAIN;
48           TITLE3 'ANALYSIS OF VARIANCE with PROC MIXED';
49           MODEL DAYS = STRAIN / htype=3 DDFM=Satterthwaite;
50           repeated / group=strain;
51              LSMEANS STRAIN / ADJUST=TUKEY pdiff;
52              LSMEANS STRAIN / ADJUST=SCHEFFE pdiff;
53              LSMEANS STRAIN / ADJUST=BON pdiff;
54         *NOTE that normally only one post-ANOVA examination would be
55               done.  We have done several here for comparison.  ;
56         RUN;
NOTE: Convergence criteria met.
NOTE: The PROCEDURE MIXED printed page 1.
NOTE: PROCEDURE MIXED used:
      real time           0.11 seconds
      cpu time            0.11 seconds
 
 
EXST7015: DAYS TO DEATH FOR MICE INOCULATED WITH 3 TYPHOID STRAINS
UNEQUAL NUMBER OF MICE IN EACH TREATMENT
ANALYSIS OF VARIANCE with PROC MIXED
 
The Mixed Procedure
 
                  Model Information
Data Set                     WORK.ONEBYONE
Dependent Variable           DAYS
Covariance Structure         Variance Components
Group Effect                 STRAIN
Estimation Method            REML
Residual Variance Method     None
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
             Class Level Information
Class     Levels    Values
STRAIN         3    11C 9D DSC1
 


            Dimensions
Covariance Parameters             3
Columns in X                      4
Columns in Z                      0
Subjects                        224
Max Obs Per Subject               1
Observations Used               224
Observations Not Used             0
Total Observations              224
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1      1027.49256195
        1              1      1012.92789611      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                                   Standard       Z
Cov Parm   Group         Estimate     Error   Value      Pr Z   Alpha     Lower     Upper
Residual   STRAIN 11C      5.8633    1.0795    5.43    <.0001    0.05    4.2127    8.7221
Residual   STRAIN 9D       1.8989    0.4903    3.87    <.0001    0.05    1.2126    3.3928
Residual   STRAIN DSC1     6.6327    0.8164    8.12    <.0001    0.05    5.2839    8.5761
 
           Fit Statistics
-2 Res Log Likelihood          1012.9
AIC (smaller is better)        1018.9
AICC (smaller is better)       1019.0
BIC (smaller is better)        1029.2
 
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     2         14.56          0.0007
 
        Type 3 Tests of Fixed Effects
              Num     Den
Effect         DF      DF    F Value    Pr > F
STRAIN          2     114      70.10    <.0001
 
                          Least Squares Means
                                Standard
Effect    STRAIN    Estimate       Error      DF    t Value    Pr > |t|
STRAIN    11C         7.3667      0.3126      59      23.57      <.0001
STRAIN    9D          4.0323      0.2475      30      16.29      <.0001
STRAIN    DSC1        7.7970      0.2233     132      34.91      <.0001
STRAIN    11C         7.3667      0.3126      59      23.57      <.0001
STRAIN    9D          4.0323      0.2475      30      16.29      <.0001
STRAIN    DSC1        7.7970      0.2233     132      34.91      <.0001
STRAIN    11C         7.3667      0.3126      59      23.57      <.0001
STRAIN    9D          4.0323      0.2475      30      16.29      <.0001
STRAIN    DSC1        7.7970      0.2233     132      34.91      <.0001
 
                                     Differences of Least Squares Means
                                           Standard
Effect    STRAIN    _STRAIN    Estimate       Error      DF    t Value    Pr > |t|    Adjustment       Adj P
STRAIN    11C       9D           3.3344      0.3987    88.1       8.36      <.0001    Tukey-Kramer    <.0001
STRAIN    11C       DSC1        -0.4303      0.3842     121      -1.12      0.2649    Tukey-Kramer    0.5037
STRAIN    9D        DSC1        -3.7647      0.3334    85.8     -11.29      <.0001    Tukey-Kramer    <.0001
 
STRAIN    11C       9D           3.3344      0.3987    88.1       8.36      <.0001    Scheffe         <.0001
STRAIN    11C       DSC1        -0.4303      0.3842     121      -1.12      0.2649    Scheffe         0.5358
STRAIN    9D        DSC1        -3.7647      0.3334    85.8     -11.29      <.0001    Scheffe         <.0001
 
STRAIN    11C       9D           3.3344      0.3987    88.1       8.36      <.0001    Bonferroni      <.0001
STRAIN    11C       DSC1        -0.4303      0.3842     121      -1.12      0.2649    Bonferroni      0.7950
STRAIN    9D        DSC1        -3.7647      0.3334    85.8     -11.29      <.0001    Bonferroni      <.0001
 


57         PROC GLM DATA=MICE; CLASSES STRAIN; FREQ NUMBER;
58           TITLE3 'ANALYSIS OF VARIANCE with PROC GLM';
59           MODEL DAYS = STRAIN;
60                MEANS STRAIN / LSD TUKEY SCHEFFE BON;
61         run;
NOTE: PROCEDURE GLM used:
      real time           0.09 seconds
      cpu time            0.09 seconds
 
 
EXST7015: DAYS TO DEATH FOR MICE INOCULATED WITH 3 TYPHOID STRAINS
UNEQUAL NUMBER OF MICE IN EACH TREATMENT
ANALYSIS OF VARIANCE with PROC GLM
 
The GLM Procedure
      Class Level Information
Class         Levels    Values
STRAIN             3    11C 9D DSC1
Number of observations    224
 
Dependent Variable: DAYS
Frequency: NUMBER
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                        2      359.794413      179.897207      31.10    <.0001
Error                      221     1278.419872        5.784705
Corrected Total            223     1638.214286
 
R-Square     Coeff Var      Root MSE     DAYS Mean
0.219626      33.58801      2.405141      7.160714
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
STRAIN                       2     359.7944135     179.8972067      31.10    <.0001
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
STRAIN                       2     359.7944135     179.8972067      31.10    <.0001
 
t Tests (LSD) for DAYS
NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate.
Alpha                        0.05
Error Degrees of Freedom      221
Error Mean Square        5.784705
Critical Value of t       1.97076
Comparisons significant at the 0.05 level are indicated by ***.
 
               Difference
  STRAIN          Between      95% Confidence
Comparison          Means          Limits
DSC1 - 11C         0.4303     -0.3068   1.1675
DSC1 - 9D          3.7647      2.8194   4.7101  ***
11C  - DSC1       -0.4303     -1.1675   0.3068
11C  - 9D          3.3344      2.2860   4.3828  ***
9D   - DSC1       -3.7647     -4.7101  -2.8194  ***
9D   - 11C        -3.3344     -4.3828  -2.2860  ***


EXST7015: DAYS TO DEATH FOR MICE INOCULATED WITH 3 TYPHOID STRAINS
UNEQUAL NUMBER OF MICE IN EACH TREATMENT
ANALYSIS OF VARIANCE with PROC GLM
 
The GLM Procedure
Tukey's Studentized Range (HSD) Test for DAYS
NOTE: This test controls the Type I experimentwise error rate.
Alpha                                   0.05
Error Degrees of Freedom                 221
Error Mean Square                   5.784705
Critical Value of Studentized Range  3.33708
Comparisons significant at the 0.05 level are indicated by ***.
               Difference
  STRAIN          Between     Simultaneous 95%
Comparison          Means    Confidence Limits
DSC1 - 11C         0.4303     -0.4523   1.3129
DSC1 - 9D          3.7647      2.6328   4.8966  ***
11C  - DSC1       -0.4303     -1.3129   0.4523
11C  - 9D          3.3344      2.0791   4.5897  ***
9D   - DSC1       -3.7647     -4.8966  -2.6328  ***
9D   - 11C        -3.3344     -4.5897  -2.0791  ***
 
Bonferroni (Dunn) t Tests for DAYS
NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey's for
all pairwise comparisons.
Alpha                        0.05
Error Degrees of Freedom      221
Error Mean Square        5.784705
Critical Value of t       2.41234
Comparisons significant at the 0.05 level are indicated by ***.
               Difference
  STRAIN          Between     Simultaneous 95%
Comparison          Means    Confidence Limits
DSC1 - 11C         0.4303     -0.4720   1.3326
DSC1 - 9D          3.7647      2.6076   4.9219  ***
11C  - DSC1       -0.4303     -1.3326   0.4720
11C  - 9D          3.3344      2.0511   4.6178  ***
9D   - DSC1       -3.7647     -4.9219  -2.6076  ***
9D   - 11C        -3.3344     -4.6178  -2.0511  ***
 
Scheffe's Test for DAYS
NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey's for
all pairwise comparisons.
Alpha                        0.05
Error Degrees of Freedom      221
Error Mean Square        5.784705
Critical Value of F       3.03671
Comparisons significant at the 0.05 level are indicated by ***.
               Difference
  STRAIN          Between     Simultaneous 95%
Comparison          Means    Confidence Limits
DSC1 - 11C         0.4303     -0.4915   1.3521
DSC1 - 9D          3.7647      2.5826   4.9469  ***
11C  - DSC1       -0.4303     -1.3521   0.4915
11C  - 9D          3.3344      2.0234   4.6455  ***
9D   - DSC1       -3.7647     -4.9469  -2.5826  ***
9D   - 11C        -3.3344     -4.6455  -2.0234  ***
 


Modified: August 16, 2004
James P. Geaghan