









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










11. Multivariate Analysis of Variance (MANOVA)
Generalizations for univariate analysis of variance
Analysis of variance (ANOVA)
Test the following hypotheses:
o
1
2
m
where i
is the mean for population i.
a
:Not all equal
Population “i” can be thought of as treatment “i”
Consider a completely randomized design (CRD) with only 1
factor.
A CRD is a particular kind of experimental design where
treatments (levels of the factor) are randomly applied to
the experimental units.
The means model is
x ir
i
ir
where ir
~i.i.d. N(0,
2
where x ir
is the response of the r
th
experimental unit for
treatment i, i
is the population mean of treatment i, and
ir
is the error term.
ANOVA Table:
Source d.f. SS MS F
Treatments m-1 SST MST F
Error N-m SSE MSE
Total N-1 SS(total)
Notes:
“Source” means the source of variation.
“Error” means the within treatment variation
“Treatments” means the between treatment variation.
SST = Sum of squares for treatments
SSE = Sum of squared errors
SS(total) = total sum of squares = SST + SSE
MST = Mean sum of squares for treatments
MSE = Mean sum of squared errors
F is the test statistic for
o
1
2
m vs. H a :Not all equal
Formulas:
MST = SST/(m-1) =
m
2
i i
i 1
N (x x)
m 1
where
m
i
i 1
i N
i ir
r 1 i
x x
, and
i m N
ir
i 1r 1
x x
treatments.
MSE = SSE/(n-m) =
i m N
2
ir i
i 1r 1
(x x )
n m
treatments
x ir
i
ir
where ir
ir
irp
)~ independent N p
Note that dependency is allowed for within an
experimental unit. If the responses for the r
th
experimental unit were independent (=
2
I ), then
ANOVA methods could be used on each of the p
variables.
The error sums of squares and cross products matrix, E ,
plays the role of SSE in ANOVA. This matrix is often
called the “within sum of squares” matrix. The matrix is
i
m N
ir i ir i
p p i 1r 1
E x x x x
where
i N
i ir
r 1 i
x x and N i
= # of experimental units
assigned to treatment i.
The “between sums of squares” matrix, H , plays the role
of SST in ANOVA. The matrix is:
m
i i
p p i 1
H x x x x where
i m N
ir
i 1r 1
x x .
The “total sums squares” matrix is H + E :
i m N
ir ir
i 1r 1
H E x x x x
The MANOVA table is
Source d.f. SS
Treatments m-1 H | E |/| H + E |
Error N-m E
Total N-1 H + E
tests H o
1
2
m vs. H a :Not all equal. This can be
seen to be similar to the F test in ANOVA by noting the
following.
Since F = MST/MSE and the null hypothesis is
rejected when F is large, this is similar to saying
reject the null hypothesis when SST/SSE is large.
Equivalently, reject the null hypothesis when 1+SST/
SSE = (SSE+SST)/SSE is large. Taking the
reciprocal produces a test of SSE/(SSE+SST) and
reject the null hypothesis when this is small.
Note that is called Wilk’s lambda. It is actually a
likelihood ratio test statistic where the main part the
statistic depends upon is | E |/| H + E | (so this is why it is
expressed this way instead of –2log(lik. ratio)).
Other testing procedures
Below are other testing procedures for H o
1
2
m
vs. H a
:Not all equal
Roy’s test: Based on the largest i
of HE
Lawley and Hotelling’s test: T=tr( HE
looking for differences using ANOVA methods (i.e.,
use /p as the level of significance).
Example: CPT (CPT_ch11_gen.sas)
Determine if there are differences in the means hits for
the treatment groups. Remember that we need to
assume multivariate normality to use MANOVA here.
Test the following hypotheses:
o
0
3
9
18
36
72
a
:Not all equal
where i
i
i
i2,
i
i
) and ij
=mean change in
hits at time j for dose group i.
Below is the SAS code and part of the output.
data set1;
infile 'c:/chris/unl/stat873/chapter 10/cpt_gen.txt'
firstobs = 2 ;
input patient dose time0 time1 time2 time3 time4;
run ;
title2 'Print CPT data';
proc print data=set1;
run ;
title2 'CPT example - test equality of mean vectors';
proc glm data=set1;
class dose;
model time0-time4 = dose;
manova H=dose / printe printh;
run ;
Print CPT data
Obs patient dose time0 time1 time2 time3 time
1 1 0 98 101 100 98 101
2 2 0 99 95 100 100 101
3 3 0 103 100 96 101 101
4 4 0 97 103 98 102 101
5 5 0 104 103 99 102 101
6 6 0 101 104 97 98 99
7 7 0 93 95 97 92 96
8 8 0 102 103 105 106 103
9 9 0 106 100 99 100 102
10 10 0 100 96 94 95 96
11 11 3 99 99 102 94 94
12 12 3 104 104 101 97 97
59 59 72 104 92 91 92 89
60 60 72 97 96 90 86 89
CPT example - test equality of mean vectors
The GLM Procedure
Class Level Information
Class Levels Values
dose 6 0 3 9 18 36 72
Number of observations 60
Dependent Variable: time
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 5 14.6833333 2.9366667 0.29 0.
Error 54 555.5000000 10.
Corrected Total 59 570.
R-Square Coeff Var Root MSE time0 Mean
0.025752 3.200407 3.207341 100.
Source DF Type III SS Mean Square F Value Pr > F
dose 5 14.68333333 2.93666667 0.29 0.
Multivariate Analysis of Variance Multivariate Analysis of Variance Characteristic Roots and Vectors of: E Inverse * H, where H = Type III SSCP Matrix for dose
Root Percent time0 time1 time2 time
time
2.43595475 87.33 -0.01267322 0.00761417 0.01507774 0.
0.21452021 7.69 0.00757740 -0.02235603 -0.02716103 -0.
0.09766922 3.50 0.02779871 -0.04527402 0.04231506 -0.
0.03953253 1.42 0.01681926 -0.02234447 -0.00927273 0.
-0.
0.00163331 0.06 0.03194554 0.02881704 -0.01439919 -0.
MANOVA Test Criteria and F Approximations for
the Hypothesis of No Overall dose Effect
H = Type III SSCP Matrix for dose
E = Error SSCP Matrix
S=5 M=-0.5 N=
Statistic Value F Value Num DF Den DF Pr > F
Wilks' Lambda 0.20966671 3.92 25 187.24 <.
Pillai's Trace 1.01422819 2.75 25 270 <.
Hotelling-Lawley Trace 2.78931002 5.45 25 113.65 <.
Roy's Greatest Root 2.43595475 26.31 5 54 <.
NOTE: F Statistic for Roy's Greatest Root is an upper bound.
Notes:
PROC GLM is used for the MANOVA.
The CLASS statement informs SAS that dose is a factor
and not to consider the dose levels as a quantitative
variable.
The MODEL statement produces summary information for
each ANOVA model. If H o
0
3
9
18
36
72 is
rejected, this could be used to determine which
components of the mean vectors are different as described
on p. 11. 6. Note that the MODEL statement needs to be
used in order for the MANOVA statement to work.
The MANOVA statement produces the information needed
for the MANOVA. The PRINTE and PRINTH options tell
SAS to print the E and H matrices, respectively. The
H=dose statement is used to specify the factor.
analysis there. Johnson suggests to go ahead and look at
the individual means using a Bonferroni adjustment to the
level of significance. If =0.05, then to examine for
differences between the individual means using ANOVA, a
level of significance of 0.05/5 = 0.01 could be used.
In order to show how SAS calculated some of the
MANOVA test statistics, I used the following PROC IML
code.
title2 'CPT example - test equality of mean vectors';
proc glm data=set1;
class dose ;
model time0-time4 = dose / ss3;
manova H=dose / printe printh;
ods output HypothesisSSCP=H_set;
ods output ErrorSSCP=E_set;
run ;
******************************************************;
*TRY VERIFYING SOME OF THE CALCULATIONS! *;
******************************************************;
proc iml ;
*Read in covariance matrix and mean vector for dose = 36;
use H_set;
read all var {time0 time1 time2 time3 time4} into H;
use E_set;
read all var {time0 time1 time2 time3 time4} into E;
print H, E; *Check;
wilks = det(E)/det(H+E);
roy = eigval(H*inv(E));
lawley = trace(H*inv(E));
pillai = trace(H*inv(H+E));
print wilks roy lawley pillai;
quit;
Below is the output.
H
14.683333 27.983333 54.516667 53.233333 53.
27.983333 307.88333 423.81667 443.23333 468.
54.516667 423.81667 617.68333 624.76667 669.
53.233333 443.23333 624.76667 690.93333 754.
53.683333 468.28333 669.21667 754.73333 874.
E
555.5 205.3 117.8 187.7 98.
205.3 423.1 244.4 203.3 150.
117.8 244.4 504.5 237.3 167.
187.7 203.3 237.3 546 274.
98.4 150.3 167.2 274.6 483.
WILKS ROY LAWLEY PILLAI
0.2096667 2.4359548 0 2.78931 1.
0.0016333 0
0.2145202 0
0.0976692 0
0.0395325 0
These test statistics match the test statistics produced
by the MANOVA option in PROC GLM.
The above example is for a one-way fixed effects MANOVA
model. These type of models can be extended. See p. 334-
343 of Johnson and Wichern (1998) for a two-way fixed
effects MANOVA model.