1          *******************************************************;
2          *** Example of CRD with 2 levels of error           ***;
3          *** From Snedecor & Cochran, 1980 (pg 248)          ***;
4          *******************************************************;
5          OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
6          DATA CALCIUM; INFILE CARDS MISSOVER;
7             INPUT PLANT LEAF SAMPLE CALCIUM;
8                TITLE1 'CALCIUM CONCENTRATION IN TURNIP LEAVES';
9                TITLE2 '4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF';
10         CARDS;
NOTE: The data set WORK.CALCIUM has 24 observations and 4 variables.
NOTE: DATA statement used:
      real time           0.06 seconds
      cpu time            0.06 seconds
10       !        RUN;
35         ;
36         PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN;
NOTE: There were 24 observations read from the data set WORK.CALCIUM.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
      real time           0.03 seconds
      cpu time            0.02 seconds
 
CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
RAW DATA LISTING
 
Obs    PLANT    LEAF    SAMPLE    CALCIUM
  1      1        1        1        3.28
  2      1        1        2        3.09
  3      1        2        1        3.52
  4      1        2        2        3.48
  5      1        3        1        2.88
  6      1        3        2        2.80
  7      2        1        1        2.46
  8      2        1        2        2.44
  9      2        2        1        1.87
 10      2        2        2        1.92
 11      2        3        1        2.19
 12      2        3        2        2.19
 13      3        1        1        2.77
 14      3        1        2        2.66
 15      3        2        1        3.74
 16      3        2        2        3.44
 17      3        3        1        2.55
 18      3        3        2        2.55
 19      4        1        1        3.78
 20      4        1        2        3.87
 21      4        2        1        4.07
 22      4        2        2        4.12
 23      4        3        1        3.31
 24      4        3        2        3.31
 
37         PROC MIXED DATA=CALCIUM cl covtest; CLASSES PLANT LEAF SAMPLE;
38           TITLE3 'Analysis OF Variance with PROC MIXED - Nested Error';
39           MODEL CALCIUM = / htype=1 DDFM=Satterthwaite outp=ResidDataP;
40             RANDOM PLANT LEAF(PLANT);
41         RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 24 observations and 11 variables.
NOTE: The PROCEDURE MIXED printed page 2.
NOTE: PROCEDURE MIXED used:
      real time           0.16 seconds
      cpu time            0.16 seconds
41       !      QUIT;


CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
Analysis OF Variance with PROC MIXED - Nested Error
 
The Mixed Procedure
                  Model Information
Data Set                     WORK.CALCIUM
Dependent Variable           CALCIUM
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
             Class Level Information
Class     Levels    Values
PLANT          4    1 2 3 4
LEAF           3    1 2 3
SAMPLE         2    1 2
 
            Dimensions
Covariance Parameters             3
Columns in X                      1
Columns in Z                     16
Subjects                          1
Max Obs Per Subject              24
Observations Used                24
Observations Not Used             0
Total Observations               24
 
Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1        49.90596741
        1              1         2.17294242      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                            Standard         Z
Cov Parm        Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
PLANT             0.3652      0.3440      1.06      0.1442      0.05      0.1042     10.1188
LEAF(PLANT)       0.1611     0.08220      1.96      0.0250      0.05     0.07253      0.6127
Residual        0.006654    0.002717      2.45      0.0072      0.05    0.003422     0.01813
 
           Fit Statistics
-2 Res Log Likelihood             2.2
AIC (smaller is better)           8.2
AICC (smaller is better)          9.4
BIC (smaller is better)           6.3
 
 
42         PROC MIXED DATA=CALCIUM cl covtest method=type1;
43           CLASSES PLANT LEAF SAMPLE;
44           TITLE3 'Analysis OF Variance with Type I SS - Nested Error';
45           MODEL CALCIUM = / htype=1 DDFM=Satterthwaite outp=ResidDataP;
46             RANDOM PLANT LEAF(PLANT);
47         RUN;
NOTE: The data set WORK.RESIDDATAP has 24 observations and 11 variables.
NOTE: The PROCEDURE MIXED printed page 3.
NOTE: PROCEDURE MIXED used:
      real time           0.15 seconds
      cpu time            0.15 seconds
47       !      QUIT;
CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
Analysis OF Variance with Type I SS - Nested Error
The Mixed Procedure
                  Model Information
Data Set                     WORK.CALCIUM
Dependent Variable           CALCIUM
Covariance Structure         Variance Components
Estimation Method            Type 1
Residual Variance Method     Factor
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
             Class Level Information
Class     Levels    Values
PLANT          4    1 2 3 4
LEAF           3    1 2 3
SAMPLE         2    1 2
 
Dimensions
Covariance Parameters             3
Columns in X                      1
Columns in Z                     16
Subjects                          1
Max Obs Per Subject              24
Observations Used                24
Observations Not Used             0
Total Observations               24
 
Type 1 Analysis of Variance
                     Sum of                                                                      Error
Source        DF    Squares   Mean Square  Expected Mean Square                 Error Term          DF
PLANT          3   7.560346      2.520115  Var(Residual) + 2 Var(LEAF(PLANT))   MS(LEAF(PLANT))      8
                                           + 6 Var(PLANT)
LEAF(PLANT)    8   2.630200      0.328775  Var(Residual) + 2 Var(LEAF(PLANT))   MS(Residual)        12
Residual      12   0.079850      0.006654  Var(Residual)                        .                    .
 
Type 1 Analysis of Variance
Source       F Value    Pr > F
PLANT           7.67    0.0097
LEAF(PLANT)    49.41    <.0001
Residual         .       .
 
Covariance Parameter Estimates
                            Standard         Z
Cov Parm        Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
PLANT             0.3652      0.3440      1.06      0.2884      0.05     -0.3091      1.0395
LEAF(PLANT)       0.1611     0.08220      1.96      0.0501      0.05    -0.00006      0.3222
Residual        0.006654    0.002717      2.45      0.0072      0.05    0.003422     0.01813
 
           Fit Statistics
-2 Res Log Likelihood             2.2
AIC (smaller is better)           8.2
AICC (smaller is better)          9.4
BIC (smaller is better)           6.3
 
48         proc univariate data=ResidDataP plot normal; var resid;
49           TITLE3 'Univariate analysis for PROC MIXED - Nested Error';
50         run;
NOTE: The PROCEDURE UNIVARIATE printed page 4.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.03 seconds
      cpu time            0.03 seconds


CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
Univariate analysis for PROC MIXED - Nested Error
 
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          24    Sum Weights                 24
Mean                        0    Sum Observations             0
Std Deviation      0.05933696    Variance            0.00352087
Skewness             0.380389    Kurtosis            2.28744979
Uncorrected SS     0.08098011    Corrected SS        0.08098011
Coeff Variation             .    Std Error Mean      0.01211211
 
              Basic Statistical Measures
    Location                    Variability
Mean      0.00000     Std Deviation            0.05934
Median   -0.00677     Variance                 0.00352
Mode     -0.00829     Range                    0.30000
                      Interquartile Range      0.05477
NOTE: The mode displayed is the smallest of 3 modes with a count of 2.
 
           Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M        -3    Pr >= |M|   0.3075
Signed Rank    S        -6    Pr >= |S|   0.8681
 
                   Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.942796    Pr < W      0.1882
Kolmogorov-Smirnov    D     0.144029    Pr > D     >0.1500
Cramer-von Mises      W-Sq  0.115831    Pr > W-Sq   0.0676
Anderson-Darling      A-Sq  0.644916    Pr > A-Sq   0.0849
 
Quantiles (Definition 5)
Quantile         Estimate
100% Max       0.16275988
99%            0.16275988
95%            0.09563256
90%            0.05005051
75% Q3         0.03032897
50% Median    -0.00677133
25% Q1        -0.02444381
10%           -0.05994949
5%            -0.09436744
1%            -0.13724012
0% Min        -0.13724012
 
             Extreme Observations
-------Lowest------        ------Highest------
     Value      Obs             Value      Obs
-0.1372401       16         0.0340483       22
-0.0943674        2         0.0485837       20
-0.0599495       14         0.0500505       13
-0.0463500        6         0.0956326        1
-0.0414163       19         0.1627599       15
 
   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      1 6                        1     0       0.175+                                            *
      1 0                        1     |            |                                          +++++++++
      0 55                       2     |            |                                  +++*++*+
      0 12333                    5  +--+--+    0.025+                         ++++****+**
     -0 43211111100             11  *-----*         |               **+****+*+ **
     -0 965                      3     |            |         +*++*+++
     -1 4                        1     0      -0.125+++++++*++
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
    Multiply Stem.Leaf by 10**-1                         -2        -1         0        +1        +2
 


51         proc sort data=calcium; by plant leaf; run;
NOTE: There were 24 observations read from the data set WORK.CALCIUM.
NOTE: The data set WORK.CALCIUM has 24 observations and 4 variables.
NOTE: PROCEDURE SORT used:
      real time           0.04 seconds
      cpu time            0.04 seconds
52         OPTIONS PS=45 LS=88;
53         proc means data=calcium noprint; by plant leaf; var calcium;
54            output out=next1 n=n mean=mean var=var; run;
NOTE: There were 24 observations read from the data set WORK.CALCIUM.
NOTE: The data set WORK.NEXT1 has 12 observations and 7 variables.
NOTE: PROCEDURE MEANS used:
      real time           0.04 seconds
      cpu time            0.04 seconds
55         proc plot data=next1; plot var*mean;
56           TITLE3 'Variance/Mean plot for PROC MIXED - Nested Error';
57         run;
57       !       OPTIONS PS=256 LS=111;
NOTE: There were 12 observations read from the data set WORK.NEXT1.
NOTE: The PROCEDURE PLOT printed page 5.
NOTE: PROCEDURE PLOT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
Variance/Mean plot for PROC MIXED - Nested Error
 
                 Plot of var*mean.  Legend: A = 1 obs, B = 2 obs, etc.
 var |
0.05 +
     |
     |
     |                                                       A
     |
     |
0.04 +
     |
     |
     |
     |
     |
0.03 +
     |
     |
     |
     |
     |
0.02 +
     |                                             A
     |
     |
     |
     |
0.01 +
     |
     |                                 A
     |
     |                                    A                        A
     |           A                                                        A
0.00 +                   A      A A                   A    A
     |
     --+------------+------------+------------+------------+------------+------------+--
      1.5          2.0          2.5          3.0          3.5          4.0          4.5
                                             mean
 


59         PROC GLM DATA=CALCIUM; CLASSES PLANT LEAF SAMPLE;
60           TITLE3 'Analysis OF Variance with GLM - Nested Error';
61           MODEL CALCIUM = PLANT LEAF(PLANT);
62             TEST H=PLANT E=LEAF(PLANT) / HTYPE=1 ETYPE=1;
63             RANDOM PLANT LEAF(PLANT);
64         RUN;
NOTE: TYPE I EMS not available without the E1 option.
64       !      QUIT;
NOTE: The PROCEDURE GLM printed pages 6-8.
NOTE: PROCEDURE GLM used:
      real time           0.08 seconds
      cpu time            0.08 seconds
 
CALCIUM CONCENTRATION IN TURNIP LEAVES
4 PLANTS, 3 LEAVES AND 2 SAMPLES OF 100 MG PER LEAF
Analysis OF Variance with GLM - Nested Error
The GLM Procedure
    Class Level Information
Class         Levels    Values
PLANT              4    1 2 3 4
LEAF               3    1 2 3
SAMPLE             2    1 2
 
Number of observations    24
 
Dependent Variable: CALCIUM
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                       11     10.19054583      0.92641326     139.22    <.0001
Error                       12      0.07985000      0.00665417
Corrected Total             23     10.27039583
 
R-Square     Coeff Var      Root MSE    CALCIUM Mean
0.992225      2.708195      0.081573        3.012083
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
PLANT                        3      7.56034583      2.52011528     378.73    <.0001
LEAF(PLANT)                  8      2.63020000      0.32877500      49.41    <.0001
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
PLANT                        3      7.56034583      2.52011528     378.73    <.0001
LEAF(PLANT)                  8      2.63020000      0.32877500      49.41    <.0001
 
     Tests of Hypotheses Using the Type I MS for LEAF(PLANT) as an Error Term
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
PLANT                        3      7.56034583      2.52011528       7.67    0.0097
 
 
Source                  Type III Expected Mean Square
PLANT                   Var(Error) + 2 Var(LEAF(PLANT)) + 6 Var(PLANT)
LEAF(PLANT)             Var(Error) + 2 Var(LEAF(PLANT))


66         **EXAMPLE 3****************************************************;
67         *** Example of nested design with unequal number            ***;
68         *** From Snedecor & Cochran, 1967 (pg 293)                  ***;
69         ***************************************************************;
70         OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
71         DATA WHEAT; INFILE CARDS MISSOVER;
72            INPUT YIELD FIELD FARM DISTRICT $;
73               TITLE1 'Wheat yields (g / 0.00009 acre)';
74               TITLE2 'CRD with unequal experimental and sampling units)';
75         CARDS;
NOTE: The data set WORK.WHEAT has 36 observations and 4 variables.
NOTE: DATA statement used:
      real time           0.03 seconds
      cpu time            0.03 seconds
75       !        RUN;
112        ;
113        PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN;
NOTE: There were 36 observations read from the data set WORK.WHEAT.
NOTE: The PROCEDURE PRINT printed page 9.
NOTE: PROCEDURE PRINT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
 
Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
RAW DATA LISTING
 

Obs    YIELD    FIELD    FARM    DISTRICT
  1      23       1        1        A
  2      19       2        1        A
  3      31       1        2        A
  4      37       2        2        A
  5      33       1        1        B
  6      29       2        1        B
  7      29       1        2        B
  8      36       1        1        C
  9      29       2        1        C
 10      33       3        1        C
 11      11       1        1        D
 12      21       2        1        D
 13      23       1        2        D
 14      18       2        2        D
 15      33       1        3        D
 16      23       1        4        D
 17      26       1        5        D
 18      39       1        6        D
 19      20       1        7        D
 20      24       1        8        D
 21      36       1        9        D
 22      25       1        1        E
 23      33       2        1        E
 24      28       1        1        F
 25      31       2        1        F
 26      25       1        2        F
 27      42       2        2        F
 28      32       1        3        F
 29      36       2        3        F
 30      41       1        4        F
 31      35       1        5        F
 32      16       1        6        F
 33      30       1        7        F
 34      40       1        8        F
 35      32       1        9        F
 36      44       1       10        F

 
114        PROC MIXED DATA=WHEAT cl COVTEST; CLASSES FIELD FARM DISTRICT;
115          TITLE3 'ANOVA with PROC MIXED - unequal sized nested Errors';
116          MODEL YIELD = / htype=1 DDFM=Satterthwaite outp=ResidDataP;
117            RANDOM DISTRICT FARM(DISTRICT);
118        RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 36 observations and 11 variables.
NOTE: The PROCEDURE MIXED printed page 10.
NOTE: PROCEDURE MIXED used:
      real time           0.16 seconds
      cpu time            0.14 seconds
118      !      QUIT;


Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
ANOVA with PROC MIXED - unequal sized nested Errors
The Mixed Procedure
                  Model Information
Data Set                     WORK.WHEAT
Dependent Variable           YIELD
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
              Class Level Information
Class       Levels    Values
FIELD            3    1 2 3
FARM            10    1 2 3 4 5 6 7 8 9 10
DISTRICT         6    A B C D E F
 
            Dimensions
Covariance Parameters             3
Columns in X                      1
Columns in Z                     31
Subjects                          1
Max Obs Per Subject              36
Observations Used                36
Observations Not Used             0
Total Observations               36
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1       246.55907914
        1              3       243.48928235      0.00694802
        2              2       242.71561388      0.00192010
        3              1       242.51666454      0.00017057
        4              1       242.50058397      0.00000150
        5              1       242.50044987      0.00000000
 
                   Convergence criteria met.
 
Covariance Parameter Estimates
                             Standard        Z
Cov Parm         Estimate       Error    Value        Pr Z     Alpha       Lower     Upper
DISTRICT           6.3148      9.1543     0.69      0.2452      0.05      1.2289   9022.02
FARM(DISTRICT)    26.0928     18.6720     1.40      0.0811      0.05      9.2820    223.79
Residual          29.8395     13.2217     2.26      0.0120      0.05     14.6468   90.6929
 
Fit Statistics
-2 Res Log Likelihood           242.5
AIC (smaller is better)         248.5
AICC (smaller is better)        249.3
BIC (smaller is better)         247.9
 
 
119        PROC MIXED DATA=WHEAT cl COVTEST method=TYPE1;
120          CLASSES FIELD FARM DISTRICT;
121          TITLE3 'ANOVA with Type I SS - unequal sized nested Errors';
122          MODEL YIELD = / htype=1 DDFM=Satterthwaite outp=ResidDataP;
123            RANDOM DISTRICT FARM(DISTRICT);
124        RUN;
NOTE: Estimated G matrix is not positive definite.
NOTE: The data set WORK.RESIDDATAP has 36 observations and 11 variables.
NOTE: The PROCEDURE MIXED printed page 11.
NOTE: PROCEDURE MIXED used:
      real time           0.17 seconds
      cpu time            0.17 seconds
124      !      QUIT;
 
Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
ANOVA with Type I SS - unequal sized nested Errors
The Mixed Procedure
                  Model Information
Data Set                     WORK.WHEAT
Dependent Variable           YIELD
Covariance Structure         Variance Components
Estimation Method            Type 1
Residual Variance Method     Factor
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
              Class Level Information
Class       Levels    Values
FIELD            3    1 2 3
FARM            10    1 2 3 4 5 6 7 8 9 10
DISTRICT         6    A B C D E F
 
            Dimensions
Covariance Parameters             3
Columns in X                      1
Columns in Z                     31
Subjects                          1
Max Obs Per Subject              36
Observations Used                36
Observations Not Used             0
Total Observations               36
 
Type 1 Analysis of Variance
                              Sum of
Source              DF       Squares   Mean Square  Expected Mean Square
DISTRICT             5    461.422106     92.284421  Var(Residual) + 1.965 Var(FARM(DISTRICT))
                                                    + 5.3778 Var(DISTRICT)
FARM(DISTRICT)      19   1349.383450     71.020182  Var(Residual) + 1.2899 Var(FARM(DISTRICT))
Residual            11    310.166667     28.196970  Var(Residual)
 
Type 1 Analysis of Variance
                                                                    Error
Source          Error Term                                             DF    F Value    Pr > F
DISTRICT        1.5234 MS(FARM(DISTRICT)) - 0.5234 MS(Residual)    13.729       0.99    0.4601
FARM(DISTRICT)  MS(Residual)                                           11       2.52    0.0597
Residual        .                                                       .        .       .
 
Covariance Parameter Estimates
                             Standard         Z
Cov Parm         Estimate       Error     Value      Pr Z     Alpha       Lower     Upper
DISTRICT          -0.2137      3.7702     -0.06    0.9548      0.05     -7.6031    7.1757
FARM(DISTRICT)    33.1988     24.0001      1.38    0.1666      0.05    -13.8405   80.2380
Residual          28.1970     13.3949      2.11    0.0176      0.05     14.1499   81.2859
 
           Fit Statistics
-2 Res Log Likelihood           243.6
AIC (smaller is better)         249.6
AICC (smaller is better)        250.4
BIC (smaller is better)         249.0


125        proc univariate data=ResidDataP plot normal; var resid;
126          TITLE3 'Univariate analysis for PROC MIXED - unequal nested Errors';
127        run;
NOTE: The PROCEDURE UNIVARIATE printed page 12.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.03 seconds
      cpu time            0.03 seconds
 
Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
Univariate analysis for PROC MIXED - unequal nested Errors
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          36    Sum Weights                 36
Mean                        0    Sum Observations             0
Std Deviation      4.11793027    Variance            16.9573497
Skewness            -0.059663    Kurtosis            -0.1028235
Uncorrected SS      593.50724    Corrected SS         593.50724
Coeff Variation             .    Std Error Mean      0.68632171
 
              Basic Statistical Measures
    Location                    Variability
Mean      0.00000     Std Deviation            4.11793
Median   -0.07467     Variance                16.95735
Mode       .          Range                   18.79915
                      Interquartile Range      5.91856
 
           Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M         0    Pr >= |M|   1.0000
Signed Rank    S         1    Pr >= |S|   0.9877
 
                   Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.994152    Pr < W      0.9994
Kolmogorov-Smirnov    D     0.053846    Pr > D     >0.1500
Cramer-von Mises      W-Sq  0.015867    Pr > W-Sq  >0.2500
Anderson-Darling      A-Sq  0.114678    Pr > A-Sq  >0.2500
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       9.647650
99%            9.647650
95%            6.590515
90%            4.753452
75% Q3         3.042826
50% Median    -0.074667
25% Q1        -2.875738
10%           -5.310128
5%            -7.352350
1%            -9.151499
0% Min        -9.151499
 
           Extreme Observations
------Lowest-----        -----Highest-----
   Value      Obs           Value      Obs
-9.15150       11         4.24802        4
-7.35235       26         4.75345       34
-6.26893       32         5.21272       30
-5.31013       14         6.59052       36
-4.62705        2         9.64765       27
 


   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      8 6                        1     |           9+                                             +*+++
      6 6                        1     |            |                                        ++*++
      4 02282                    5     |            |                                   **+*+*
      2 45838                    5  +-----+        3+                              *****
      0 280145                   6  |  +  |         |                         *****
     -0 88657643                 8  *-----*         |                    ******
     -2 207                      3  +-----+       -3+                +***+
     -4 3662                     4     |            |           +*+***
     -6 43                       2     |            |      ++*+*
     -8 2                        1     |          -9+ +++*+
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
                                                         -2        -1         0        +1        +2
 
128        proc sort data=WHEAT; by district farm; run;
NOTE: There were 36 observations read from the data set WORK.WHEAT.
NOTE: The data set WORK.WHEAT has 36 observations and 4 variables.
NOTE: PROCEDURE SORT used:
      real time           0.03 seconds
      cpu time            0.03 seconds
128      !                                              OPTIONS PS=45 LS=88;
129        proc means data=WHEAT noprint; by district farm; var yield;
130           output out=next2 n=n mean=mean var=var; run;
NOTE: There were 36 observations read from the data set WORK.WHEAT.
NOTE: The data set WORK.NEXT2 has 25 observations and 7 variables.
NOTE: PROCEDURE MEANS used:
      real time           0.04 seconds
      cpu time            0.04 seconds
131        proc plot data=next2; plot var*mean;
132          TITLE3 'Variance/Mean plot for PROC MIXED - unequal nested Errors';
133        run; OPTIONS PS=256 LS=111;
NOTE: There were 25 observations read from the data set WORK.NEXT2.
NOTE: The PROCEDURE PLOT printed page 13.
NOTE: PROCEDURE PLOT used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 
Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
Variance/Mean plot for PROC MIXED - unequal nested Errors
                 Plot of var*mean.  Legend: A = 1 obs, B = 2 obs, etc.
var |
150 +
    |                                                  A
    |
    |
    |
125 +
    |
    |
    |
    |
100 +
    |
    |
    |
    |
 75 +
    |
    |
    |
    |
 50 +     A
    |
    |
    |
    |                                      A
 25 +
    |                                                   A
    |                A
    |                  A                         A   A  A
    |                                        A
  0 +
    |
    ---+------------+------------+------------+------------+------------+------------+--
      15           20           25           30           35           40           45
                                            mean
NOTE: 15 obs had missing values.


135        PROC GLM DATA=WHEAT; CLASSES FIELD FARM DISTRICT;
136          TITLE3 'ANOVA with GLM - unequal sized nested Errors';
137          MODEL YIELD = DISTRICT FARM(DISTRICT);
138            TEST H=DISTRICT E=FARM(DISTRICT) / HTYPE=1 ETYPE=1;
139            RANDOM DISTRICT FARM(DISTRICT) / TEST;
140        RUN;
NOTE: TYPE I EMS not available without the E1 option.
140      !      QUIT;
NOTE: The PROCEDURE GLM printed pages 14-17.
NOTE: PROCEDURE GLM used:
      real time           0.08 seconds
      cpu time            0.08 seconds
 
Wheat yields (g / 0.00009 acre)
CRD with unequal number of experimental and sampling units)
ANOVA with GLM - unequal sized nested Errors
The GLM Procedure
           Class Level Information
Class         Levels    Values
FIELD              3    1 2 3
FARM              10    1 2 3 4 5 6 7 8 9 10
DISTRICT           6    A B C D E F
Number of observations    36
 
Dependent Variable: YIELD
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                       24     1810.805556       75.450231       2.68    0.0459
Error                       11      310.166667       28.196970
Corrected Total             35     2120.972222
 
R-Square     Coeff Var      Root MSE    YIELD Mean
0.853762      17.98334      5.310082      29.52778
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
DISTRICT                     5      461.422106       92.284421       3.27    0.0471
FARM(DISTRICT)              19     1349.383450       71.020182       2.52    0.0597
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
DISTRICT                     5      324.470997       64.894199       2.30    0.1158
FARM(DISTRICT)              19     1349.383450       71.020182       2.52    0.0597
 
    Tests of Hypotheses Using the Type I MS for FARM(DISTRICT) as an Error Term
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
DISTRICT                     5     461.4221057      92.2844211       1.30    0.3056
 
Source                  Type III Expected Mean Square
DISTRICT                Var(Error) + 1.8302 Var(FARM(DISTRICT)) + 5.0601 Var(DISTRICT)
FARM(DISTRICT)          Var(Error) + 1.2899 Var(FARM(DISTRICT))
 
Tests of Hypotheses for Random Model Analysis of Variance
Dependent Variable: YIELD
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
DISTRICT                     5      324.470997       64.894199       0.73    0.6126
Error                   14.464     1286.672238       88.958186
Error: 1.4189*MS(FARM(DISTRICT)) - 0.4189*MS(Error)
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
FARM(DISTRICT)              19     1349.383450       71.020182       2.52    0.0597
Error: MS(Error)            11      310.166667       28.196970


143        **EXAMPLE 4*****************************************************;
144        *** Example of RBD                                           ***;
145        *** From Snedecor & Cochran, 1980 (pg 256)                   ***;
146        ****************************************************************;
147        OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
148        DATA SOYBEAN; INFILE CARDS MISSOVER;
149           INPUT treatment $ BLOCK FAILURES;
150              TITLE1 'FAILURES TO GERMINATE OF SOYBEAN PLANTS';
151              TITLE2 '4 TREATMENTS AND A CONTROL, 5 BLOCKS';
152        CARDS;
NOTE: The data set WORK.SOYBEAN has 25 observations and 3 variables.
NOTE: DATA statement used:
      real time           0.03 seconds
      cpu time            0.03 seconds
152      !        RUN;
178        ;
179        PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN;
NOTE: There were 25 observations read from the data set WORK.SOYBEAN.
NOTE: The PROCEDURE PRINT printed page 18.
NOTE: PROCEDURE PRINT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
 
FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
RAW DATA LISTING
 

Obs    treatment    BLOCK    FAILURES
  1     CHECK         1          8
  2     CHECK         2         10
  3     CHECK         3         12
  4     CHECK         4         13
  5     CHECK         5         11
  6     ARASAN        1          2
  7     ARASAN        2          6
  8     ARASAN        3          7
  9     ARASAN        4         11
 10     ARASAN        5          5
 11     SPERGON       1          4
 12     SPERGON       2         10
 13     SPERGON       3          9
 14     SPERGON       4          8
 15     SPERGON       5         10
 16     SEMESAN       1          3
 17     SEMESAN       2          5
 18     SEMESAN       3          9
 19     SEMESAN       4         10
 20     SEMESAN       5          6
 21     FERMATE       1          9
 22     FERMATE       2          7
 23     FERMATE       3          5
 24     FERMATE       4          5
 25     FERMATE       5          3

 
 
 
180        PROC MIXED DATA=SOYBEAN  cl COVTEST; CLASSES treatment BLOCK;
181          TITLE3 'ANOVA with PROC MIXED - RBD without reps';
182          MODEL FAILURES = treatment / htype=3 DDFM=Satterthwaite outp=ResidDataP;
183          RANDOM BLOCK;
184          lsmeans treatment / pdiff adjust=tukey;
185        RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 25 observations and 10 variables.
NOTE: The PROCEDURE MIXED printed page 19.
NOTE: PROCEDURE MIXED used:
      real time           0.20 seconds
      cpu time            0.20 seconds
185      !      QUIT;
 


FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
ANOVA with PROC MIXED - RBD without reps
The Mixed Procedure
                  Model Information
Data Set                     WORK.SOYBEAN
Dependent Variable           FAILURES
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
               Class Level Information
Class        Levels    Values
treatment         5    ARASAN CHECK FERMATE SEMESAN SPERGON
BLOCK             5    1 2 3 4 5
 
            Dimensions
Covariance Parameters             2
Columns in X                      6
Columns in Z                      5
Subjects                          1
Max Obs Per Subject              25
Observations Used                25
Observations Not Used             0
Total Observations               25
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1       103.20192033
        1              1       101.90681043      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                         Standard         Z
Cov Parm     Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
BLOCK          1.4100      1.8032      0.78      0.2171      0.05      0.3075      430.52
Residual       5.4100      1.9127      2.83      0.0023      0.05      3.0008     12.5310
 
           Fit Statistics
-2 Res Log Likelihood           101.9
AIC (smaller is better)         105.9
AICC (smaller is better)        106.6
BIC (smaller is better)         105.1
 
        Type 3 Tests of Fixed Effects
              Num     Den
Effect         DF      DF    F Value    Pr > F
treatment       4      16       3.87    0.0219
 
                             Least Squares Means
                                      Standard
Effect       treatment    Estimate       Error      DF    t Value    Pr > |t|
treatment    ARASAN         6.2000      1.1679    17.1       5.31      <.0001
treatment    CHECK         10.8000      1.1679    17.1       9.25      <.0001
treatment    FERMATE        5.8000      1.1679    17.1       4.97      0.0001
treatment    SEMESAN        6.6000      1.1679    17.1       5.65      <.0001
treatment    SPERGON        8.2000      1.1679    17.1       7.02      <.0001
 


                                     Differences of Least Squares Means
                                                Standard
Effect      treatment   _treatment   Estimate      Error     DF   t Value   Pr > |t|   Adjustment      Adj P
treatment   ARASAN      CHECK         -4.6000     1.4711     16     -3.13     0.0065   Tukey-Kramer   0.0443
treatment   ARASAN      FERMATE        0.4000     1.4711     16      0.27     0.7892   Tukey-Kramer   0.9987
treatment   ARASAN      SEMESAN       -0.4000     1.4711     16     -0.27     0.7892   Tukey-Kramer   0.9987
treatment   ARASAN      SPERGON       -2.0000     1.4711     16     -1.36     0.1928   Tukey-Kramer   0.6602
treatment   CHECK       FERMATE        5.0000     1.4711     16      3.40     0.0037   Tukey-Kramer   0.0261
treatment   CHECK       SEMESAN        4.2000     1.4711     16      2.86     0.0115   Tukey-Kramer   0.0740
treatment   CHECK       SPERGON        2.6000     1.4711     16      1.77     0.0962   Tukey-Kramer   0.4242
treatment   FERMATE     SEMESAN       -0.8000     1.4711     16     -0.54     0.5941   Tukey-Kramer   0.9812
treatment   FERMATE     SPERGON       -2.4000     1.4711     16     -1.63     0.1223   Tukey-Kramer   0.4999
treatment   SEMESAN     SPERGON       -1.6000     1.4711     16     -1.09     0.2929   Tukey-Kramer   0.8102
 
 
 
186        proc univariate data=ResidDataP plot normal; var resid;
187          TITLE3 'Univariate analysis for PROC MIXED - RBD without reps';
188        run;
NOTE: The PROCEDURE UNIVARIATE printed page 20.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.03 seconds
      cpu time            0.03 seconds
 
FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
Univariate analysis for PROC MIXED - RBD without reps
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          25    Sum Weights                 25
Mean                        0    Sum Observations             0
Std Deviation      1.99954014    Variance            3.99816078
Skewness           0.48805915    Kurtosis            -0.3291607
Uncorrected SS     95.9558587    Corrected SS        95.9558587
Coeff Variation             .    Std Error Mean      0.39990803
 
              Basic Statistical Measures
    Location                    Variability
Mean      0.00000     Std Deviation            1.99954
Median   -0.24526     Variance                 3.99816
Mode       .          Range                    7.40000
                      Interquartile Range      2.64205
 
           Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M      -0.5    Pr >= |M|   1.0000
Signed Rank    S      -8.5    Pr >= |S|   0.8244
 
                   Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.963523    Pr < W      0.4890
Kolmogorov-Smirnov    D     0.103754    Pr > D     >0.1500
Cramer-von Mises      W-Sq  0.033262    Pr > W-Sq  >0.2500
Anderson-Darling      A-Sq  0.249495    Pr > A-Sq  >0.2500
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       4.512681
99%            4.512681
95%            3.736276
90%            2.336276
75% Q3         1.154735
50% Median    -0.245265
25% Q1        -1.487319
10%           -2.505778
5%            -2.887319
1%            -2.887319
0% Min        -2.887319
 
           Extreme Observations
------Lowest-----        -----Highest-----
   Value      Obs           Value      Obs
-2.88732       11         1.90209       18
-2.88732        6         2.09422       15
-2.50578       25         2.33628       19
-2.28732       16         3.73628        9
-1.86372       24         4.51268       21
 
   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      4 5                        1     |         4.5+                                             *+++++
      3 7                        1     |            |                                        *+++++
      2 13                       2     |            |                                    *+*++
      1 1289                     4  +-----+         |                              **+**+
      0 3357                     4  |  +  |         |                         +****+
     -0 9832                     4  *-----*         |                    ++****
     -1 96533                    5  +-----+         |               +**+***
     -2 9953                     4     |        -2.5+     *    *+*+*
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
                                                         -2        -1         0        +1        +2
 
 
189        PROC CHART DATA=SOYBEAN; OPTIONS PS=45 LS=88;
190           TITLE3 'Histogram of MIXED analysis - RBD without reps';
191           VBAR treatment / SUMVAR=FAILURES TYPE=MEAN; RUN;
NOTE: The PROCEDURE CHART printed page 21.
NOTE: PROCEDURE CHART used:
      real time           0.00 seconds
      cpu time            0.00 seconds
191      !                                         OPTIONS PS=256 LS=111;
 
FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
Histogram of MIXED analysis - RBD without reps
 
FAILURES Mean
   |                   *****
   |                   *****
10 +                   *****
   |                   *****
   |                   *****
   |                   *****
 8 +                   *****                               *****
   |                   *****                               *****
   |                   *****                               *****
   |                   *****                   *****       *****
 6 +       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
 4 +       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
 2 +       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   |       *****       *****       *****       *****       *****
   --------------------------------------------------------------------
          ARASAN       CHECK      FERMATE     SEMESAN     SPERGON
                                 treatment


193        PROC GLM DATA=SOYBEAN; CLASSES treatment BLOCK;
194          TITLE3 'ANOVA with PROC GLM - RBD without reps';
195          MODEL FAILURES = treatment BLOCK;
196          RANDOM treatment BLOCK / TEST;
197          means treatment / tukey;
198          lsmeans treatment / pdiff stderr adjust=tukey;
199        RUN;
NOTE: TYPE I EMS not available without the E1 option.
NOTE: Means from the MEANS statement are not adjusted for other terms in the model.  For adjusted means, use
      the LSMEANS statement.
199      !      QUIT;
NOTE: The PROCEDURE GLM printed pages 22-27.
NOTE: PROCEDURE GLM used:
      real time           0.21 seconds
      cpu time            0.15 seconds
 
FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
ANOVA with PROC GLM - RBD without reps
The GLM Procedure
                   Class Level Information
Class          Levels    Values
treatment           5    ARASAN CHECK FERMATE SEMESAN SPERGON
BLOCK               5    1 2 3 4 5
 
Number of observations    25
 FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
ANOVA with PROC GLM - RBD without reps
The GLM Procedure
Dependent Variable: FAILURES
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                        8     133.6800000      16.7100000       3.09    0.0262
Error                       16      86.5600000       5.4100000
Corrected Total             24     220.2400000
 
R-Square     Coeff Var      Root MSE    FAILURES Mean
0.606974      30.93006      2.325941         7.520000
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
treatment                    4     83.84000000     20.96000000       3.87    0.0219
BLOCK                        4     49.84000000     12.46000000       2.30    0.1032
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
treatment                    4     83.84000000     20.96000000       3.87    0.0219
BLOCK                        4     49.84000000     12.46000000       2.30    0.1032
 
Source                  Type III Expected Mean Square
treatment               Var(Error) + 5 Var(treatment)
BLOCK                   Var(Error) + 5 Var(BLOCK)


FAILURES TO GERMINATE OF SOYBEAN PLANTS
4 TREATMENTS AND A CONTROL, 5 BLOCKS
ANOVA with PROC GLM - RBD without reps
The GLM Procedure
 
Tests of Hypotheses for Random Model Analysis of Variance
Dependent Variable: FAILURES
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
treatment                    4       83.840000       20.960000       3.87    0.0219
BLOCK                        4       49.840000       12.460000       2.30    0.1032
Error: MS(Error)            16       86.560000        5.410000
 
Tukey's Studentized Range (HSD) Test for FAILURES
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                  16
Error Mean Square                       5.41
Critical Value of Studentized Range  4.33269
Minimum Significant Difference        4.5068
 
Means with the same letter are not significantly different.
 
Tukey Grouping     Mean      N    treatment
        A        10.800      5    CHECK
        A
   B    A         8.200      5    SPERGON
   B    A
   B    A         6.600      5    SEMESAN
   B
   B              6.200      5    ARASAN
   B
   B              5.800      5    FERMATE
 
Least Squares Means
Adjustment for Multiple Comparisons: Tukey
                 FAILURES        Standard                  LSMEAN
treatment          LSMEAN           Error    Pr > |t|      Number
ARASAN          6.2000000       1.0401923      <.0001           1
CHECK          10.8000000       1.0401923      <.0001           2
FERMATE         5.8000000       1.0401923      <.0001           3
SEMESAN         6.6000000       1.0401923      <.0001           4
SPERGON         8.2000000       1.0401923      <.0001           5
 
                 Least Squares Means for effect treatment
                   Pr > |t| for H0: LSMean(i)=LSMean(j)
                       Dependent Variable: FAILURES
i/j              1             2             3             4             5
   1                      0.0443        0.9987        0.9987        0.6602
   2        0.0443                      0.0261        0.0740        0.4242
   3        0.9987        0.0261                      0.9812        0.4999
   4        0.9987        0.0740        0.9812                      0.8102
   5        0.6602        0.4242        0.4999        0.8102


203        **EXAMPLE 5********************************************;
204        *** Example of RBD with sampling error              ***;
205        *** From Snedecor & Cochran, 1980 (pg 267)          ***;
206        *******************************************************;
207        OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
208        DATA FUMIGANT; INFILE CARDS MISSOVER;
209           INPUT FUMIGANT $ BLOCK $ W1 W2 W3 W4;
210              TITLE1 'Number of wire worms found for 2 fumigants and a control';
211              TITLE2 'Fumigants are C and S, control is 0, 5 BLOCKS';
212           REP=1; WORMS=W1; LWORMS=LOG(WORMS+1);  OUTPUT;
213           REP=2; WORMS=W2; LWORMS=LOG(WORMS+1);  OUTPUT;
214           REP=3; WORMS=W3; LWORMS=LOG(WORMS+1);  OUTPUT;
215           REP=4; WORMS=W4; LWORMS=LOG(WORMS+1);  OUTPUT;
216           KEEP FUMIGANT BLOCK REP WORMS LWORMS;
217        CARDS;
NOTE: The data set WORK.FUMIGANT has 60 observations and 5 variables.
NOTE: DATA statement used:
      real time           0.04 seconds
      cpu time            0.04 seconds
217      !        RUN;
233        ;
234        PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN;
NOTE: There were 60 observations read from the data set WORK.FUMIGANT.
NOTE: The PROCEDURE PRINT printed page 28.
NOTE: PROCEDURE PRINT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
RAW DATA LISTING
 

Obs    FUMIGANT    BLOCK    REP    WORMS     LWORMS
 
  1       C         I        1        5     1.79176
  2       C         I        2        4     1.60944
  3       C         I        3        5     1.79176
  4       C         I        4        2     1.09861
  5       C         II       1        0     0.00000
  6       C         II       2        9     2.30259
  7       C         II       3        3     1.38629
  8       C         II       4        3     1.38629
  9       C         III      1        4     1.60944
 10       C         III      2        4     1.60944
 11       C         III      3        3     1.38629
 12       C         III      4        9     2.30259
 13       C         IV       1        7     2.07944
 14       C         IV       2        3     1.38629
 15       C         IV       3        5     1.79176
 16       C         IV       4       12     2.56495
 17       C         V        1        4     1.60944
 18       C         V        2        9     2.30259
 19       C         V        3        8     2.19722
 20       C         V        4        6     1.94591
 21       S         I        1        5     1.79176
 22       S         I        2        5     1.79176
 23       S         I        3        1     0.69315
 24       S         I        4        2     1.09861
 25       S         II       1        6     1.94591
 26       S         II       2        4     1.60944
 27       S         II       3        5     1.79176
 28       S         II       4        4     1.60944
 29       S         III      1        2     1.09861
 30       S         III      2        9     2.30259
 31       S         III      3        3     1.38629
 32       S         III      4        7     2.07944
 33       S         IV       1        6     1.94591
 34       S         IV       2        4     1.60944
 35       S         IV       3        8     2.19722
 36       S         IV       4        4     1.60944
 37       S         V        1        2     1.09861
 38       S         V        2        9     2.30259
 39       S         V        3        7     2.07944
 40       S         V        4        3     1.38629
 41       0         I        1       12     2.56495
 42       0         I        2       20     3.04452
 43       0         I        3        8     2.19722
 44       0         I        4        8     2.19722
 45       0         II       1        7     2.07944
 46       0         II       2        4     1.60944
 47       0         II       3        4     1.60944
 48       0         II       4        5     1.79176
 49       0         III      1        9     2.30259
 50       0         III      2        6     1.94591
 51       0         III      3        7     2.07944
 52       0         III      4       11     2.48491
 53       0         IV       1       12     2.56495
 54       0         IV       2       22     3.13549
 55       0         IV       3       17     2.89037
 56       0         IV       4       13     2.63906
 57       0         V        1        7     2.07944
 58       0         V        2        8     2.19722
 59       0         V        3        5     1.79176
 60       0         V        4        9     2.30259

 


235        PROC mixed DATA=FUMIGANT cl COVTEST; CLASSES FUMIGANT BLOCK REP;
236            TITLE3 'ANOVA with PROC MIXED - RBD with reps';
237          MODEL WORMS = FUMIGANT / htype=3 DDFM=Satterthwaite outp=ResidDataP outpM=ResidDataPM;
238          RANDOM BLOCK FUMIGANT*BLOCK;
239          lsmeans fumigant / pdiff ADJUST=DUNNETT diff=controll('0');
240          lsmeans fumigant / pdiff ADJUST=tukey;
241        RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 60 observations and 12 variables.
NOTE: The data set WORK.RESIDDATAPM has 60 observations and 12 variables.
NOTE: The PROCEDURE MIXED printed page 29.
NOTE: PROCEDURE MIXED used:
      real time           0.22 seconds
      cpu time            0.22 seconds
241      !      QUIT;
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC MIXED - RBD with reps
 
The Mixed Procedure
                  Model Information
Data Set                     WORK.FUMIGANT
Dependent Variable           WORMS
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
              Class Level Information
Class       Levels    Values
FUMIGANT         3    0 C S
BLOCK            5    I II III IV V
REP              4    1 2 3 4
 
Dimensions
Covariance Parameters             3
Columns in X                      4
Columns in Z                     20
Subjects                          1
Max Obs Per Subject              60
Observations Used                60
Observations Not Used             0
Total Observations               60
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1       318.17726625
        1              1       310.27325992      0.00000000
Convergence criteria met.
 
Covariance Parameter Estimates
                               Standard         Z
Cov Parm           Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
BLOCK                1.1052      2.4502      0.45      0.3260      0.05      0.1473    25730931
FUMIGANT*BLOCK       3.8559      3.1035      1.24      0.1070      0.05      1.2517     50.5437
Residual             9.1056      1.9196      4.74      <.0001      0.05      6.2643     14.4450
 


Fit Statistics
-2 Res Log Likelihood           310.3
AIC (smaller is better)         316.3
AICC (smaller is better)        316.7
BIC (smaller is better)         315.1
 
Type 3 Tests of Fixed Effects
              Num     Den
Effect         DF      DF    F Value    Pr > F
FUMIGANT        2       8       5.98    0.0258
 
                            Least Squares Means
                                    Standard
Effect      FUMIGANT    Estimate       Error      DF    t Value    Pr > |t|
FUMIGANT    0             9.7000      1.2031    11.5       8.06      <.0001
FUMIGANT    C             5.2500      1.2031    11.5       4.36      0.0010
FUMIGANT    S             4.8000      1.2031    11.5       3.99      0.0020
FUMIGANT    0             9.7000      1.2031    11.5       8.06      <.0001
FUMIGANT    C             5.2500      1.2031    11.5       4.36      0.0010
FUMIGANT    S             4.8000      1.2031    11.5       3.99      0.0020
 
                                  Differences of Least Squares Means
                                         Standard
Effect    FUMIGANT  _FUMIGANT  Estimate     Error    DF  t Value  Tails      Pr t  Adjustment     Adj P
FUMIGANT  0         C            4.4500    1.5662     8     2.84  Upper    0.0109  Dunnett-Hsu   0.0194
FUMIGANT  0         S            4.9000    1.5662     8     3.13  Upper    0.0070  Dunnett-Hsu   0.0126
FUMIGANT  0         C            4.4500    1.5662     8     2.84  Both     0.0218  Tukey-Kramer  0.0512
FUMIGANT  0         S            4.9000    1.5662     8     3.13  Both     0.0140  Tukey-Kramer  0.0336
FUMIGANT  C         S            0.4500    1.5662     8     0.29  Both     0.7812  Tukey-Kramer  0.9558
 
 
 
242        proc print data=residdataP; TITLE4 'Output from the OUTP option'; run;
NOTE: There were 60 observations read from the data set WORK.RESIDDATAP.
NOTE: The PROCEDURE PRINT printed page 30.
NOTE: PROCEDURE PRINT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC MIXED - RBD with reps
Output from the OUTP option
                                                     StdErr
Obs  FUMIGANT  BLOCK  REP  WORMS   LWORMS    Pred     Pred      DF    Alpha   Lower    Upper     Resid
  1     C       I      1      5   1.79176   4.4423  1.29594  49.6771   0.05   1.8389   7.0457   0.55770
  2     C       I      2      4   1.60944   4.4423  1.29594  49.6771   0.05   1.8389   7.0457  -0.44230
  3     C       I      3      5   1.79176   4.4423  1.29594  49.6771   0.05   1.8389   7.0457   0.55770
  4     C       I      4      2   1.09861   4.4423  1.29594  49.6771   0.05   1.8389   7.0457  -2.44230
  5     C       II     1      0   0.00000   4.0354  1.29594  49.6771   0.05   1.4320   6.6388  -4.03542
  6     C       II     2      9   2.30259   4.0354  1.29594  49.6771   0.05   1.4320   6.6388   4.96458
  7     C       II     3      3   1.38629   4.0354  1.29594  49.6771   0.05   1.4320   6.6388  -1.03542
  8     C       II     4      3   1.38629   4.0354  1.29594  49.6771   0.05   1.4320   6.6388  -1.03542
  9     C       III    1      4   1.60944   5.0385  1.29594  49.6771   0.05   2.4351   7.6419  -1.03852
 10     C       III    2      4   1.60944   5.0385  1.29594  49.6771   0.05   2.4351   7.6419  -1.03852
 11     C       III    3      3   1.38629   5.0385  1.29594  49.6771   0.05   2.4351   7.6419  -2.03852
 12     C       III    4      9   2.30259   5.0385  1.29594  49.6771   0.05   2.4351   7.6419   3.96148
 13     C       IV     1      7   2.07944   6.5623  1.29594  49.6771   0.05   3.9589   9.1657   0.43771
 14     C       IV     2      3   1.38629   6.5623  1.29594  49.6771   0.05   3.9589   9.1657  -3.56229
 15     C       IV     3      5   1.79176   6.5623  1.29594  49.6771   0.05   3.9589   9.1657  -1.56229
 16     C       IV     4     12   2.56495   6.5623  1.29594  49.6771   0.05   3.9589   9.1657   5.43771
 17     C       V      1      4   1.60944   6.1715  1.29594  49.6771   0.05   3.5681   8.7748  -2.17147
 18     C       V      2      9   2.30259   6.1715  1.29594  49.6771   0.05   3.5681   8.7748   2.82853
 19     C       V      3      8   2.19722   6.1715  1.29594  49.6771   0.05   3.5681   8.7748   1.82853
 20     C       V      4      6   1.94591   6.1715  1.29594  49.6771   0.05   3.5681   8.7748  -0.17147
 21     S       I      1      5   1.79176   3.8037  1.29594  49.6771   0.05   1.2003   6.4071   1.19633
 22     S       I      2      5   1.79176   3.8037  1.29594  49.6771   0.05   1.2003   6.4071   1.19633
 23     S       I      3      1   0.69315   3.8037  1.29594  49.6771   0.05   1.2003   6.4071  -2.80367
 24     S       I      4      2   1.09861   3.8037  1.29594  49.6771   0.05   1.2003   6.4071  -1.80367
 25     S       II     1      6   1.94591   4.4972  1.29594  49.6771   0.05   1.8938   7.1005   1.50284
 26     S       II     2      4   1.60944   4.4972  1.29594  49.6771   0.05   1.8938   7.1005  -0.49716
 27     S       II     3      5   1.79176   4.4972  1.29594  49.6771   0.05   1.8938   7.1005   0.50284
 28     S       II     4      4   1.60944   4.4972  1.29594  49.6771   0.05   1.8938   7.1005  -0.49716
 29     S       III    1      2   1.09861   5.0287  1.29594  49.6771   0.05   2.4253   7.6321  -3.02867
 30     S       III    2      9   2.30259   5.0287  1.29594  49.6771   0.05   2.4253   7.6321   3.97133
 31     S       III    3      3   1.38629   5.0287  1.29594  49.6771   0.05   2.4253   7.6321  -2.02867
 32     S       III    4      7   2.07944   5.0287  1.29594  49.6771   0.05   2.4253   7.6321   1.97133
 33     S       IV     1      6   1.94591   5.6093  1.29594  49.6771   0.05   3.0059   8.2126   0.39074
 34     S       IV     2      4   1.60944   5.6093  1.29594  49.6771   0.05   3.0059   8.2126  -1.60926
 35     S       IV     3      8   2.19722   5.6093  1.29594  49.6771   0.05   3.0059   8.2126   2.39074
 36     S       IV     4      4   1.60944   5.6093  1.29594  49.6771   0.05   3.0059   8.2126  -1.60926
 37     S       V      1      2   1.09861   5.0612  1.29594  49.6771   0.05   2.4579   7.6646  -3.06124
 38     S       V      2      9   2.30259   5.0612  1.29594  49.6771   0.05   2.4579   7.6646   3.93876
 39     S       V      3      7   2.07944   5.0612  1.29594  49.6771   0.05   2.4579   7.6646   1.93876
 40     S       V      4      3   1.38629   5.0612  1.29594  49.6771   0.05   2.4579   7.6646  -2.06124
 41     0       I      1     12   2.56495  11.1245  1.29594  49.6771   0.05   8.5211  13.7279   0.87550
 42     0       I      2     20   3.04452  11.1245  1.29594  49.6771   0.05   8.5211  13.7279   8.87550
 43     0       I      3      8   2.19722  11.1245  1.29594  49.6771   0.05   8.5211  13.7279  -3.12450
 44     0       I      4      8   2.19722  11.1245  1.29594  49.6771   0.05   8.5211  13.7279  -3.12450
 45     0       II     1      7   2.07944   6.4733  1.29594  49.6771   0.05   3.8699   9.0767   0.52670
 46     0       II     2      4   1.60944   6.4733  1.29594  49.6771   0.05   3.8699   9.0767  -2.47330
 47     0       II     3      4   1.60944   6.4733  1.29594  49.6771   0.05   3.8699   9.0767  -2.47330
 48     0       II     4      5   1.79176   6.4733  1.29594  49.6771   0.05   3.8699   9.0767  -1.47330
 49     0       III    1      9   2.30259   8.7340  1.29594  49.6771   0.05   6.1306  11.3374   0.26602
 50     0       III    2      6   1.94591   8.7340  1.29594  49.6771   0.05   6.1306  11.3374  -2.73398
 51     0       III    3      7   2.07944   8.7340  1.29594  49.6771   0.05   6.1306  11.3374  -1.73398
 52     0       III    4     11   2.48491   8.7340  1.29594  49.6771   0.05   6.1306  11.3374   2.26602
 53     0       IV     1     12   2.56495  14.0305  1.29594  49.6771   0.05  11.4271  16.6338  -2.03046
 54     0       IV     2     22   3.13549  14.0305  1.29594  49.6771   0.05  11.4271  16.6338   7.96954
 55     0       IV     3     17   2.89037  14.0305  1.29594  49.6771   0.05  11.4271  16.6338   2.96954
 56     0       IV     4     13   2.63906  14.0305  1.29594  49.6771   0.05  11.4271  16.6338  -1.03046
 57     0       V      1      7   2.07944   8.1378  1.29594  49.6771   0.05   5.5344  10.7411  -1.13776
 58     0       V      2      8   2.19722   8.1378  1.29594  49.6771   0.05   5.5344  10.7411  -0.13776
 59     0       V      3      5   1.79176   8.1378  1.29594  49.6771   0.05   5.5344  10.7411  -3.13776
 60     0       V      4      9   2.30259   8.1378  1.29594  49.6771   0.05   5.5344  10.7411   0.86224
 
243        proc print data=residdataPM; TITLE4 'Output from the OUTPM option'; run;
NOTE: There were 60 observations read from the data set WORK.RESIDDATAPM.
NOTE: The PROCEDURE PRINT printed page 31.
NOTE: PROCEDURE PRINT used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC MIXED - RBD with reps
Output from the OUTPM option
                                                         StdErr
Obs   FUMIGANT   BLOCK   REP   WORMS    LWORMS   Pred     Pred       DF     Alpha    Lower     Upper     Resid
  1      C        I       1       5    1.79176   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -0.25
  2      C        I       2       4    1.60944   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -1.25
  3      C        I       3       5    1.79176   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -0.25
  4      C        I       4       2    1.09861   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -3.25
  5      C        II      1       0    0.00000   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -5.25
  6      C        II      2       9    2.30259   5.25   1.20312   11.4653    0.05   2.61500    7.8850     3.75
  7      C        II      3       3    1.38629   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -2.25
  8      C        II      4       3    1.38629   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -2.25
  9      C        III     1       4    1.60944   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -1.25
 10      C        III     2       4    1.60944   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -1.25
 11      C        III     3       3    1.38629   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -2.25
 12      C        III     4       9    2.30259   5.25   1.20312   11.4653    0.05   2.61500    7.8850     3.75
 13      C        IV      1       7    2.07944   5.25   1.20312   11.4653    0.05   2.61500    7.8850     1.75
 14      C        IV      2       3    1.38629   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -2.25
 15      C        IV      3       5    1.79176   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -0.25
 16      C        IV      4      12    2.56495   5.25   1.20312   11.4653    0.05   2.61500    7.8850     6.75
 17      C        V       1       4    1.60944   5.25   1.20312   11.4653    0.05   2.61500    7.8850    -1.25
 18      C        V       2       9    2.30259   5.25   1.20312   11.4653    0.05   2.61500    7.8850     3.75
 19      C        V       3       8    2.19722   5.25   1.20312   11.4653    0.05   2.61500    7.8850     2.75
 20      C        V       4       6    1.94591   5.25   1.20312   11.4653    0.05   2.61500    7.8850     0.75
 21      S        I       1       5    1.79176   4.80   1.20312   11.4653    0.05   2.16500    7.4350     0.20
 22      S        I       2       5    1.79176   4.80   1.20312   11.4653    0.05   2.16500    7.4350     0.20
 23      S        I       3       1    0.69315   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -3.80
 24      S        I       4       2    1.09861   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -2.80
 25      S        II      1       6    1.94591   4.80   1.20312   11.4653    0.05   2.16500    7.4350     1.20
 26      S        II      2       4    1.60944   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -0.80
 27      S        II      3       5    1.79176   4.80   1.20312   11.4653    0.05   2.16500    7.4350     0.20
 28      S        II      4       4    1.60944   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -0.80
 29      S        III     1       2    1.09861   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -2.80
 30      S        III     2       9    2.30259   4.80   1.20312   11.4653    0.05   2.16500    7.4350     4.20
 31      S        III     3       3    1.38629   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -1.80
 32      S        III     4       7    2.07944   4.80   1.20312   11.4653    0.05   2.16500    7.4350     2.20
 33      S        IV      1       6    1.94591   4.80   1.20312   11.4653    0.05   2.16500    7.4350     1.20
 34      S        IV      2       4    1.60944   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -0.80
 35      S        IV      3       8    2.19722   4.80   1.20312   11.4653    0.05   2.16500    7.4350     3.20
 36      S        IV      4       4    1.60944   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -0.80
 37      S        V       1       2    1.09861   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -2.80
 38      S        V       2       9    2.30259   4.80   1.20312   11.4653    0.05   2.16500    7.4350     4.20
 39      S        V       3       7    2.07944   4.80   1.20312   11.4653    0.05   2.16500    7.4350     2.20
 40      S        V       4       3    1.38629   4.80   1.20312   11.4653    0.05   2.16500    7.4350    -1.80
 41      0        I       1      12    2.56495   9.70   1.20312   11.4653    0.05   7.06500   12.3350     2.30
 42      0        I       2      20    3.04452   9.70   1.20312   11.4653    0.05   7.06500   12.3350    10.30
 43      0        I       3       8    2.19722   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -1.70
 44      0        I       4       8    2.19722   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -1.70
 45      0        II      1       7    2.07944   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -2.70
 46      0        II      2       4    1.60944   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -5.70
 47      0        II      3       4    1.60944   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -5.70
 48      0        II      4       5    1.79176   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -4.70
 49      0        III     1       9    2.30259   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -0.70
 50      0        III     2       6    1.94591   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -3.70
 51      0        III     3       7    2.07944   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -2.70
 52      0        III     4      11    2.48491   9.70   1.20312   11.4653    0.05   7.06500   12.3350     1.30
 53      0        IV      1      12    2.56495   9.70   1.20312   11.4653    0.05   7.06500   12.3350     2.30
 54      0        IV      2      22    3.13549   9.70   1.20312   11.4653    0.05   7.06500   12.3350    12.30
 55      0        IV      3      17    2.89037   9.70   1.20312   11.4653    0.05   7.06500   12.3350     7.30
 56      0        IV      4      13    2.63906   9.70   1.20312   11.4653    0.05   7.06500   12.3350     3.30
 57      0        V       1       7    2.07944   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -2.70
 58      0        V       2       8    2.19722   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -1.70
 59      0        V       3       5    1.79176   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -4.70
 60      0        V       4       9    2.30259   9.70   1.20312   11.4653    0.05   7.06500   12.3350    -0.70
 
244        proc univariate data=ResidDataP plot normal; var resid;
245          TITLE3 'Univariate analysis for PROC MIXED - RBD with reps';
246        run;
NOTE: The PROCEDURE UNIVARIATE printed page 32.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
Univariate analysis for PROC MIXED - RBD with reps
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          60    Sum Weights                 60
Mean                        0    Sum Observations             0
Std Deviation      2.74808542    Variance            7.55197347
Skewness           1.14385572    Kurtosis            1.43592384
Uncorrected SS     445.566435    Corrected SS        445.566435
Coeff Variation             .    Std Error Mean       0.3547763
 
              Basic Statistical Measures
    Location                    Variability
Mean      0.00000     Std Deviation            2.74809
Median   -0.49716     Variance                 7.55197
Mode     -3.12450     Range                   12.91092
                      Interquartile Range      3.38408
NOTE: The mode displayed is the smallest of 8 modes with a count of 2.
 
           Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M        -4    Pr >= |M|   0.3663
Signed Rank    S      -110    Pr >= |S|   0.4227
 
                   Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.918552    Pr < W      0.0007
Kolmogorov-Smirnov    D     0.129494    Pr > D      0.0136
Cramer-von Mises      W-Sq  0.185609    Pr > W-Sq   0.0080
Anderson-Darling      A-Sq  1.226204    Pr > A-Sq  <0.0050
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       8.875503
99%            8.875503
95%            5.201148
90%            3.950118
75% Q3         1.349586
50% Median    -0.497159
25% Q1        -2.034492
10%           -3.044958
5%            -3.131129
1%            -4.035419
0% Min        -4.035419
 
           Extreme Observations
------Lowest-----        -----Highest-----
   Value      Obs           Value      Obs
-4.03542        5         3.97133       30
-3.56229       14         4.96458        6
-3.13776       59         5.43771       16
-3.12450       44         7.96954       54
-3.12450       43         8.87550       42
 
   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      8 9                        1     0        8.75+                                                *
      8 0                        1     0            |
      7                                             |                                            *
      7                                             |
      6                                             |                                                 ++
      6                                             |                                               ++
      5                                             |                                              +
      5 04                       2     |            |                                          * ++
      4                                |            |                                         *++
      4 00                       2     |            |                                        ++
      3 9                        1     |            |                                     ***
      3 0                        1     |            |                                    ++
      2 8                        1     |            |                                   +*
      2 034                      3     |        2.25+                                 +**
      1 589                      3     |            |                               +***
      1 22                       2  +-----+         |                             ++*
      0 556699                   6  |     |         |                           +***
      0 344                      3  |  +  |         |                         ++**
     -0 421                      3  |     |         |                        +**
     -0 55                       2  *-----*         |                      ++
     -1 100000                   6  |     |         |                    ++***
     -1 876665                   6  |     |         |                  ++**
     -2 421000                   6  +-----+         |               *****
     -2 8755                     4     |            |              *+
     -3 11110                    5     |            |        **  **+
     -3 6                        1     |            |      *    ++
     -4 0                        1     |       -4.25+  *      ++
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
                                                         -2        -1         0        +1        +2
 
 
 
247        proc sort data=FUMIGANT; by BLOCK FUMIGANT; run;
NOTE: There were 60 observations read from the data set WORK.FUMIGANT.
NOTE: The data set WORK.FUMIGANT has 60 observations and 5 variables.
NOTE: PROCEDURE SORT used:
      real time           0.04 seconds
      cpu time            0.04 seconds
247      !                                         OPTIONS PS=45 LS=88;
248        proc means data=FUMIGANT noprint; by BLOCK FUMIGANT; var WORMS;
249           output out=next4 n=n mean=mean var=var; run;
NOTE: There were 60 observations read from the data set WORK.FUMIGANT.
NOTE: The data set WORK.NEXT4 has 15 observations and 7 variables.
NOTE: PROCEDURE MEANS used:
      real time           0.04 seconds
      cpu time            0.04 seconds
250        proc plot data=next4; plot var*mean; run;
NOTE: There were 15 observations read from the data set WORK.NEXT4.
NOTE: The PROCEDURE PLOT printed page 33.
NOTE: PROCEDURE PLOT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
Univariate analysis for PROC MIXED - RBD with reps
 
                 Plot of var*mean.  Legend: A = 1 obs, B = 2 obs, etc.
var |
    |
 40 +
    |
    |
    |
    |
    |                                                         A
 30 +
    |
    |
    |
    |
    |
 20 +                                                                               A
    |
    |
    |            A               A
    |
    |                    B
 10 +
    |
    |                   A
    |         A                  A       A
    |                     A         A
    |             A   A A
  0 +
    |
    ---+----------+----------+----------+----------+----------+----------+----------+-
       2          4          6          8         10         12         14         16
                                            mean
 
 
251        PROC CHART DATA=FUMIGANT; OPTIONS PS=45 LS=88;
252           TITLE3 'Histogram of means for PROC MIXED - RBD with reps';
253           VBAR FUMIGANT / SUMVAR=WORMS TYPE=MEAN;  RUN;
NOTE: The PROCEDURE CHART printed page 34.
NOTE: PROCEDURE CHART used:
      real time           0.00 seconds
      cpu time            0.00 seconds
254        OPTIONS PS=256 LS=111;
 


Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
Histogram of means for PROC MIXED - RBD with reps
WORMS Mean
  |       *****
  |       *****
  |       *****
8 +       *****
  |       *****
  |       *****
  |       *****
6 +       *****
  |       *****       *****
  |       *****       *****       *****
  |       *****       *****       *****
4 +       *****       *****       *****
  |       *****       *****       *****
  |       *****       *****       *****
  |       *****       *****       *****
2 +       *****       *****       *****
  |       *****       *****       *****
  |       *****       *****       *****
  |       *****       *****       *****
  --------------------------------------------
            0           C           S
                    FUMIGANT
 
 
 
255        PROC mixed DATA=FUMIGANT cl COVTEST; CLASSES FUMIGANT BLOCK REP;
256            TITLE3 'ANOVA with PROC MIXED - RBD with reps - using Logarithms';
257          MODEL LWORMS = FUMIGANT / htype=3 DDFM=Satterthwaite outp=ResidDataP;
258          RANDOM BLOCK FUMIGANT*BLOCK;
259          lsmeans fumigant / pdiff ADJUST=DUNNETT diff=controll('0');
260          lsmeans fumigant / pdiff ADJUST=tukey;
261        RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 60 observations and 12 variables.
NOTE: The PROCEDURE MIXED printed page 35.
NOTE: PROCEDURE MIXED used:
      real time           0.18 seconds
      cpu time            0.18 seconds
261      !      QUIT;
 
 
 
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC MIXED - RBD with reps - using Logarithms
 
The Mixed Procedure
                  Model Information
Data Set                     WORK.FUMIGANT
Dependent Variable           LWORMS
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
              Class Level Information
Class       Levels    Values
FUMIGANT         3    0 C S
BLOCK            5    I II III IV V
REP              4    1 2 3 4
 
            Dimensions
Covariance Parameters             3
Columns in X                      4
Columns in Z                     20
Subjects                          1
Max Obs Per Subject              60
Observations Used                60
Observations Not Used             0
Total Observations               60
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1        88.06288591
        1              1        84.95995798      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                              Standard         Z
Cov Parm          Estimate       Error     Value      Pr Z   Alpha       Lower     Upper
BLOCK              0.02554     0.03624      0.70    0.2405    0.05    0.005068   27.2141
FUMIGANT*BLOCK     0.02017     0.03609      0.56    0.2881    0.05    0.003244   1200.67
Residual            0.1959     0.04131      4.74    <.0001    0.05      0.1348    0.3108
 
Fit Statistics
-2 Res Log Likelihood            85.0
AIC (smaller is better)          91.0
AICC (smaller is better)         91.4
BIC (smaller is better)          89.8
 
Type 3 Tests of Fixed Effects
              Num     Den
Effect         DF      DF    F Value    Pr > F
FUMIGANT        2       8       8.30    0.0112
 
                            Least Squares Means
                                    Standard
Effect      FUMIGANT    Estimate       Error      DF    t Value    Pr > |t|
FUMIGANT    0             2.2754      0.1376    10.5      16.53      <.0001
FUMIGANT    C             1.7076      0.1376    10.5      12.41      <.0001
FUMIGANT    S             1.6714      0.1376    10.5      12.14      <.0001
FUMIGANT    0             2.2754      0.1376    10.5      16.53      <.0001
FUMIGANT    C             1.7076      0.1376    10.5      12.41      <.0001
FUMIGANT    S             1.6714      0.1376    10.5      12.14      <.0001
 
                                  Differences of Least Squares Means
                                         Standard
Effect    FUMIGANT  _FUMIGANT  Estimate     Error    DF  t Value  Tails      Pr t  Adjustment     Adj P
FUMIGANT  0         C            0.5678    0.1663     8     3.41  Upper    0.0046  Dunnett-Hsu   0.0083
FUMIGANT  0         S            0.6040    0.1663     8     3.63  Upper    0.0033  Dunnett-Hsu   0.0061
FUMIGANT  0         C            0.5678    0.1663     8     3.41  Both     0.0092  Tukey-Kramer  0.0223
FUMIGANT  0         S            0.6040    0.1663     8     3.63  Both     0.0067  Tukey-Kramer  0.0163
FUMIGANT  C         S           0.03622    0.1663     8     0.22  Both     0.8331  Tukey-Kramer  0.9743
 


262        proc univariate data=ResidDataP plot normal; var resid;
263          TITLE3 'Univariate analysis for PROC MIXED on Logs - RBD with reps';
264        run;
NOTE: The PROCEDURE UNIVARIATE printed page 36.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.02 seconds
      cpu time            0.02 seconds
265        proc sort data=FUMIGANT; by BLOCK FUMIGANT; run;
NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used:
      real time           0.00 seconds
      cpu time            0.00 seconds
265      !                                            OPTIONS PS=45 LS=88;
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
Univariate analysis for PROC MIXED on Logs - RBD with reps
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          60    Sum Weights                 60
Mean                        0    Sum Observations             0
Std Deviation      0.41560217    Variance            0.17272516
Skewness           -0.5865127    Kurtosis            1.54273956
Uncorrected SS     10.1907847    Corrected SS        10.1907847
Coeff Variation             .    Std Error Mean      0.05365401
 
              Basic Statistical Measures
    Location                    Variability
Mean      0.00000     Std Deviation            0.41560
Median    0.02165     Variance                 0.17273
Mode     -0.41081     Range                    2.30259
                      Interquartile Range      0.47828
NOTE: The mode displayed is the smallest of 8 modes with a count of 2.
 
           Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M         1    Pr >= |M|   0.8974
Signed Rank    S        31    Pr >= |S|   0.8217
 
                   Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.971472    Pr < W      0.1722
Kolmogorov-Smirnov    D     0.058041    Pr > D     >0.1500
Cramer-von Mises      W-Sq  0.025185    Pr > W-Sq  >0.2500
Anderson-Darling      A-Sq  0.239627    Pr > A-Sq  >0.2500
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       0.831431
99%            0.831431
95%            0.643056
90%            0.588689
75% Q3         0.249212
50% Median     0.021650
25% Q1        -0.229068
10%           -0.481377
5%            -0.596016
1%            -1.471154
0% Min        -1.471154
 
            Extreme Observations
------Lowest------        ------Highest-----
    Value      Obs            Value      Obs
-1.471154       17         0.597013       58
-0.853315       11         0.618902       34
-0.606960       57         0.667211       44
-0.585071       33         0.732700        2
-0.540326        8         0.831431       18
 
   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      8 3                        1     |        0.85+                                             ++ *
      7 3                        1     |            |                                          ++*
      6 027                      3     |            |                                        +**
      5 99                       2     |            |                                     ***
      4 08                       2     |            |                                   +*+
      3 46678                    5     |            |                                 ****
      2 13555                    5  +-----+         |                              ***
      1 13558                    5  |     |         |                            ***
      0 2335669                  7  *--+--*         |                         ***
     -0 8853                     4  |     |         |                       **
     -1 7611100                  7  |     |         |                    ***
     -2 3331                     4  +-----+         |                 ****
     -3 3210                     4     |            |                **
     -4 5511                     4     |            |             **+
     -5 941                      3     |            |         * **
     -6 1                        1     |            |        *++
     -7                                |            |      +++
     -8 5                        1     |            |    ++*
     -9                                             | +++
    -10                                             |+
    -11                                             |
    -12                                             |
    -13                                             |
    -14 7                        1     0       -1.45+  *
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
    Multiply Stem.Leaf by 10**-1                         -2        -1         0        +1        +2
 
 
 
 
266        proc means data=FUMIGANT noprint; by BLOCK FUMIGANT; var LWORMS;
267           output out=next5 n=n mean=mean var=var; run;
NOTE: There were 60 observations read from the data set WORK.FUMIGANT.
NOTE: The data set WORK.NEXT5 has 15 observations and 7 variables.
NOTE: PROCEDURE MEANS used:
      real time           0.03 seconds
      cpu time            0.03 seconds
268        proc plot data=next5; plot var*mean;
269          TITLE3 'Variance/Mean plot for PROC MIXED on Logarithms - RBD with reps';
270        run;
271
272        OPTIONS PS=256 LS=111;
NOTE: There were 15 observations read from the data set WORK.NEXT5.
NOTE: The PROCEDURE PLOT printed page 37.
NOTE: PROCEDURE PLOT used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 


Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
Variance/Mean plot for PROC MIXED on Logarithms - RBD with reps
 
                 Plot of var*mean.  Legend: A = 1 obs, B = 2 obs, etc.
var |
1.0 +
    |
    |
    |    A
    |
    |
0.8 +
    |
    |
    |
    |
    |
0.6 +
    |
    |
    |
    |
    |
0.4 +
    |
    |                           B
    |        A
    |
    |                                       A
0.2 +
    |                           A                                      A
    |
    |                    A                     A
    |                                 A                 A                             A
    |                            A A               A
0.0 +
    |
    --+---------+---------+---------+---------+---------+---------+---------+---------+-
     1.2       1.4       1.6       1.8       2.0       2.2       2.4       2.6       2.8
                                            mean
 
 
 
 
 
273        PROC GLM DATA=FUMIGANT; CLASSES FUMIGANT BLOCK REP;
274            TITLE3 'ANOVA with PROC GLM - RBD with reps';
275          MODEL WORMS = FUMIGANT BLOCK FUMIGANT*BLOCK;
276          TEST H=FUMIGANT BLOCK E=FUMIGANT*BLOCK;
277          RANDOM FUMIGANT BLOCK FUMIGANT*BLOCK;
278          LSMEANS FUMIGANT BLOCK / pdiff stderr adjust=tukey;
279        RUN;
NOTE: TYPE I EMS not available without the E1 option.
279      !      QUIT;
NOTE: The PROCEDURE GLM printed pages 38-42.
NOTE: PROCEDURE GLM used:
      real time           0.13 seconds
      cpu time            0.12 seconds
 


Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC GLM - RBD with reps
The GLM Procedure
       Class Level Information
Class         Levels    Values
FUMIGANT           3    0 C S
BLOCK              5    I II III IV V
REP                4    1 2 3 4
Number of observations    60
 
Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC GLM - RBD with reps
 
The GLM Procedure
Dependent Variable: WORMS
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                       14      640.833333       45.773810       5.03    <.0001
Error                       45      409.750000        9.105556
Corrected Total             59     1050.583333
 
R-Square     Coeff Var      Root MSE    WORMS Mean
0.609979      45.83607      3.017541      6.583333
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
FUMIGANT                     2     293.4333333     146.7166667      16.11    <.0001
BLOCK                        4     151.1666667      37.7916667       4.15    0.0060
FUMIGANT*BLOCK               8     196.2333333      24.5291667       2.69    0.0164
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
FUMIGANT                     2     293.4333333     146.7166667      16.11    <.0001
BLOCK                        4     151.1666667      37.7916667       4.15    0.0060
FUMIGANT*BLOCK               8     196.2333333      24.5291667       2.69    0.0164
 
   Tests of Hypotheses Using the Type III MS for FUMIGANT*BLOCK as an Error Term
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
FUMIGANT                     2     293.4333333     146.7166667       5.98    0.0258
BLOCK                        4     151.1666667      37.7916667       1.54    0.2790
 
Source                  Type III Expected Mean Square
FUMIGANT                Var(Error) + 4 Var(FUMIGANT*BLOCK) + 20 Var(FUMIGANT)
BLOCK                   Var(Error) + 4 Var(FUMIGANT*BLOCK) + 12 Var(BLOCK)
FUMIGANT*BLOCK          Var(Error) + 4 Var(FUMIGANT*BLOCK)
 
Least Squares Means
Adjustment for Multiple Comparisons: Tukey
                                Standard                  LSMEAN
FUMIGANT    WORMS LSMEAN           Error    Pr > |t|      Number
0             9.70000000      0.67474275      <.0001           1
C             5.25000000      0.67474275      <.0001           2
S             4.80000000      0.67474275      <.0001           3
 
   Least Squares Means for effect FUMIGANT
     Pr > |t| for H0: LSMean(i)=LSMean(j)
          Dependent Variable: WORMS
i/j              1             2             3
   1                      <.0001        <.0001
   2        <.0001                      0.8850
   3        <.0001        0.8850


Number of wire worms found for 2 fumigants and a control
Fumigants are C and S, control is 0, 5 BLOCKS
ANOVA with PROC GLM - RBD with reps
The GLM Procedure
Least Squares Means
Adjustment for Multiple Comparisons: Tukey
                             Standard                  LSMEAN
BLOCK    WORMS LSMEAN           Error    Pr > |t|      Number
I          6.41666667      0.87108914      <.0001           1
II         4.50000000      0.87108914      <.0001           2
III        6.16666667      0.87108914      <.0001           3
IV         9.41666667      0.87108914      <.0001           4
V          6.41666667      0.87108914      <.0001           5
 
                   Least Squares Means for effect BLOCK
                   Pr > |t| for H0: LSMean(i)=LSMean(j)
                        Dependent Variable: WORMS
i/j              1             2             3             4             5
   1                      0.5327        0.9996        0.1246        1.0000
   2        0.5327                      0.6602        0.0021        0.5327
   3        0.9996        0.6602                      0.0803        0.9996
   4        0.1246        0.0021        0.0803                      0.1246
   5        1.0000        0.5327        0.9996        0.1246


 
282        **EXAMPLE 6********************************************;
283        *** Example of Latin Square Design                  ***;
284        *** From Snedecor & Cochran, 1980 (pg 271)          ***;
285        *******************************************************;
286        OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
287        DATA MILLET; INFILE CARDS MISSOVER;
288           INPUT ROW COLUMN treatment $ YIELD;
289           TITLE1 'LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS';
290           TITLE2 'MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES';
291        CARDS;
NOTE: The data set WORK.MILLET has 25 observations and 4 variables.
NOTE: DATA statement used:
      real time           0.03 seconds
      cpu time            0.03 seconds
291      !        RUN;
317        ;
318        PROC SORT; BY ROW COLUMN;
NOTE: There were 25 observations read from the data set WORK.MILLET.
NOTE: The data set WORK.MILLET has 25 observations and 4 variables.
NOTE: PROCEDURE SORT used:
      real time           0.04 seconds
      cpu time            0.04 seconds
319        PROC PRINT;  VAR ROW COLUMN treatment YIELD; RUN;
NOTE: There were 25 observations read from the data set WORK.MILLET.
NOTE: The PROCEDURE PRINT printed page 43.
NOTE: PROCEDURE PRINT used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 
LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
 

Obs    ROW    COLUMN    treatment    YIELD
  1     1        1          B         257
  2     1        2          E         230
  3     1        3          A         279
  4     1        4          C         287
  5     1        5          D         202
  6     2        1          D         245
  7     2        2          A         283
  8     2        3          E         245
  9     2        4          B         280
 10     2        5          C         260
 11     3        1          E         182
 12     3        2          B         252
 13     3        3          C         280
 14     3        4          D         246
 15     3        5          A         250
 16     4        1          A         203
 17     4        2          C         204
 18     4        3          D         227
 19     4        4          E         193
 20     4        5          B         259
 21     5        1          C         231
 22     5        2          D         271
 23     5        3          B         266
 24     5        4          A         334
 25     5        5          E         338


 
 
320        PROC MIXED DATA=MILLET cl COVTEST; CLASSES ROW COLUMN treatment;
321          TITLE3 'ANOVA with PROC MIXED - Latin Square';
322          TITLE4 'Post-ANOVA tests will be done later with contrasts';
323          MODEL YIELD = treatment / htype=3 DDFM=Satterthwaite outp=ResidDataP;
324          RANDOM ROW COLUMN;
325        RUN;
NOTE: Convergence criteria met.
NOTE: The data set WORK.RESIDDATAP has 25 observations and 11 variables.
NOTE: The PROCEDURE MIXED printed page 44.
NOTE: PROCEDURE MIXED used:
      real time           0.15 seconds
      cpu time            0.15 seconds
325      !      QUIT;
 


LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC MIXED - Latin Square
Post-ANOVA tests will be done later with contrasts
The Mixed Procedure
                  Model Information
Data Set                     WORK.MILLET
Dependent Variable           YIELD
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Satterthwaite
 
               Class Level Information
Class        Levels    Values
ROW               5    1 2 3 4 5
COLUMN            5    1 2 3 4 5
treatment         5    A B C D E
 
            Dimensions
Covariance Parameters             3
Columns in X                      6
Columns in Z                     10
Subjects                          1
Max Obs Per Subject              25
Observations Used                25
Observations Not Used             0
Total Observations               25
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1       212.61749317
        1              1       210.22285841      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                         Standard         Z
Cov Parm     Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
ROW            468.95      488.54      0.96      0.1686      0.05      122.70       24267
COLUMN        96.1867      233.77      0.41      0.3404      0.05     11.8899    7.401E10
Residual      1055.61      430.95      2.45      0.0072      0.05      542.81     2876.45
 
Fit Statistics
-2 Res Log Likelihood           210.2
AIC (smaller is better)         216.2
AICC (smaller is better)        217.7
BIC (smaller is better)         215.1
 
Type 3 Tests of Fixed Effects
              Num     Den
Effect         DF      DF    F Value    Pr > F
treatment       4      12       0.98    0.4523
 
 
 
326        proc univariate data=ResidDataP plot normal; var resid; run;
NOTE: The PROCEDURE UNIVARIATE printed page 45.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.02 seconds
      cpu time            0.02 seconds
 


LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC MIXED - Latin Square
Post-ANOVA tests will be done later with contrasts
 
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          25    Sum Weights                 25
Mean                        0    Sum Observations             0
Std Deviation       26.519579    Variance            703.288072
Skewness            0.5867556    Kurtosis            0.94966715
Uncorrected SS     16878.9137    Corrected SS        16878.9137
Coeff Variation             .    Std Error Mean      5.30391581
 
Basic Statistical Measures
    Location                    Variability
Mean     0.000000     Std Deviation           26.51958
Median   3.939099     Variance               703.28807
Mode      .           Range                  112.32380
                      Interquartile Range     32.83900
 
Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M       0.5    Pr >= |M|   1.0000
Signed Rank    S       0.5    Pr >= |S|   0.9896
 
Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.942024    Pr < W      0.1648
Kolmogorov-Smirnov    D      0.14412    Pr > D     >0.1500
Cramer-von Mises      W-Sq  0.071451    Pr > W-Sq  >0.2500
Anderson-Darling      A-Sq  0.461065    Pr > A-Sq   0.2428
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       72.66893
99%            72.66893
95%            34.52834
90%            32.33981
75% Q3          9.84803
50% Median      3.93910
25% Q1        -22.99096
10%           -37.17456
5%            -38.41741
1%            -39.65487
0% Min        -39.65487
 
           Extreme Observations
------Lowest-----        -----Highest-----
   Value      Obs           Value      Obs
-39.6549       11         17.2897       20
-38.4174        5         30.4420        4
-37.1746       21         32.3398       13
-33.7538       16         34.5283       24
-25.4509       19         72.6689       25
 


   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      6 3                        1     0          70+                                             *  +++
      4                                             |                                         +++++++
      2 025                      3     |            |                                 +++*+*+*
      0 457899017                9  +--+--+       10+                         *******+**
     -0 65322                    5  |     |         |                  ++*****
     -2 874543                   6  +-----+         |     *    *+*+*+** *
     -4 0                        1     |         -50+   +++++++
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
    Multiply Stem.Leaf by 10**+1                         -2        -1         0        +1        +2
 
 
 
327        proc sort data=MILLET; by treatment; run; OPTIONS PS=45 LS=88;
NOTE: There were 25 observations read from the data set WORK.MILLET.
NOTE: The data set WORK.MILLET has 25 observations and 4 variables.
NOTE: PROCEDURE SORT used:
      real time           0.04 seconds      cpu time            0.04 seconds
328        proc means data=MILLET noprint; by treatment; var YIELD;
329           output out=next6 n=n mean=mean var=var; run;
NOTE: There were 25 observations read from the data set WORK.MILLET.
NOTE: The data set WORK.NEXT6 has 5 observations and 6 variables.
NOTE: PROCEDURE MEANS used:
      real time           0.04 seconds      cpu time            0.04 seconds
330        proc plot data=next6; plot var*mean; run;
NOTE: There were 5 observations read from the data set WORK.NEXT6.
NOTE: The PROCEDURE PLOT printed page 46.
NOTE: PROCEDURE PLOT used:
      real time           0.01 seconds      cpu time            0.01 seconds
 
LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC MIXED - Latin Square
Post-ANOVA tests will be done later with contrasts
 
                 Plot of var*mean.  Legend: A = 1 obs, B = 2 obs, etc.
 var |
     |
4000 +
     |        A
     |
     |
     |
     |
     |
3000 +
     |
     |
     |
     |
     |                                                                               A
     |
2000 +
     |
     |
     |
     |
     |
     |                                        A
1000 +
     |
     |         A
     |
     |
     |
     |                                                               A
   0 +
     |
     ---+----------+----------+----------+----------+----------+----------+----------+--
       235        240        245        250        255        260        265        270
                                             mean
 
 


331        PROC CHART DATA=MILLET; OPTIONS PS=45 LS=78;
332           TITLE3 'Histogram of mean number Millet yield by row spacing';
333           VBAR treatment / SUMVAR=YIELD TYPE=MEAN;  RUN;
NOTE: The PROCEDURE CHART printed page 47.
NOTE: PROCEDURE CHART used:
      real time           0.01 seconds
      cpu time            0.01 seconds
334
 
LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
Histogram of mean number Millet yield by row spacing
YIELD Mean
    |       *****
    |       *****       *****
250 +       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
200 +       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
150 +       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
100 +       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
 50 +       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    |       *****       *****       *****       *****       *****
    --------------------------------------------------------------------
              A           B           C           D           E
                                  treatment
 
 
 
 
335        OPTIONS PS=256 LS=78;
336        PROC GLM DATA=MILLET; CLASSES ROW COLUMN treatment;
337          TITLE3 'ANOVA with PROC GLM - Latin Square';
338          MODEL YIELD = ROW COLUMN treatment;
339          RANDOM ROW COLUMN;
340        RUN;
NOTE: TYPE I EMS not available without the E1 option.
340      !      QUIT;
NOTE: The PROCEDURE GLM printed pages 48-50.
NOTE: PROCEDURE GLM used:
      real time           0.09 seconds
      cpu time            0.09 seconds


LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC GLM - Latin Square
The GLM Procedure
      Class Level Information
Class          Levels    Values
ROW                 5    1 2 3 4 5
COLUMN              5    1 2 3 4 5
treatment           5    A B C D E
 
Number of observations    25
 
 
 
LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC GLM - Latin Square
 
The GLM Procedure
Dependent Variable: YIELD
                                      Sum of
Source                     DF        Squares    Mean Square   F Value   Pr > F
Model                      12    23904.08000     1992.00667      1.89   0.1426
Error                      12    12667.28000     1055.60667
Corrected Total            24    36571.36000
 
R-Square     Coeff Var      Root MSE    YIELD Mean
0.653628      12.88472      32.49010      252.1600
 
Source                     DF      Type I SS    Mean Square   F Value   Pr > F
ROW                         4    13601.36000     3400.34000      3.22   0.0516
COLUMN                      4     6146.16000     1536.54000      1.46   0.2758
treatment                   4     4156.56000     1039.14000      0.98   0.4523
 
Source                     DF    Type III SS    Mean Square   F Value   Pr > F
ROW                         4    13601.36000     3400.34000      3.22   0.0516
COLUMN                      4     6146.16000     1536.54000      1.46   0.2758
treatment                   4     4156.56000     1039.14000      0.98   0.4523
 
LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS
MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES
ANOVA with PROC GLM - Latin Square
The GLM Procedure
Source                  Type III Expected Mean Square
ROW                     Var(Error) + 5 Var(ROW)
COLUMN                  Var(Error) + 5 Var(COLUMN)
treatment               Var(Error) + Q(treatment)


345        **EXAMPLE 7********************************************;
346        *** Example of a series of Latin Squares            ***;
347        *** From my imagination                             ***;
348        *******************************************************;
349        OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER;
350
351        data series;
352           Title1 'Example of a series of Latin Squares';
353        input square row col tmt $ y;
354        cards;
NOTE: The data set WORK.SERIES has 18 observations and 5 variables.
NOTE: DATA statement used:
      real time           0.02 seconds
      cpu time            0.02 seconds
373        ;
374        proc print data=series; run;
NOTE: There were 18 observations read from the data set WORK.SERIES.
NOTE: The PROCEDURE PRINT printed page 51.
NOTE: PROCEDURE PRINT used:
      real time           0.01 seconds
      cpu time            0.01 seconds
 
Example of a series of Latin Squares
Obs    square    row    col    tmt    y
  1       1       1      1      d     7
  2       1       1      2      b     5
  3       1       1      3      c     2
  4       1       2      1      b     9
  5       1       2      2      c     3
  6       1       2      3      d     6
  7       1       3      1      c     1
  8       1       3      2      d     6
  9       1       3      3      b     7
 10       2       1      1      c     2
 11       2       1      2      d     3
 12       2       1      3      b     7
 13       2       2      1      d     6
 14       2       2      2      b     9
 15       2       2      3      c     3
 16       2       3      1      b     8
 17       2       3      2      c     2
 18       2       3      3      d     6
 
 
 
 
375        proc mixed data=series CL COVTEST; classes square row col tmt;
376             Title2 'ANOVA with PROC MIXED - Series of Latin Squares';
377             model y = tmt / outp=ResidDataP;
378             random square row(square) col(square) tmt*square;
379             LSMEANS tmt / pdiff adjust=tukey;
380        run;
NOTE: Convergence criteria met.
NOTE: Estimated G matrix is not positive definite.
NOTE: The data set WORK.RESIDDATAP has 18 observations and 12 variables.
NOTE: The PROCEDURE MIXED printed page 52.
NOTE: PROCEDURE MIXED used:
      real time           0.20 seconds
      cpu time            0.20 seconds
 


Example of a series of Latin Squares
ANOVA with PROC MIXED - Series of Latin Squares
The Mixed Procedure
                  Model Information
Data Set                     WORK.SERIES
Dependent Variable           y
Covariance Structure         Variance Components
Estimation Method            REML
Residual Variance Method     Profile
Fixed Effects SE Method      Model-Based
Degrees of Freedom Method    Containment
 
             Class Level Information
Class     Levels    Values
square         2    1 2
row            3    1 2 3
col            3    1 2 3
tmt            3    b c d
 
            Dimensions
Covariance Parameters             5
Columns in X                      4
Columns in Z                     20
Subjects                          1
Max Obs Per Subject              18
Observations Used                18
Observations Not Used             0
Total Observations               18
 
                     Iteration History
Iteration    Evaluations    -2 Res Log Like       Criterion
        0              1        54.78369521
        1              2        54.53562480      0.00005865
        2              1        54.53481396      0.00000009
        3              1        54.53481275      0.00000000
                   Convergence criteria met.
 
Covariance Parameter Estimates
                            Standard         Z
Cov Parm        Estimate       Error     Value        Pr Z     Alpha       Lower       Upper
square                 0           .       .         .             .           .           .
row(square)       0.2433      0.5129      0.47      0.3176      0.05     0.03387     1079099
col(square)            0           .       .         .             .           .           .
square*tmt        0.1099      0.5327      0.21      0.4183      0.05    0.009602    3.445E35
Residual          1.2822      0.7115      1.80      0.0358      0.05      0.5468      5.7192
 
Fit Statistics
-2 Res Log Likelihood            54.5
AIC (smaller is better)          60.5
AICC (smaller is better)         62.7
BIC (smaller is better)          56.6
 
Type 3 Tests of Fixed Effects
Effect     Num DF  Den DF    F Value    Pr > F
tmt             2       2      27.33    0.0353
 
Least Squares Means
Effect    tmt    Estimate   Std Error      DF    t Value    Pr > |t|
tmt       b        7.5000      0.5561       2      13.49      0.0055
tmt       c        2.1667      0.5561       2       3.90      0.0600
tmt       d        5.6667      0.5561       2      10.19      0.0095


Differences of Least Squares Means
                                     Standard
Effect    tmt    _tmt    Estimate       Error      DF    t Value    Pr > |t|    Adjustment       Adj P
tmt       b      c         5.3333      0.7330       2       7.28      0.0184    Tukey-Kramer    0.0334
tmt       b      d         1.8333      0.7330       2       2.50      0.1295    Tukey-Kramer    0.2258
tmt       c      d        -3.5000      0.7330       2      -4.77      0.0412    Tukey-Kramer    0.0742
 
381        proc univariate data=ResidDataP plot normal; var resid;
382          TITLE3 'Univariate analysis for PROC MIXED - Series of Latin Squares';
383        run;
NOTE: The PROCEDURE UNIVARIATE printed page 53.
NOTE: PROCEDURE UNIVARIATE used:
      real time           0.03 seconds
      cpu time            0.03 seconds
 
Example of a series of Latin Squares
ANOVA with PROC MIXED - Series of Latin Squares
Univariate analysis for PROC MIXED - Series of Latin Squares
 
The UNIVARIATE Procedure
Variable:  Resid
                            Moments
N                          18    Sum Weights                 18
Mean                        0    Sum Observations             0
Std Deviation      0.97821613    Variance             0.9569068
Skewness           -1.0965374    Kurtosis            1.33159688
Uncorrected SS     16.2674156    Corrected SS        16.2674156
Coeff Variation             .    Std Error Mean      0.23056775
 
Basic Statistical Measures
    Location                    Variability
Mean     0.000000     Std Deviation            0.97822
Median   0.174784     Variance                 0.95691
Mode      .           Range                    3.59468
                      Interquartile Range      0.71323
 
Tests for Location: Mu0=0
Test           -Statistic-    -----p Value------
Student's t    t         0    Pr > |t|    1.0000
Sign           M         2    Pr >= |M|   0.4807
Signed Rank    S      18.5    Pr >= |S|   0.4423
 
Tests for Normality
Test                  --Statistic---    -----p Value------
Shapiro-Wilk          W     0.884881    Pr < W      0.0316
Kolmogorov-Smirnov    D     0.220142    Pr > D      0.0211
Cramer-von Mises      W-Sq  0.130755    Pr > W-Sq   0.0405
Anderson-Darling      A-Sq  0.803675    Pr > A-Sq   0.0313
 
Quantiles (Definition 5)
Quantile       Estimate
100% Max       1.358201
99%            1.358201
95%            1.358201
90%            1.279796
75% Q3         0.476755
50% Median     0.174784
25% Q1        -0.236477
10%           -2.127186
5%            -2.236477
1%            -2.236477
0% Min        -2.236477


            Extreme Observations
------Lowest------        ------Highest-----
    Value      Obs            Value      Obs
-2.236477        2         0.476755       15
-2.127186       11         0.544942        5
-0.971331        7         1.075234       14
-0.281382       17         1.279796        4
-0.236477        9         1.358201        1
 
   Stem Leaf                     #  Boxplot                        Normal Probability Plot
      1 134                      3     |        1.25+                                    *+*++  *
      0 55                       2  +-----+         |                               ++*++
      0 012344                   6  *--+--*         |                       **+**+** *
     -0 3221                     4  +-----+         |                 ** **+++
     -0                                |            |              *+++++
     -1 0                        1     |            |          +++++
     -1                                             |     +++++
     -2 21                       2     0       -2.25++++++  *    *
        ----+----+----+----+                         +----+----+----+----+----+----+----+----+----+----+
                                                         -2        -1         0        +1        +2
 
386        proc glm data=series; classes square row col tmt;
387            Title2 'ANOVA with PROC GLM - Series of Latin Squares with PROC GLM';
388             model y = square row(square) col(square) tmt tmt*square;
389             random square row(square) col(square) tmt*square / test;
390        run;
NOTE: TYPE I EMS not available without the E1 option.
391
NOTE: The PROCEDURE GLM printed pages 54-57.
NOTE: PROCEDURE GLM used:
      real time           0.08 seconds
      cpu time            0.08 seconds
 
 
 
Example of a series of Latin Squares
ANOVA with PROC GLM - Series of Latin Squares with PROC GLM
The GLM Procedure
   Class Level Information
Class         Levels    Values
square             2    1 2
row                3    1 2 3
col                3    1 2 3
tmt                3    b c d
Number of observations    18
 
Dependent Variable: y
                                        Sum of
Source                      DF         Squares     Mean Square    F Value    Pr > F
Model                       13     104.6666667       8.0512821       4.53    0.0780
Error                        4       7.1111111       1.7777778
Corrected Total             17     111.7777778
 
R-Square     Coeff Var      Root MSE        y Mean
0.936382      26.08696      1.333333      5.111111
 
Source                      DF       Type I SS     Mean Square    F Value    Pr > F
square                       1      0.00000000      0.00000000       0.00    1.0000
row(square)                  4      9.77777778      2.44444444       1.38    0.3826
col(square)                  4      2.44444444      0.61111111       0.34    0.8372
tmt                          2     88.11111111     44.05555556      24.78    0.0056
square*tmt                   2      4.33333333      2.16666667       1.22    0.3861
 


Source                      DF     Type III SS     Mean Square    F Value    Pr > F
square                       1      0.00000000      0.00000000       0.00    1.0000
row(square)                  4      9.77777778      2.44444444       1.38    0.3826
col(square)                  4      2.44444444      0.61111111       0.34    0.8372
tmt                          2     88.11111111     44.05555556      24.78    0.0056
square*tmt                   2      4.33333333      2.16666667       1.22    0.3861
 
Source                 Type III Expected Mean Square
square                 Var(Error) + 3 Var(square*tmt) + 3 Var(col(square))
                                  + 3 Var(row(square)) + 9 Var(square)
row(square)            Var(Error) + 3 Var(row(square))
col(square)            Var(Error) + 3 Var(col(square))
tmt                    Var(Error) + 3 Var(square*tmt) + Q(tmt)
square*tmt             Var(Error) + 3 Var(square*tmt)
 
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: y
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
square                       1    7.345736E-31    7.345736E-31       0.00    1.0000
Error                   0.3915        0.652529        1.666667
Error: MS(row(square)) + MS(col(square)) + MS(square*tmt) - 2*MS(Error)
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
row(square)                  4        9.777778        2.444444       1.38    0.3826
col(square)                  4        2.444444        0.611111       0.34    0.8372
square*tmt                   2        4.333333        2.166667       1.22    0.3861
Error: MS(Error)             4        7.111111        1.777778
 
Source                      DF     Type III SS     Mean Square    F Value    Pr > F
tmt                          2       88.111111       44.055556      20.33    0.0469
Error                        2        4.333333        2.166667
Error: MS(square*tmt)
 


Modified: August 16, 2004
James P. Geaghan