Sie sind auf Seite 1von 39

Multivariate Analysis of

Variance (MANOVA)
Prof. Andy Field

Aims
When and Why do we Use
MANOVA?
Issues for MANOVA Analysis
Theory Behind MANOVA:
SSCP Matrices
Discriminant Variates
MANOVA Test Statistics
Slide 2

When And Why


To test for differences between
groups
When we have Several Outcome
variables (DVs)
Better than Multiple ANOVA
Controls familywise error rate (Type I
error)
Takes account of relationships
between DVs
Slide 3

Issues in MANOVA
Selecting Dependent Variables
Test Statistics (Choice of four)
Power
Power depends upon correlations
between Dependent Variables
Conflicting evidence about Test
Power

Slide 4

Theory: An Example
Efficacy of psychotherapy on OCD
Three Groups:
Cognitive Behaviour Therapy (CBT)
Behaviour Therapy (BT)
No Treatment (NT)

Two Outcome Variables (DVs):


Obsession-related Actions
Obsession-related thoughts
Slide 5

Theory of ANOVA (Revision)


SST
Total Variance In The Data

SSM
Improvement Due to the Model

F SSM/SSR
Slide 6

SSR
Error in Model

Total Cross Products

Slide 7

Model Cross Products

Slide 8

Residual Cross Products

Slide 9

Sums of Squares

Slide 10

MANOVA Matrices: Total SSCP


(T)

Slide 11

MANOVA Matrices: Residual SSCP


(E)

Slide 12

MANOVA Matrices: Model


SSCP (M)

Slide 13

An Equivalent to F

F
SSCP M
SSCP R

Slide 14

SSCP M
SSCP R

H
-1
HE
E

The Result
0.0202 0.0021

E
0.0021 0.0084
-1

0.2273 0.0852

HE
0.1930 0.1794
-1

Slide 15

Discriminant Variates
V1 b1Actions b2 Thoughts
0.603

eigenvecto r1

0
.
335

0.425

eigenvecto r2
0
.
339

V1 0.603 Actions 0.335 Thoughts


V2 0.425 Actions 0.339 Thoughts
Slide 16

Eigenvalues (i)
1
HE var iates

Slide 17

0.335 0.000

0.000 0.073

Pillai-Bartlett Trace

i 1

Slide 18

i
1 i

Hotellings Trace

i
i 1

Slide 19

Wilks Lambda

i 1

Slide 20

1
1 i

Roys Largest Root

Root lar gest


Slide 21

Which Test Statistic?


Issues to Consider
Power
Robustness
Equality of Sample Sizes

Pillais Trace
Robust when sample sizes are equal.

Slide 22

Exploring Data

Setting contrasts
For this example it makes sense to
compare each of the treatment
groups to the no-treatment control
group. The no-treatment control
group was coded as the last
category, so we could set this
contrast by executing:
contrasts(ocdData$Group)<contr.treatment(3, base = 3)
Slide 24

Setting contrasts
Alternatively, we could set the
contrasts by executing:
CBT_vs_NT<-c(1, 0, 0)
BT_vs_NT <-c(0, 1, 0)
contrasts(ocdData$Group)<cbind(CBT_vs_NT, BT_vs_NT)

The MANOVA model


In the case of MANOVA there are several
outcomes so the model becomes outcomes ~
predictor(s).
To put multiple outcomes into the model, we have
to bind the variables together into a single entity
using the cbind() function:
outcome<-cbind(ocdData$Actions, ocdData$Thoughts)

We use this new object as the outcome in our


model, and specify any predictors as we have in
previous chapters:
ocdModel<-manova(outcome ~ Group, data = ocdData)

Slide 26

Obtaining the Output


To see the output of the model we use the
summary command; by default, R produces
Pillais trace (which is a sensible choice), but we
can see the other test statistics by including the
test = option. For example, to see all four test
statistics we would need to execute:
summary(ocdModel,
summary(ocdModel,
"Wilks")
summary(ocdModel,
"Hotelling")
summary(ocdModel,

intercept = TRUE)
intercept = TRUE, test =
intercept = TRUE, test =
intercept = TRUE, test = "Roy")

Follow-up analysis: univariate test


statistics
To follow up the analysis with
univariate analyses of the
individual outcome measures,
execute:
summary.aov(ocdModel)

Contrasts
The contrasts are not part of the MANOVA
model and so to generate the output for
them you have to create separate linear
models for each outcome measure.
actionModel<-lm(Actions ~ Group, data =
ocdData)
thoughtsModel<-lm(Thoughts ~ Group, data
= ocdData)
summary.lm(actionModel)
summary.lm(thoughtsModel)

Contrasts

Robust MANOVA
Factor A: Treatment Group

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Group Actions Thoughts


CBT
5
14
CBT
5
11
CBT
4
16
CBT
4
13
CBT
5
12
CBT
3
14
CBT
7
12
CBT
6
15
CBT
6
16
CBT
4
11
BT
4
14
BT
4
15
BT
1
13
BT
1
14
BT
4
15
BT
6
19
BT
5
13
BT
5
18
BT
2
14
BT
5
17
NT
4
13
NT
5
15
NT
5
14
NT
4
14
NT
6
13
NT
4
20
NT
7
13
NT
4
16
NT
6
14
NT
5
18

Original Data

CBT

BT

NT

Actions

Thoughts

Actions

Thoughts

Actions

Thoughts

5
5
4
4
5
3
7
6
6
4

14
11
16
13
12
14
12
15
16
11

4
4
1
1
4
6
5
5
2
5

14
15
13
14
15
19
13
18
14
17

4
5
5
4
6
4
7
4
6
5

13
15
14
14
13
20
13
16
14
18

Restructured Data

Robust MANOVA
ocdData$row<-rep(1:10, 3)
ocdMelt<-melt(ocdData, id = c("Group",
"row"), measured = c("Actions",
"Thoughts"))
names(ocdMelt)<-c("Group", "row",
"Outcome_Measure", "Frequency")
ocdRobust<-cast(ocdMelt, row ~ Group +
Outcome_Measure, value = "Frequency")
ocdRobust$row<-NULL
ocdRobust

Robust MANOVA

mulrank(3, 2, ocdRobust)
cmanova(3, 2, ocdRobust)

Following MANOVA with


Discriminant Function Analysis
Discriminant analysis is quite straightforward
in R: you use the lda() function from the MASS
package. The basic format of this function is:
newModel<-lda(Group ~ Predictor(s), data =
dataFrame, prior = prior probabilities, na.action =
"na.omit")

For the current data, we could, therefore,


execute:
ocdDFA<-lda(Group ~ Actions + Thoughts, data =
ocdData)
ocdDFA

Slide 36

Discriminant Analysis
Output

Discriminant Analysis
Output

Discriminant Function
Analysis
2

B T
B T
C B T
B T

C B T
C B T

CN B T T

C B T

LD 2

NB T

B T

B T

CN BT T

CN B T T

N T

N T

C B T

N T

N T

C B T

-1

B T

C B T

NB T

-2

N T
B T

-2

-1

LD 1

BT

BT
BT

BT
CBT

CBT

BT

BT

NT

NT

CBT

BT

BT

NT

CBT
NT

CBT
NT
NT

CBT
NT

CBT

-1

-1

NT
NT

NT

CBT
CBT

BT

NT
BT

CBT

NT
BT
NT

-2

NT
BT

-2

CBT

NT
BT

BT
CBT
NT

BT

-2

LD2

CBT
NT

CBT

NT
BT
BT
CBT
NT

CBT
CBT

CBT
NT

LD2

CBT

CBT

-1

0
LD1

BT

-2

-1

0
LD1

Das könnte Ihnen auch gefallen