MANOVA CRF-32 GLM 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 m=(1 -1, 1 1);
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
Dependent Variable: Y1
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 5 93.10000000 18.62000000 9.80 0.0001
Error 24 45.60000000 1.90000000
Corrected Total 29 138.70000000
R-Square C.V. Root MSE Y1 Mean
0.671233 13.64757 1.3784049 10.100000
Dependent Variable: Y1
Source DF Type I SS Mean Square F Value Pr > F
A 2 57.80000000 28.90000000 15.21 0.0001
B 1 14.70000000 14.70000000 7.74 0.0104
A*B 2 20.60000000 10.30000000 5.42 0.0114
Source DF Type III SS Mean Square F Value Pr > F
A 2 57.80000000 28.90000000 15.21 0.0001
B 1 14.70000000 14.70000000 7.74 0.0104
A*B 2 20.60000000 10.30000000 5.42 0.0114
Contrast DF Contrast SS Mean Square F Value Pr > F
1vs2 1 14.45000000 14.45000000 7.61 0.0109
1vs3 1 14.45000000 14.45000000 7.61 0.0109
2vs3 1 57.80000000 57.80000000 30.42 0.0001
Dependent Variable: Y2
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 5 283.46666667 56.69333333 24.30 0.0001
Error 24 56.00000000 2.33333333
Corrected Total 29 339.46666667
R-Square C.V. Root MSE Y2 Mean
0.835035 7.983581 1.5275252 19.133333
Dependent Variable: Y2
Source DF Type I SS Mean Square F Value Pr > F
A 2 42.46666667 21.23333333 9.10 0.0011
B 1 112.13333333 112.13333333 48.06 0.0001
A*B 2 128.86666667 64.43333333 27.61 0.0001
Source DF Type III SS Mean Square F Value Pr > F
A 2 42.46666667 21.23333333 9.10 0.0011
B 1 112.13333333 112.13333333 48.06 0.0001
A*B 2 128.86666667 64.43333333 27.61 0.0001
Contrast DF Contrast SS Mean Square F Value Pr > F
1vs2 1 26.45000000 26.45000000 11.34 0.0026
1vs3 1 0.80000000 0.80000000 0.34 0.5637
2vs3 1 36.45000000 36.45000000 15.62 0.0006
General Linear Models Procedure
Multivariate Analysis of Variance
M Matrix Describing Transformed Variables
Y1 Y2
MVAR1 1 -1
MVAR2 1 1
Characteristic Roots and Vectors of: E Inverse * H, where
H = Type III SS&CP Matrix for A E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
1.44074791 92.81 0.03145086 0.08388356
0.11166794 7.19 0.12386138 -0.01158856
Manova Test Criteria and F Approximations for
the Hypothesis of no Overall A Effect
on the variables defined by the M Matrix Transformation
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.
Characteristic Roots and Vectors of: E Inverse * H, where
H = Type III SS&CP Matrix for B E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
2.00259072 100.00 0.06569691 -0.06734426
0.00000000 0.00 0.10961165 0.05133710
Manova Test Criteria and Exact F Statistics for
the Hypothesis of no Overall B Effect
on the variables defined by the M Matrix Transformation
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
Characteristic Roots and Vectors of: E Inverse * H, where
H = Type III SS&CP Matrix for A*B E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
2.30781925 99.80 0.06087509 -0.06951003
0.00460326 0.20 0.11236112 0.04836427
Manova Test Criteria and F Approximations for
the Hypothesis of no Overall A*B Effect
on the variables defined by the M Matrix Transformation
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.
Characteristic Roots and Vectors of: E Inverse * H, where
H = Contrast SS&CP Matrix for 1vs2 E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
0.57418716 100.00 -0.01471668 0.08251168
0.00000000 0.00 0.12694179 0.01904127
Manova Test Criteria and Exact F Statistics for
the Hypothesis of no Overall 1vs2 Effect
on the variables defined by the M Matrix Transformation
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
Characteristic Roots and Vectors of: E Inverse * H, where
H = Contrast SS&CP Matrix for 1vs3 E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
0.32894761 100.00 0.09261787 0.06480545
0.00000000 0.00 0.08804958 -0.05450688
Manova Test Criteria and Exact F Statistics for
the Hypothesis of no Overall 1vs3 Effect
on the variables defined by the M Matrix Transformation
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
Characteristic Roots and Vectors of: E Inverse * H, where
H = Contrast SS&CP Matrix for 2vs3 E = Error SS&CP Matrix
Variables have been transformed by the M Matrix
Characteristic Percent Characteristic Vector V'EV=1
Root
MVAR1 MVAR2
1.42548900 100.00 0.03515125 0.08349830
0.00000000 0.00 0.12286247 -0.01409897
Manova Test Criteria and Exact F Statistics for
the Hypothesis of no Overall 2vs3 Effect
on the variables defined by the M Matrix Transformation
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