Partly nested ANOVA

Download Report

Transcript Partly nested ANOVA

Experimental design and analysis
Partly nested designs
Copyright, Gerry Quinn & Mick Keough,
1998 Please do not copy or distribute this
file without the authors’ permission
Partly nested designs
• Designs with 3 or more factors
• Factor A and C crossed
• Factor B nested within A, crossed with
C
Split-plot designs
• Units of replication different for different
factors
• Factor A:
– units of replication termed “plots”
– factor B nested within A
• Factor C:
– units of replication termed subplots within
each plot
Colonisation by stream insects
• Colonisation of stream insects to stones
• Effects of algal cover:
– No algae, half algae, full algae
• 3 replicates for each algal treatment
• Design options:
– completely randomised
– randomised block
Completely randomised
Rock with no algae
Rock with half algae
Rock with full algae
Randomised block
Rock with no algae
Rock with half algae
Rock with full algae
Colonisation of stream insects
• Colonisation of stream insects to rocks
• Effects of algal cover
– No algae, half algae, full algae
• 3 replicates for each algal treatment
• Effects of predation by fish
– Caged vs cage controls
• 3 replicates for each predation
Completely randomised
Uncaged
Caged
Rock with no algae
Rock with half algae
Rock with full algae
ANOVA
Source of variation
df
Caging
Algae
Caging x Algae (interaction)
Residual
1
2
2
12
(stones within caging & algae)
Total
17
Split-plot design
• Factor A is caging:
– fish excluded vs controls
– applied to blocks = plots
• Factor B is plots nested within A
• Factor C is algal treatment
– no algae, half algae, full algae
– applied to stones = subplots within each
plot
Split plot
Uncaged
Caged
Rock with no algae
Rock with half algae
Rock with full algae
Advantages
• Uses randomised block (= plot) design
for factor C (algal treatment):
– better if blocks (plots) explain variation in
DV
• More efficient:
– only need cages over blocks (plots), not
over individual stones
Analysis of variance
• Between plots variation:
– Factor A fixed - one factor ANOVA using
plot means
– Factor B (plots) random - nested within A
(Residual 1)
• Within plots variation:
– Factor C fixed
– Interaction A * C fixed
– Interaction B(A) * C (Residual 2)
ANOVA
Source of variation
Between plots
Caging
Plots within caging (Residual 1)
Within plots
Algae
Caging x Algae (interaction)
Plots within caging x algae (Residual 2)
Total
df
1
4
2
2
8
17
ANOVA worked example
Source of variation
Between plots
Caging
Plots within caging
df
MS
F
P
1
4
1494.22
83.89
17.81
0.013
65.01
6.23
<0.001
0.023
Within plots
Algae
Caging x Algae
Plots within
caging x algae
2
2
247.39
23.72
12
3.81
Total
17
Westley (1993)
Effects of infloresence bud removal on asexual
investment in the Jeralusem artichoke:
Populations
1
Genotypes
within pops
Treatments
2
3
4
1 2 3 4 5
C
IR
Genotypes = tubers from single individuals
Treatments applied to different tubers from each genotype
Westley (1993)
Source of variation
df
Between plots (genotypes)
Population
Genotypes within population (Residual 1)
3
16
Within plots (genotypes)
Treatment
Population x Treatment (interaction)
Genotypes within Population x Treatment
(Residual 2)
16
Total
39
1
3
Repeated measures designs
• Each whole plot is measured repeatedly
under different treatments and/or times
• Within plots factor is often time, or at least
treatments applied through time
• Plots termed “subjects” in repeated measures
terminology
• Groups x trials designs
– Groups are between subjects factor
– Trials are within subjects factor
Cane toads and hypoxia
• How do cane toads respond to conditions of
hypoxia?
• Two factors:
– Breathing type
• buccal vs lung breathers
– O2 concentration
• 8 different [O2]
• 10 replicates per breathing type and [O2]
combination
Completely randomised design
• 2 factor design (2 x 8) with 10 replicates
– total number of toads = 160
• Toads are expensive
– reduce number of toads?
• Lots of variation between individual toads
– reduce between toad variation?
Repeated measures design
Breathing Toad
type
1 2
[O2]
3 4 5
Lung
Lung
...
Lung
1
2
...
9
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
Buccal
Buccal
...
Buccal
10
12
...
21
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
x
x
...
x
6
7
8
ANOVA
Source of variation
df
Between subjects (toads)
Breathing type
Toads within breathing type (Residual 1)
1
19
Within subjects (toads)
[O2]
Breathing type x [O2]
Toads within Breathing type x [O2]
(Residual 2)
133
Total
167
7
7
ANOVA toad example
Source of variation
df
Between subjects (toads)
Breathing type
Toads (breathing type)
1
19
Within subjects (toads)
[O2]
Breathing type x [O2]
Toads (Breathing type) x [O2]
7
7
133
Total
167
MS
39.92
6.93
F
P
5.76
0.027
3.68 4.88 <0.001
8.05 10.69 <0.001
0.75
Partly nested ANOVA
These are experimental designs where a factor is
crossed with one factor but nested within
another.
A
B(A)
C
Reps
1
2
3
1 2 3
4 5 6
7 8 9
1 2 3
1 2 3 n
etc.
etc.
ANOVA table
The ANOVA looks like:
Source
A
B(A)
C
A*C
B(A) * C
df
(p-1)
p(q-1)
(r-1)
(p-1)(r-1)
p(q-1)(r-1)
Residual
pqr(n-1)
Linear model
yijkl = m + ai + bj(i) + dk + adik + bj(i)dk + eijkl
m
ai
bj(i)
dk
adik
bj(i)dk
eijkl
grand mean (constant)
effect of factor A
effect of factor B nested w/i A
effect of factor C
interaction b/w A and C
interaction b/w B(A) and C
residual variation
Assumptions
• Normality of DV & homogeneity of
variance:
– affects between-plots (between-subjects) tests
– boxplots, residual plots, variance vs mean
plots etc. for average of within-plot (withinsubjects) levels
• No “carryover” effects:
– results on one subplot do not influence
results one another subplot.
– time gap between successive repeated
measurements long enough to allow
recovery of “subject”
Sphericity of variancescovariances
• Sphericity of variance-covariance matrix
– variances of paired differences between levels of
within-plots (or subjects) factor must be same and
consistent between levels of between-plots (or
subjects) factor
– variance of differences between [O2] 1 and [O2] 2
= variance of differences between [O2] 2 and [O2]
2 = variance of differences between [O2] 1 and
[O2] 3 etc.
– important if MS B(A) x C is used as error terms for
tests of C and A x C
Sphericity (compound symmetry)
• More likely to be met for split-plot designs
– within plot treatment levels randomly allocated to
subplots
• More likely to be met for repeated measures
designs
– if order of within subjects treatments is
randomised
• Unlikely to be met for repeated measures
designs when within subjects factor is time
– order of time cannot be randomised
ANOVA options
• Standard univariate partly nested analysis
– only valid if sphericity assumption is met
– OK for most split-plot designs and some repeated
measures designs
• Adjusted univariate F tests for within-subjects
factors and their interactions
– conservative tests when sphericity is not met
– Greenhouse-Geisser better than Huyhn-Feldt
ANOVA options
• Multivariate (MANOVA) tests for within
subjects factors
– treats responses from each subject as multiple
DV’s in MANOVA
– uses differences between successive responses
– doesn’t require sphericity
– sometimes more powerful than GG adjusted
univariate, sometimes not
– SYSTAT & SPSS automatically produce both
Toad example
Within subjects (toads)
Source
df
[O2]
7
Breathing type x [O2] (interaction)
7
Toads within Breathing type x [O2] 133
Greenhouse-Geisser Epsilon:
F
4.88
10.69
0.4282
Multivariate tests:
Breathing type:
PILLAI TRACE: df = 7,13, F = 14.277, p < 0.001
Breathing type x [O2]
PILLAI TRACE: df = 7,13, F = 3.853, p = 0.017
P
<0.001
<0.001
GG-P
0.004
<0.001
Kohout (1995)
s
o
u
r
c
e 1 2...
s
i
n
k
..10
DV = % greening
of nodules per band
Between plates:
2 species
= Trifolium alexandrinum
= T. resupinatum
6 treatments = PIBT - sink
= PIT - BAP
= etc.
3 replicate plates per species/treatment
combination
Within plates:
10 bands
Source of variation
df
Between plots
Species
Treatment
Species x Treatment
Plates within Species & Treatment (Residual 1)
1
5
5
24
Within plots
Band
Band x Species
Band x Treatment
Band x Treatment x Species
Plots within Species & Treatment x Band (Residual 2)
9
9
45
45
216
Total
Lots
Parkinson (1996)
Billabong type
Billabong
Month
Time of day
Permanent
Temporary
Woodland
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Nov Dec Jan Feb
AM
Billabong
Billabong type
Month and Time of day
PM
subjects
between subjects
within subjects
Source of variation
df
Between subjects (bongs)
Type
Bongs within Type (Residual 1)
2
12
Within subjects (bongs)
Month
Type x Month
Month x Bongs within Type (Residual 2)
Time
Type x Time
Time x Bongs within Type (Residual 3)
Month x Time
Type x Month x Time
Month x Time x Bongs within Type (Residual 4)
3
6
36
1
2
12
3
6
36