Download 2-way ANOVA

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Scientific Practice
Comparing Multiple Factors:
Analysis of Variance
ANOVA (2-way)
@dave_lush
@UWE_JT9
Where We Are/Where We Are Going

1-way ANOVA allows many groups to be
compared in terms of one factor (treatment)



each group is exposed to one factor
but what if we want to look at two different factors?
and what if we wanted to know if factors interact?

eg the effects of temperature and pH on cell growth


does temp have an effect? Does pH? Do they affect
each other?
This needs a 2-way ANOVA

we normally think of having to carry out
experiments over and over again, but 2-way ANOVA
can be carried out without replication
 though interaction effects cannot be analysed
2-Way ANOVA Without Replication

Here are some results looking at growth rate of
cells at 3 pH values and 4 temps…
Temp oC
25
30
35
40

pH 6.5
pH 7.5
10
15
20
15
19
25
30
22
40
45
55
40
Every combination present (factorial design)


pH 5.5
but note only one trial at each combination
Can we discover if…



temp has an effect
pH has an effect
whether the two factors interact in some way?
2-Way ANOVA Without Replication

Step 1: The Null Hypothesis

there are two…




Step 2: Generate the Test Statistic, F (x2)








temp has no effect on cell growth
pH has no effect on cell growth
temp and pH do not interact to affect cell growth
cell growth in one col; two factors in separate cols
using Minitab gives…
Two-way ANOVA: Growth versus Temp, pH
Source DF
SS
MS
F
P
Temp
3
238.67
79.556
17.46 0.002
pH
2 1896.00 948.000 208.10 0.000
Error
6
27.33
4.556
Total
11 2162.00
2-Way ANOVA Without Replication

Step 3: Determine the probability(ies)

there are two, one for each factor…


Step 4: Interpret the Probabilities



0.002 and 0.000 (<0.0005)
can reject the Null Hypo in both cases, so…
pH and temp both significantly affect cell growth
NB, the small Error MS (4.556) suggests that
most of the variation in data caused by
separate effects of temp and pH


ie no interaction
but to really look at interaction, we need
replicates…
2-Way ANOVA With Replication

Say we did our experiment at 3 pH values and
4 temps three times…
Temp oC
25
30
35
40
25
30
35
40
25
30
35
40
pH 5.5
pH 6.5
pH 7.5
10
15
20
15
11
16
21
16
9
14
19
14
19
25
30
22
20
26
31
23
18
24
29
21
40
45
55
40
41
46
57
42
39
44
54
39
2-Way ANOVA With Replication

Step 1: The Null Hypothesis

there are three…




Step 2: Generate the Test Statistic, F (x3)








temp has no effect on cell growth
pH has no effect on cell growth
temp and pH do not interact to affect cell growth
using Minitab gives…
Two-way ANOVA: Growth versus Temp, pH
Source
DF
SS
MS
F
Temp
3
725.44
241.81
197.85
pH
2 5756.22 2878.11 2354.82
Interaction
6
82.89
13.81
11.30
Error
24
29.33
1.22
Total
35 6593.89
P
0.000
0.000
0.000
2-Way ANOVA With Replication

Step 3: Determine the probability(ies)

there are three, one for each factor, plus
interaction…


Step 4: Interpret the Probabilities




all 0.000 (<0.0005)
can reject the Null Hypo in all cases, so…
pH and temp both significantly affect cell growth
furthermore, the two factors interact
significantly to influence growth
This analysis does not report means (or SDs) of
the groups

means can be determined separately and plotted as
a ‘main effects’ plot and ‘interaction plot’
2-Way ANOVA: Main Effects Plot

Graph shows means of the main effects…


rise in growth with temp (except highest temp)
rise in growth with pH
2-Way ANOVA: Interaction Plot

Graph shows…



rise in growth with pH
rise in growth with temp (except highest temp)
Interaction visualised by how parallel lines are


parallel lines
suggest no
interaction
non-parallel lines
show interaction

eg high pH
changed effect
of higher temp
2-Way ANOVA: ‘Paired’ Approach

The ‘paired’ approach to experimental design
and analysis is very powerful…



Q: but how can it be used in ANOVA?
A: we need to consider the individual as a factor
Eg, looking at effect of 3 compounds on BP

‘unpaired’ approach (with 30 subjects)



randomly assign each individual to take one drug
analyse with 1-way ANOVA (drugs are single factor)
‘paired’ approach (only need 10 subjects)



give each person each drug (in a random sequence)
2-way ANOVA (factors are drugs, subjects)
called randomised block design
2-Way ANOVA: Randomised Block

A block is a factor that we deliberately control
to organise our subject allocation





not our primary interest, such as the drugs
but it helps control for variation
not a block as in road-block, rather a block of flats
each person is an individual ‘testing unit’ in which
different things can be tested
Eg, looking at effect of 3 compounds on BP

give each person each drug



drugs are the experimental factor
subject is the blocking factor
importantly, order of drugs randomised per subject
2-Way ANOVA: Randomised Block

Eg, effect of 3 drugs on BP in 10 subjects
subject
1
1
1
2
2
2
3
3
3
4
4
4
5
5
5
6
6
6
7
7
7
8
8
8
9
9
9
10
10
10
drug
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
b.p.
126
140
113
157
152
149
146
151
150
168
178
162
133
143
143
152
149
139
144
144
137
145
156
142
168
170
170
131
133
125
2-Way ANOVA: Randomised Block

Minitab…

MTB > anova c3 = c1 c2

ANOVA: b.p. versus subject, drug


Factor
subject
drug

Analysis of Variance for b.p.


Source
subject
drug
Error
Total

Drug effect is sig (<0.0005); interesting!






Type
fixed
fixed
DF
9
2
18
29
Levels
10
3
SS
5530.80
370.40
509.60
6410.80
Values
1, 2,
1, 2, 3
MS
614.53
185.20
28.31
3,
F
21.71
6.54
4,
5,
6,
7,
8,
9, 10
P
0.000
0.007
explore further (post-hoc testing)
Subject effect sig; not interesting - people vary!
Summary



2-way ANOVA allows many groups to be
compared in terms of >1 factors (treatments)
Allows effects of different factors to be teased
out
Usual form includes replication



permits interaction between factors to be shown
increased complexity of interpretation required
One factor can be a ‘blocking’ factor


a way to organise the application of treatments
if that is the individual, then it permits a ‘paired’
approach