View
216
Download
1
Tags:
Embed Size (px)
Citation preview
2001
Bio 8100s Allied Multivariate Biostatistics L6.1
Université d’Ottawa / University of Ottawa
Lecture 6: Single-classification Lecture 6: Single-classification multivariate ANOVA (multivariate ANOVA (kk-group -group
MANOVA)MANOVA)
Lecture 6: Single-classification Lecture 6: Single-classification multivariate ANOVA (multivariate ANOVA (kk-group -group
MANOVA)MANOVA) Rationale and
underlying principles Univariate ANOVA Multivariate ANOVA
(MANOVA): principles and procedures
Rationale and underlying principles
Univariate ANOVA Multivariate ANOVA
(MANOVA): principles and procedures
MANOVA test statistics MANOVA assumptions Planned and unplanned
comparisons
MANOVA test statistics MANOVA assumptions Planned and unplanned
comparisons
2001
Bio 8100s Allied Multivariate Biostatistics L6.2
Université d’Ottawa / University of Ottawa
When to use ANOVAWhen to use ANOVAWhen to use ANOVAWhen to use ANOVA Tests for effect of “discrete”
independent variables. Each independent variable is
called a factor, and each factor may have two or more levels or treatments (e.g. crop yields with nitrogen (N) or nitrogen and phosphorous (N + P) added).
ANOVA tests whether all group means are the same.
Use when number of levels (groups) is greater than two.
Tests for effect of “discrete” independent variables.
Each independent variable is called a factor, and each factor may have two or more levels or treatments (e.g. crop yields with nitrogen (N) or nitrogen and phosphorous (N + P) added).
ANOVA tests whether all group means are the same.
Use when number of levels (groups) is greater than two.
ControlExperimental (N)Experimental (N+P)
Fre
qu
en
cy
Yield
C N N+P
2001
Bio 8100s Allied Multivariate Biostatistics L6.3
Université d’Ottawa / University of Ottawa
Why not use multiple 2-sample Why not use multiple 2-sample tests?tests?
Why not use multiple 2-sample Why not use multiple 2-sample tests?tests?
For k comparisons, the probability of accepting a true H0 for all k is (1 - )k.
For 4 means, (1 - )k = (0.95)6 = .735.
So (for all comparisons) = 0.265. So, when comparing the means of
four samples from the same population, we would expect to detect significant differences among at least one pair 27% of the time.
For k comparisons, the probability of accepting a true H0 for all k is (1 - )k.
For 4 means, (1 - )k = (0.95)6 = .735.
So (for all comparisons) = 0.265. So, when comparing the means of
four samples from the same population, we would expect to detect significant differences among at least one pair 27% of the time. Yield
C N N+P
ControlExperimental (N)Experimental (N+P)
c:N N:N+P
C: N+P
Fre
qu
en
cy
2001
Bio 8100s Allied Multivariate Biostatistics L6.4
Université d’Ottawa / University of Ottawa
What ANOVA What ANOVA does/doesn’t dodoes/doesn’t do
What ANOVA What ANOVA does/doesn’t dodoes/doesn’t do
Tells us whether all group means are equal (at a specified level)...
...but if we reject H0, the ANOVA does not tell us which pairs of means are different from one another.
Tells us whether all group means are equal (at a specified level)...
...but if we reject H0, the ANOVA does not tell us which pairs of means are different from one another.
ControlExperimental (N)Experimental (N+ P) Yield
Fre
qu
en
cyC N N+P
Fre
qu
en
cy
C N
N+P
2001
Bio 8100s Allied Multivariate Biostatistics L6.5
Université d’Ottawa / University of Ottawa
Model I ANOVA: effects of Model I ANOVA: effects of temperature on trout growthtemperature on trout growth
Model I ANOVA: effects of Model I ANOVA: effects of temperature on trout growthtemperature on trout growth
3 treatments determined (set) by investigator.
Dependent variable is growth rate (), factor (X) is temperature.
Since X is controlled, we can estimate the effect of a unit increase in X (temperature) on theeffect size...
… and can predictat other temperatures.
3 treatments determined (set) by investigator.
Dependent variable is growth rate (), factor (X) is temperature.
Since X is controlled, we can estimate the effect of a unit increase in X (temperature) on theeffect size...
… and can predictat other temperatures.
Water temperature (°C)
16 20 24 28
0.00
0.04
0.08
0.12
0.16
0.20
Gro
wth
ra
te
(c
m/d
ay)
2001
Bio 8100s Allied Multivariate Biostatistics L6.6
Université d’Ottawa / University of Ottawa
Model II ANOVA: geographical Model II ANOVA: geographical variation in body size of black bearsvariation in body size of black bears
Model II ANOVA: geographical Model II ANOVA: geographical variation in body size of black bearsvariation in body size of black bears
3 locations (groups) sampled from set of possible locations.
Dependent variable is body size, factor (X) is location.
Even if locations differ, we have no idea what factors are controlling this variability...
…so we cannot predictbody sizeat other locations.
3 locations (groups) sampled from set of possible locations.
Dependent variable is body size, factor (X) is location.
Even if locations differ, we have no idea what factors are controlling this variability...
…so we cannot predictbody sizeat other locations.
Bo
dy
siz
e (
kg
)
120
160
200
240
280
RidingMountain
Kluane Algonquin
2001
Bio 8100s Allied Multivariate Biostatistics L6.7
Université d’Ottawa / University of Ottawa
Model differencesModel differences
In Model I, the putative causal factor(s) can be manipulated by the experimenter, whereas in Model II they cannot.
In Model I, we can estimate the magnitude of treatment effects and make predictions, whereas in Model II we can do neither.
In one-way (single classification) ANOVA, calculations are identical for both models…
…but this is NOT so for multiple classification ANOVA!
2001
Bio 8100s Allied Multivariate Biostatistics L6.8
Université d’Ottawa / University of Ottawa
How is it done? And why call it How is it done? And why call it ANOVA?ANOVA?
In ANOVA, the total variance in the dependent variable is partitioned into two components:
among-groups: variance of means of different groups (treatments)
within-groups (error): variance of individual observations within groups around the mean of the group
2001
Bio 8100s Allied Multivariate Biostatistics L6.9
Université d’Ottawa / University of Ottawa
The general The general ANOVA modelANOVA model
The general The general ANOVA modelANOVA model The general model is:
ANOVA algorithms fit the above model (by least squares) to estimate the i’s.
H0: all i’s = 0
The general model is:
ANOVA algorithms fit the above model (by least squares) to estimate the i’s.
H0: all i’s = 0
ij i ijY
Group 1Group 2Group 3
Group
Y
2
2
42
Y
2001
Bio 8100s Allied Multivariate Biostatistics L6.10
Université d’Ottawa / University of Ottawa
Partitioning the total sums of Partitioning the total sums of squaressquares
Partitioning the total sums of Partitioning the total sums of squaressquares
Group 1Group 2Group 3
Y
Total SS Model (Groups) SS Error SS
2001
Bio 8100s Allied Multivariate Biostatistics L6.11
Université d’Ottawa / University of Ottawa
The ANOVA tableThe ANOVA table
Source of Variation
Sum ofSquares
MeanSquare
Degrees offreedom (df)
F
Total
Error
n - 1
n - k
SS/df
SS/df
Groups k - 1 SS/dfMSgroups
MSerror
i 1
k
ijj 1
n2(Y Y)
i
i ii
k
n Y Y( )
1
2
i 1
k
ij 1
n2(Y Yi)
i
j
2001
Bio 8100s Allied Multivariate Biostatistics L6.12
Université d’Ottawa / University of Ottawa
Use of single-classification Use of single-classification MANOVAMANOVA
Use of single-classification Use of single-classification MANOVAMANOVA
Data set consists of k groups (“treatments”), with ni observations per group, and p variables per observation.
Question: do the groups differ with respect to their multivariate means?
Data set consists of k groups (“treatments”), with ni observations per group, and p variables per observation.
Question: do the groups differ with respect to their multivariate means?
In single-classification ANOVA, we assume that a single factor is variable among groups, i.e., that all other factors which may possible affect the variables in question are randomized among groups.
In single-classification ANOVA, we assume that a single factor is variable among groups, i.e., that all other factors which may possible affect the variables in question are randomized among groups.
2001
Bio 8100s Allied Multivariate Biostatistics L6.13
Université d’Ottawa / University of Ottawa
ExamplesExamplesExamplesExamples
4 different concentrations of some suspected contaminant; 10 young fish randomly assigned to each treatment; at age 2 months, a number of measurements taken on each surviving fish.
4 different concentrations of some suspected contaminant; 10 young fish randomly assigned to each treatment; at age 2 months, a number of measurements taken on each surviving fish.
10 young fish reared in 4 different “treatments”, each treatment consisting of water samples taken at different stages of treatment in a water treatment plant.
10 young fish reared in 4 different “treatments”, each treatment consisting of water samples taken at different stages of treatment in a water treatment plant.
Good(ish) Bad(ish)
2001
Bio 8100s Allied Multivariate Biostatistics L6.14
Université d’Ottawa / University of Ottawa
Multivariate variance: a geometric Multivariate variance: a geometric interpretationinterpretationMultivariate variance: a geometric Multivariate variance: a geometric interpretationinterpretation
Univariate variance is a measure of the “volume” occupied by sample points in one dimension.
Multivariate variance involving m variables is the volume occupied by sample points in an m -dimensional space.
Univariate variance is a measure of the “volume” occupied by sample points in one dimension.
Multivariate variance involving m variables is the volume occupied by sample points in an m -dimensional space.
X X
Largervariance
Smallervariance
X1
X2Occupiedvolume
2001
Bio 8100s Allied Multivariate Biostatistics L6.15
Université d’Ottawa / University of Ottawa
Multivariate variance: Multivariate variance: effects of correlations effects of correlations among variablesamong variables
Multivariate variance: Multivariate variance: effects of correlations effects of correlations among variablesamong variables
Correlations between pairs of variables reduce the volume occupied by sample points…
…and hence, reduce the multivariate variance.
Correlations between pairs of variables reduce the volume occupied by sample points…
…and hence, reduce the multivariate variance.
No correlation
X1
X2
X2
X1
Positivecorrelation
Negativecorrelation
Occupiedvolume
2001
Bio 8100s Allied Multivariate Biostatistics L6.16
Université d’Ottawa / University of Ottawa
C and the generalized C and the generalized multivariate variancemultivariate varianceC and the generalized C and the generalized multivariate variancemultivariate variance
The determinant of the sample covariance matrix C is a generalized multivariate variance…
… because area2 of a parallelogram with sides given by the individual standard deviations and angle determined by the correlation between variables equals the determinant of C.
The determinant of the sample covariance matrix C is a generalized multivariate variance…
… because area2 of a parallelogram with sides given by the individual standard deviations and angle determined by the correlation between variables equals the determinant of C.
rc
s s1212
1 2
05 60 . cos , o
C CLNMOQP
1 1
1 43
2s
1s
h
2
sin 60 ; 3.2
3,
opposite hh
hypotenuse
Area Base Height Area
C
2001
Bio 8100s Allied Multivariate Biostatistics L6.17
Université d’Ottawa / University of Ottawa
ANOVA vs MANOVA: procedureANOVA vs MANOVA: procedureANOVA vs MANOVA: procedureANOVA vs MANOVA: procedure
In ANOVA, the total sums of squares is partitioned into a within-groups (SSw) and between-group SSb sums of squares:
In ANOVA, the total sums of squares is partitioned into a within-groups (SSw) and between-group SSb sums of squares:
In MANOVA, the total sums of squares and cross-products (SSCP) matrix is partitioned into a within groups SSCP (W) and a between-groups SSCP (B)
In MANOVA, the total sums of squares and cross-products (SSCP) matrix is partitioned into a within groups SSCP (W) and a between-groups SSCP (B)
T b wSS SS SS T B W
2001
Bio 8100s Allied Multivariate Biostatistics L6.18
Université d’Ottawa / University of Ottawa
In ANOVA, the null hypothesis is:
This is tested by means of the F statistic:
In ANOVA, the null hypothesis is:
This is tested by means of the F statistic:
ANOVA vs MANOVA: hypothesis ANOVA vs MANOVA: hypothesis testingtesting
ANOVA vs MANOVA: hypothesis ANOVA vs MANOVA: hypothesis testingtesting
In MANOVA, the null hypothesis is
This is tested by (among other things) Wilk’s lambda:
In MANOVA, the null hypothesis is
This is tested by (among other things) Wilk’s lambda:
0 1 2: kH
b b
w e
MS MSF
MS MS
0 1 2: kH μ μ μ
, 0 1
W W
T B W
2001
Bio 8100s Allied Multivariate Biostatistics L6.19
Université d’Ottawa / University of Ottawa
SSCP matrices: SSCP matrices: within, between, and within, between, and
totaltotal
SSCP matrices: SSCP matrices: within, between, and within, between, and
totaltotal The total (T) SSCP matrix
(based on p variables X1, X2,…, Xp ) in a sample of objects belonging to m groups G1, G2,…, Gm with sizes n1, n2,…, nm can be partitioned into within-groups (W) and between-groups (B) SSCP matrices:
The total (T) SSCP matrix (based on p variables X1, X2,…, Xp ) in a sample of objects belonging to m groups G1, G2,…, Gm with sizes n1, n2,…, nm can be partitioned into within-groups (W) and between-groups (B) SSCP matrices:
ijkx
jkx
kx
1 1
1 1
( )( )
( )( )
j
j
nm
rc ijr r ijc cj i
nm
rc ijr jr ijc jcj i
t x x x x
w x x x x
Value of variable Xk forith observation in group j
Mean of variable Xk forgroup j
Overall mean of variable Xk
T B W
,rc rct w Element in row r andcolumn c of total (T, t) and within (W, w) SSCP
2001
Bio 8100s Allied Multivariate Biostatistics L6.20
Université d’Ottawa / University of Ottawa
The distribution of The distribution of The distribution of The distribution of
Unlike F, has a very complicated distribution…
…but, given certain assumptions it can be approximated b as Bartlett’s 2 (for moderate to large samples) or Rao’s F (for small samples)
Unlike F, has a very complicated distribution…
…but, given certain assumptions it can be approximated b as Bartlett’s 2 (for moderate to large samples) or Rao’s F (for small samples)
2 [( 1) 0.5( )]ln
( 1)
N p k
df p k
1/
1/
2 2
2 2
1 ( 1) / 2 1
( 1)
1 ( ) / 2
( 1) 4
( 1) 5
( 1), ( 1) / 2 1
s
s
ms p kF
p k
m N p k
p ks
p k
df p k ms p k
2001
Bio 8100s Allied Multivariate Biostatistics L6.21
Université d’Ottawa / University of Ottawa
AssumptionsAssumptionsAssumptionsAssumptions
All observations are independent (residuals are uncorrelated)
Within each sample (group), variables (residuals) are multivariate normally distributed
Each sample (group) has the same covariance matrix (compound symmetry)
All observations are independent (residuals are uncorrelated)
Within each sample (group), variables (residuals) are multivariate normally distributed
Each sample (group) has the same covariance matrix (compound symmetry)
2001
Bio 8100s Allied Multivariate Biostatistics L6.22
Université d’Ottawa / University of Ottawa
Effect of violation of assumptionsEffect of violation of assumptionsEffect of violation of assumptionsEffect of violation of assumptions
Assumption Effect on Effect on power
Independence of observations
Very large, actual much larger than nominal
Large, power much reduced
Normality Small to negligible
Reduced power for platykurtotic distributions, skewness has little effect
Equality of covariance matrices
Small to negligible if group Ns similar, if Ns very unequal, actual larger than nominal
Power reduced, reduction greater for unequal Ns.
2001
Bio 8100s Allied Multivariate Biostatistics L6.23
Université d’Ottawa / University of Ottawa
Checking assumptions in MANOVAChecking assumptions in MANOVAChecking assumptions in MANOVAChecking assumptions in MANOVA
Independence(intraclass correlation,
ACF)
Use groupmeans as unit
of analysis
AssessMV normality
Check groupsizes
MVNgraph test
Check Univariatenormality
No
Yes Ni > 20
Ni < 20
2001
Bio 8100s Allied Multivariate Biostatistics L6.24
Université d’Ottawa / University of Ottawa
Checking assumptions in MANOVA (cont’d)Checking assumptions in MANOVA (cont’d)Checking assumptions in MANOVA (cont’d)Checking assumptions in MANOVA (cont’d)
MV normal?Check homogeneity
ofcovariance
matrices
Most variablesnormal?
Transformoffendingvariables
Group sizesmore or
less equal(R < 1.5)?
Groupsreasonably
large(> 15)?
Yes
No
Yes
Yes
No
END
Yes
Yes
No Transformvariables, or
adjust
2001
Bio 8100s Allied Multivariate Biostatistics L6.25
Université d’Ottawa / University of Ottawa
Then what?Then what?Then what?Then what?
Question Procedure
What variables are responsible for detected differences among groups?
Check univariate F tests as a guide; use another multivariate procedure (e.g. discriminant function analysis)
Do certain groups (determined beforehand) differ from one another?
Planned multiple comparisons
Which pairs of groups differ from one another (groups not specified beforehand)?
Unplanned multiple comparisons
2001
Bio 8100s Allied Multivariate Biostatistics L6.26
Université d’Ottawa / University of Ottawa
What are multiple comparisons?What are multiple comparisons?What are multiple comparisons?What are multiple comparisons?
Pair-wise comparisons of different treatments
These comparisons may involve group means, medians, variances, etc.
for means, done after ANOVA
In all cases, H0 is that the groups in question do not differ.
Pair-wise comparisons of different treatments
These comparisons may involve group means, medians, variances, etc.
for means, done after ANOVA
In all cases, H0 is that the groups in question do not differ. Yield
C N N+P
ControlExperimental (N)Experimental (N+P)
c:N N:N+P
C: N+P
Fre
qu
en
cy
2001
Bio 8100s Allied Multivariate Biostatistics L6.27
Université d’Ottawa / University of Ottawa
Types of Types of comparisonscomparisons
Types of Types of comparisonscomparisons
planned (a priori): independent of ANOVA results; theory predicts which treatments should be different.
unplanned (a posteriori): depend on ANOVA results; unclear which treatments should be different.
Test of significance are very different between the two!
planned (a priori): independent of ANOVA results; theory predicts which treatments should be different.
unplanned (a posteriori): depend on ANOVA results; unclear which treatments should be different.
Test of significance are very different between the two!
Y
Y
X1 X2 X3 X4 X5
X1 X2 X3 X4 X5
Planned
unplanned
2001
Bio 8100s Allied Multivariate Biostatistics L6.28
Université d’Ottawa / University of Ottawa
Planned comparisons (Planned comparisons (a prioria priori contrasts): contrasts): catecholamine levels in stressed fishcatecholamine levels in stressed fish
Planned comparisons (Planned comparisons (a prioria priori contrasts): contrasts): catecholamine levels in stressed fishcatecholamine levels in stressed fish
Comparisons of interest are determined by experimenter beforehand based on theory and do not depend on ANOVA results.
Prediction from theory: catecholamine levels increase above basal levels only after threshold PAO2 = 30 torr is reached.
So, compare only treatments above and below 30 torr (NT = 12).
Comparisons of interest are determined by experimenter beforehand based on theory and do not depend on ANOVA results.
Prediction from theory: catecholamine levels increase above basal levels only after threshold PAO2 = 30 torr is reached.
So, compare only treatments above and below 30 torr (NT = 12). Predicted threshold
PAO2 (torr)
10 20 30 40 50
[Ca
tech
ola
min
e]
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2001
Bio 8100s Allied Multivariate Biostatistics L6.29
Université d’Ottawa / University of Ottawa
Unplanned comparisons (Unplanned comparisons (a posterioria posteriori contrasts): catecholamine levels in contrasts): catecholamine levels in
stressed fishstressed fish
Unplanned comparisons (Unplanned comparisons (a posterioria posteriori contrasts): catecholamine levels in contrasts): catecholamine levels in
stressed fishstressed fish Comparisons are
determined by ANOVA results.
Prediction from theory: catecholamine levels increase with increasing PAO2 .
So, comparisons between any pairs of treatments may be warranted (NT = 21).
Comparisons are determined by ANOVA results.
Prediction from theory: catecholamine levels increase with increasing PAO2 .
So, comparisons between any pairs of treatments may be warranted (NT = 21).
Predicted relationship
PAO2 (torr)
10 20 30 40 50[C
ate
cho
lam
ine]
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
2001
Bio 8100s Allied Multivariate Biostatistics L6.30
Université d’Ottawa / University of Ottawa
The problem: controlling The problem: controlling experiment-wise experiment-wise error errorThe problem: controlling The problem: controlling experiment-wise experiment-wise error error
For k comparisons, the probability of accepting H0 (no difference) is (1 - )k.
For 4 treatments, (1 - )k = (0.95)6 = .735, so experiment-wise (e) = 0.265.
Thus we would expect to reject H0 for at least one paired comparison about 27% of the time, even if all four treatments are identical.
For k comparisons, the probability of accepting H0 (no difference) is (1 - )k.
For 4 treatments, (1 - )k = (0.95)6 = .735, so experiment-wise (e) = 0.265.
Thus we would expect to reject H0 for at least one paired comparison about 27% of the time, even if all four treatments are identical.
Nominal = .05
Number of treatments
0 2 4 6 8 10
Ex
pe
rim
ent-
wis
e
(
e)
0.0
0.2
0.4
0.6
0.8
1.0
2001
Bio 8100s Allied Multivariate Biostatistics L6.31
Université d’Ottawa / University of Ottawa
Unplanned comparisons: Hotelling Unplanned comparisons: Hotelling TT22 and univariate F tests and univariate F tests
Unplanned comparisons: Hotelling Unplanned comparisons: Hotelling TT22 and univariate F tests and univariate F tests
Follow rejection of null in original MANOVA by all pairwise multivariate tests using Hotelling T2 to determine which groups are different
…but test at modified to maintain overall nominal type I error rate (e.g. Bonferroni correction)
Follow rejection of null in original MANOVA by all pairwise multivariate tests using Hotelling T2 to determine which groups are different
…but test at modified to maintain overall nominal type I error rate (e.g. Bonferroni correction)
Then use univariate t-tests to determine which variables are contributing to the detected pairwise differences…
…opinion is divided as to whether these should be done at a modified .
Then use univariate t-tests to determine which variables are contributing to the detected pairwise differences…
…opinion is divided as to whether these should be done at a modified .
2001
Bio 8100s Allied Multivariate Biostatistics L6.32
Université d’Ottawa / University of Ottawa
How many different variables for a How many different variables for a MANOVA?MANOVA?
How many different variables for a How many different variables for a MANOVA?MANOVA?
In general, try to use a small number of variables because:
In MANOVA, power generally declines with increasing number of variables.
If a number of variables are included that do not differ among groups, this will obscure differences on a few variables
In general, try to use a small number of variables because:
In MANOVA, power generally declines with increasing number of variables.
If a number of variables are included that do not differ among groups, this will obscure differences on a few variables
Measurement error is multiplicative among variables: the larger the number of variables, the larger the measurement noise
Interpretation is easier with a smaller number of variables
Measurement error is multiplicative among variables: the larger the number of variables, the larger the measurement noise
Interpretation is easier with a smaller number of variables
2001
Bio 8100s Allied Multivariate Biostatistics L6.33
Université d’Ottawa / University of Ottawa
How many different variables for a How many different variables for a MANOVA : recommendationMANOVA : recommendation
How many different variables for a How many different variables for a MANOVA : recommendationMANOVA : recommendation
Choose variables carefully, attempting to keep them to a minimum
Try to reduce the number of variables by using multivariate procedures (e.g. PCA) to generate composite, uncorrelated variables which can then be used as input.
Use multivariate procedures (such as discriminant function analysis) to “optimize” set of variables.
Choose variables carefully, attempting to keep them to a minimum
Try to reduce the number of variables by using multivariate procedures (e.g. PCA) to generate composite, uncorrelated variables which can then be used as input.
Use multivariate procedures (such as discriminant function analysis) to “optimize” set of variables.