An example of a more complex design a four level nested anova - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

An example of a more complex design a four level nested anova

Description:

?(ij)k is ND(0, s(ab)c2) 3. MSa/MS(a)b. MS(a)b/MS(ab)c. MS(ab)c/MSe. MSe ... Degrees. Variance of Sum of Error. Source Freedom Squares F Value Pr F Term ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 21
Provided by: GnaC6
Category:
Tags: anova | complex | degree | design | example | four | level | more | nested | run | up

less

Transcript and Presenter's Notes

Title: An example of a more complex design a four level nested anova


1
An example of a more complex design (a four level
nested anova)
with the purpose to study the influence of water
stress on leaf nutrients
Each treatment was applied to two randomly
selected trees
Three randomly selected leaves were sampled per
tree
From each leaf, two leaf discs were analysed
Thus, the total sample consisted of 36 leaf discs
2
Four level nested anova
Treatment (a 3)
40 20
0
Tree (b 2 )
1
2
1
2
1
2
Leaf (c 3 )
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
Replicate (r 2)
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
ß(i)j is ND(0, s(a)b2)
?(ij)k is ND(0, s(ab)c2)
3
MS(ab)c rs(ab)c2 s2
MS(a)b cr s(a)b2 r s(ab)c2 s2
cr s(a)b2 MS(ab)c
MSa bcrsa2 cr s(a)b2 r s(ab)c2 s2
bcrsa2 MS(a)b
4
How do it with SAS
5
DATA nested / Nested anova (eks 6-4 in
the lecture notes) / INFILE 'H\lin-mod\eks6x.prn
' firstobs 2 INPUT treat tree leaf disc
Nitro
PROC GLM CLASS treat tree leaf disc MODEL Nitro
treat tree(treat) leaf(tree treat) /
treatment is a fixed factor, while trees and
leaves are random / RANDOM tree(treat) leaf(tree
treat) / gives the expected means squares
/ RUN
6
General Linear Models Procedure Dependent
Variable NITRO Source DF
Sum of Squares Mean Square F Value Pr gt
F Model 17 134.04000000
7.88470588 8.00 0.0001 Error
18 17.75000000
0.98611111 Corrected Total 35
151.79000000 R-Square
C.V. Root MSE NITRO Mean
0.883062 3.271932
0.99303127 30.35000000 Source
DF Type I SS Mean Square F
Value Pr gt F TREAT 2
71.78000000 35.89000000 36.40
0.0001 TREE(TREAT) 3
36.04666667 12.01555556 12.18
0.0001 LEAF(TREATTREE) 12
26.21333333 2.18444444 2.22
0.0618 Source DF Type
III SS Mean Square F Value Pr gt F TREAT
2 71.78000000
35.89000000 36.40 0.0001 TREE(TREAT)
3 36.04666667 12.01555556
12.18 0.0001 LEAF(TREATTREE) 12
26.21333333 2.18444444 2.22 0.0618
7
DATA nested / Nested anova (eks 6-4 in
the lecture notes) / INFILE 'H\lin-mod\eks6x.prn
' firstobs 2 INPUT treat tree leaf disc
Nitro
PROC GLM CLASS treat tree leaf disc MODEL Nitro
treat tree(treat) leaf(tree treat) /
treatment is a fixed factor, while trees and
leaves are random / RANDOM tree(treat) leaf(tree
treat) / gives the expected means squares
/ RUN
8
cr s(a)b2 r s(ab)c2 s2
bcrta2 cr s(a)b2 r s(ab)c2 s2
General Linear Models Procedure Source
Type III Expected Mean Square TREAT
Var(Error) 2 Var(LEAF(TREATTREE)) 6
Var(TREE(TREAT))
Q(TREAT) TREE(TREAT) Var(Error) 2
Var(LEAF(TREATTREE)) 6 Var(TREE(TREAT)) LEAF(T
REATTREE) Var(Error) 2 Var(LEAF(TREATTREE))
r s(ab)c2 s2
9
PROC GLM CLASS treat tree leaf disc MODEL Nitro
treat tree(treat) leaf(tree treat) /
treatment is a fixed factor, while trees and
leaves are random / RANDOM tree(treat) leaf(tree
treat) / gives the expected means squares
/ TEST htreat e tree(treat) / tests for
the difference between treatments with MS for
tree(treat) as denominator / TEST h tree(treat)
eleaf(tree treat) / tests for the difference
between trees with MS for leaf(tree treat) as
denominator/
10
General Linear Models Procedure Dependent
Variable NITRO Tests of Hypotheses using the
Type III MS for TREE(TREAT) as an error
term Source DF Type III
SS Mean Square F Value Pr gt F TREAT
2 71.78000000
35.89000000 2.99 0.1933 Tests of
Hypotheses using the Type III MS for
LEAF(TREATTREE) as an error term Source
DF Type III SS Mean Square
F Value Pr gt F TREE(TREAT) 3
36.04666667 12.01555556 5.50
0.0130
11
PROC GLM CLASS treat tree leaf disc MODEL Nitro
treat tree(treat) leaf(tree treat) /
treatment is a fixed factor, while trees and
leaves are random / RANDOM tree(treat) leaf(tree
treat) / gives the expected means squares
/ TEST htreat e tree(treat) / tests for
the difference between treatments with MS for
tree(treat) as denominator / TEST h tree(treat)
eleaf(tree treat) / tests for the difference
between trees with MS for leaf(tree treat) as
denominator/ MEANS treat / Tukey
Dunnett('Control') e tree(treat) cldiff /
finds possible significant differences between
treatments and the control and the other
treatments / RUN
12
Tukey's Studentized Range (HSD) Test for
variable NITRO NOTE This test
controls the type I experimentwise error rate.
Alpha 0.05 Confidence 0.95 df 3
MSE 12.01556 Critical Value
of Studentized Range 5.910
Minimum Significant Difference 5.9134
Comparisons significant at the 0.05 level are
indicated by ''.
Simultaneous Simultaneous
Lower Difference
Upper TREAT Confidence
Between Confidence Comparison
Limit Means Limit
20 - 40 -3.663 2.250
8.163 20 - Control -2.513
3.400 9.313 40 - 20
-8.163 -2.250 3.663
40 - Control -4.763 1.150
7.063 Control - 20 -9.313
-3.400 2.513 Control - 40
-7.063 -1.150 4.763
13
Dunnett's T tests for variable NITRO
NOTE This tests controls the type I
experimentwise error for
comparisons of all treatments against a
control. Alpha 0.05
Confidence 0.95 df 3 MSE 12.01556
Critical Value of Dunnett's T 3.866
Minimum Significant
Difference 5.4714 Comparisons
significant at the 0.05 level are indicated by
''.
Simultaneous Simultaneous
Lower Difference
Upper TREAT Confidence
Between Confidence Comparison
Limit Means Limit
20 - Control -2.071 3.400
8.871 40 - Control -4.321
1.150 6.621
14
PROC NESTED CLASS treat tree leaf VAR
Nitro RUN
15
Coefficients of Expected Mean Squares
Source TREAT TREE LEAF
ERROR TREAT 12
6 2 1 TREE
0 6 2 1
LEAF 0 0
2 1 ERROR 0
0 0 1
16
Nested Random Effects Analysis of Variance for
Variable NITRO Degrees Variance
of Sum of
Error Source Freedom
Squares F Value Pr gt F
Term TOTAL 35 151.790000 TREAT
2 71.780000 2.987
0.1933 TREE TREE 3
36.046667 5.501 0.0130
LEAF LEAF 12 26.213333
2.215 0.0618 ERROR ERROR
18 17.750000 Variance
Variance Percent Source
Mean Square Component of
Total TOTAL 4.336857 5.213333
100.0000 TREAT 35.890000
1.989537 38.1625 TREE
12.015556 1.638519
31.4294 LEAF 2.184444
0.599167 11.4930 ERROR
0.986111 0.986111 18.9152
Mean
30.35000000 Standard error of
mean 0.99847105
17
The problem of pseudoreplication
18
Two-way anova (A fixed, B random)
Factor A (drug)
A B C
Factor B (patient)
1 2 3 1 2 3 1
2 3
Replicate
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
2
18 measurements
If we want to increase the power of the analysis,
we may e.g. double the number of measurements
But be careful about what you do!
19
A
B
C
2
1
3
1
2
3
1
2
3
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2
3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
Design 1
Both experiments have 36 measurements
A
B
C
1
2
3
4
5
6
1
2
3
4
5
6
1
2
3
4
5
6
Design 2 is best because it uses 6 experimental
units/treatment
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
Design 2
20
Four level nested anova
Treatment (a 3)
40 20
0
1
2
1
2
1
2
Tree (b 2 )
Leaf (c 3 )
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
Replicate (r 2)
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
1 2 1 2 1 2
Write a Comment
User Comments (0)
About PowerShow.com