MANOVA CRF-32 Example
Same data as Assignment 8

data crf32;
input a b y1 y2;
cards;
1 1 10 21
1 1 12 22
1 1  9 19
1 1 10 21
1 1 14 23
1 2  9 14
1 2  8 15
1 2 11 16
1 2  9 17
1 2  9 17
2 1 11 23
2 1 14 27
2 1 13 24
2 1 15 26
2 1 14 24
2 2 11 15
2 2 12 18
2 2 10 16
2 2  9 17
2 2  9 18
3 1  8 17
3 1  7 15
3 1 10 18
3 1  8 17
3 1  7 19
3 2  9 22
3 2  8 18
3 2 10 17
3 2  9 19
3 2  8 19
;
proc glm; classes a b;
  model y1 y2 = a b a*b;
  contrast '1vs2' a 1 -1  0;
  contrast '1vs3' a 1  0 -1;
  contrast '2vs3' a 0  1 -1;
  manova h=a b a*b;
run;

----------------------------------------------------------------------------

                      General Linear Models Procedure
                          Class Level Information

                         Class    Levels    Values
                         A             3    1 2 3
                         B             2    1 2

                  Number of observations in data set = 30


                      General Linear Models Procedure

Dependent Variable: Y1
                                   Sum of          Mean
Source                  DF        Squares        Square  F Value    Pr > F
Model                    5     93.1000000    18.6200000     9.80    0.0001
Error                   24     45.6000000     1.9000000
Corrected Total         29    138.7000000

                  R-Square           C.V.      Root MSE            Y1 Mean
                  0.671233       13.64757       1.37840            10.1000

                      General Linear Models Procedure

Dependent Variable: Y1

Source                  DF      Type I SS   Mean Square  F Value    Pr > F
A                        2     57.8000000    28.9000000    15.21    0.0001
B                        1     14.7000000    14.7000000     7.74    0.0104
A*B                      2     20.6000000    10.3000000     5.42    0.0114

Source                  DF    Type III SS   Mean Square  F Value    Pr > F
A                        2     57.8000000    28.9000000    15.21    0.0001
B                        1     14.7000000    14.7000000     7.74    0.0104
A*B                      2     20.6000000    10.3000000     5.42    0.0114

Contrast                DF    Contrast SS   Mean Square  F Value    Pr > F
1vs2                     1     14.4500000    14.4500000     7.61    0.0109
1vs3                     1     14.4500000    14.4500000     7.61    0.0109
2vs3                     1     57.8000000    57.8000000    30.42    0.0001

                      General Linear Models Procedure

Dependent Variable: Y2
                                   Sum of          Mean
Source                  DF        Squares        Square  F Value    Pr > F
Model                    5     283.466667     56.693333    24.30    0.0001
Error                   24      56.000000      2.333333
Corrected Total         29     339.466667

                  R-Square           C.V.      Root MSE            Y2 Mean
                  0.835035       7.983581       1.52753            19.1333

                      General Linear Models Procedure

Dependent Variable: Y2

Source                  DF      Type I SS   Mean Square  F Value    Pr > F
A                        2      42.466667     21.233333     9.10    0.0011
B                        1     112.133333    112.133333    48.06    0.0001
A*B                      2     128.866667     64.433333    27.61    0.0001

Source                  DF    Type III SS   Mean Square  F Value    Pr > F
A                        2      42.466667     21.233333     9.10    0.0011
B                        1     112.133333    112.133333    48.06    0.0001
A*B                      2     128.866667     64.433333    27.61    0.0001

Contrast                DF    Contrast SS   Mean Square  F Value    Pr > F
1vs2                     1     26.4500000    26.4500000    11.34    0.0026
1vs3                     1      0.8000000     0.8000000     0.34    0.5637
2vs3                     1     36.4500000    36.4500000    15.62    0.0006


                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
         H = Type III SS&CP Matrix for A   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          1.44074791     92.81            0.11533443     0.05243270
          0.11166794      7.19           -0.11227282     0.13544994

                     Multivariate Analysis of Variance

              Manova Test Criteria and F Approximations for
                   the Hypothesis of no Overall A Effect
         H = Type III SS&CP Matrix for A   E = Error SS&CP Matrix

                          S=2    M=-0.5    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.36855473     7.4429         4        46  0.0001
Pillai's Trace            0.69074032     6.3310         4        48  0.0004
Hotelling-Lawley Trace    1.55241585     8.5383         4        44  0.0001
Roy's Greatest Root       1.44074791    17.2890         2        24  0.0001

       NOTE: F Statistic for Roy's Greatest Root is an upper bound.
               NOTE: F Statistic for Wilks' Lambda is exact.

                      General Linear Models Procedure
                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
         H = Type III SS&CP Matrix for B   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          2.00259072    100.00            0.00164735     0.13304117
          0.00000000      0.00            0.16094875    -0.05827455

                     Multivariate Analysis of Variance

             Manova Test Criteria and Exact F Statistics for
                   the Hypothesis of no Overall B Effect
         H = Type III SS&CP Matrix for B   E = Error SS&CP Matrix

                           S=1    M=0    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.33304572    23.0298         2        23  0.0001
Pillai's Trace            0.66695428    23.0298         2        23  0.0001
Hotelling-Lawley Trace    2.00259072    23.0298         2        23  0.0001
Roy's Greatest Root       2.00259072    23.0298         2        23  0.0001


                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
        H = Type III SS&CP Matrix for A*B   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          2.30781925     99.80            0.00863494     0.13038512
          0.00460326      0.20            0.16072540    -0.06399685


                     Multivariate Analysis of Variance

              Manova Test Criteria and F Approximations for
                  the Hypothesis of no Overall A*B Effect
        H = Type III SS&CP Matrix for A*B   E = Error SS&CP Matrix

                          S=2    M=-0.5    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.30092873     9.4636         4        46  0.0001
Pillai's Trace            0.70226819     6.4938         4        48  0.0003
Hotelling-Lawley Trace    2.31242251    12.7183         4        44  0.0001
Roy's Greatest Root       2.30781925    27.6938         2        24  0.0001

       NOTE: F Statistic for Roy's Greatest Root is an upper bound.
               NOTE: F Statistic for Wilks' Lambda is exact.

                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
        H = Contrast SS&CP Matrix for 1vs2   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          0.57418716    100.00            0.06779500     0.09722835
          0.00000000      0.00           -0.14598306     0.10790052


                     Multivariate Analysis of Variance

             Manova Test Criteria and Exact F Statistics for
                 the Hypothesis of no Overall 1vs2 Effect
        H = Contrast SS&CP Matrix for 1vs2   E = Error SS&CP Matrix

                           S=1    M=0    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.63524848     6.6032         2        23  0.0054
Pillai's Trace            0.36475152     6.6032         2        23  0.0054
Hotelling-Lawley Trace    0.57418716     6.6032         2        23  0.0054
Roy's Greatest Root       0.57418716     6.6032         2        23  0.0054

                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
        H = Contrast SS&CP Matrix for 1vs3   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          0.32894761    100.00            0.15742332    -0.02781242
          0.00000000      0.00           -0.03354270     0.14255646


                     Multivariate Analysis of Variance

             Manova Test Criteria and Exact F Statistics for
                 the Hypothesis of no Overall 1vs3 Effect
        H = Contrast SS&CP Matrix for 1vs3   E = Error SS&CP Matrix

                           S=1    M=0    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.75247511     3.7829         2        23  0.0380
Pillai's Trace            0.24752489     3.7829         2        23  0.0380
Hotelling-Lawley Trace    0.32894761     3.7829         2        23  0.0380
Roy's Greatest Root       0.32894761     3.7829         2        23  0.0380

                     Multivariate Analysis of Variance

         Characteristic Roots and Vectors of: E Inverse * H, where
        H = Contrast SS&CP Matrix for 2vs3   E = Error SS&CP Matrix

      Characteristic   Percent        Characteristic Vector  V'EV=1
           Root
                                                  Y1             Y2
          1.42548900    100.00            0.11864955     0.04834705
          0.00000000      0.00           -0.10876350     0.13696145


                     Multivariate Analysis of Variance

             Manova Test Criteria and Exact F Statistics for
                 the Hypothesis of no Overall 2vs3 Effect
        H = Contrast SS&CP Matrix for 2vs3   E = Error SS&CP Matrix

                           S=1    M=0    N=10.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.41228800    16.3931         2        23  0.0001
Pillai's Trace            0.58771200    16.3931         2        23  0.0001
Hotelling-Lawley Trace    1.42548900    16.3931         2        23  0.0001
Roy's Greatest Root       1.42548900    16.3931         2        23  0.0001