Download presentation
Presentation is loading. Please wait.
Published byAldous Washington Modified over 8 years ago
2
1 An example of a more complex design (a four level nested anova) 0 %, 20% and 40% of a tree’s roots were cut 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
3
2 40% 20% 0% Four level nested anova Tree (b = 2 ) Replicate (r = 2) Model: β (i)j is ND(0, σ (a)b 2 ) Leaf (c = 3 ) 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 Treatment (a = 3) γ (ij)k is ND(0, σ (ab)c 2 )
4
3 SourcecdfMSE[MS]F Treatments Trees Leaves Error a-1 a(b-1) ab(c-1) abc(r-1) MS a MS (a)b MS (ab)c MS e bcrσ a 2 +cr σ (a)b 2 + r σ (ab)c 2 +σ 2 cr σ (a)b 2 + r σ (ab)c 2 +σ 2 r σ (ab)c 2 +σ 2 σ 2 MS a /MS (a)b MS (a)b /MS (ab)c MS (ab)c /MS e MS e MS (ab)c = rs (ab)c 2 + s 2 → MS (a)b = cr s (a)b 2 + r s (ab)c 2 +s 2 = cr s (a)b 2 + MS (ab)c → MS a = bcrs a 2 +cr s (a)b 2 + r s (ab)c 2 +s 2 = bcrs a 2 +MS (a)b →
5
4 How do it with SAS
6
5 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; 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 ;
7
6 General Linear Models Procedure Dependent Variable: NITRO Source DF Sum of Squares Mean Square F Value Pr > 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 > F TREAT 2 71.78000000 35.89000000 36.40 0.0001 TREE(TREAT) 3 36.04666667 12.01555556 12.18 0.0001 LEAF(TREAT*TREE) 12 26.21333333 2.18444444 2.22 0.0618 Source DF Type III SS Mean Square F Value Pr > F TREAT 2 71.78000000 35.89000000 36.40 0.0001 TREE(TREAT) 3 36.04666667 12.01555556 12.18 0.0001 LEAF(TREAT*TREE) 12 26.21333333 2.18444444 2.22 0.0618 NB! These values are based on MS e as the error term, which is wrong!
8
7 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; 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 ;
9
8 General Linear Models Procedure Source Type III Expected Mean Square TREAT Var(Error) + 2 Var(LEAF(TREAT*TREE)) + 6 Var(TREE(TREAT)) + Q(TREAT) TREE(TREAT) Var(Error) + 2 Var(LEAF(TREAT*TREE)) + 6 Var(TREE(TREAT)) LEAF(TREAT*TREE) Var(Error) + 2 Var(LEAF(TREAT*TREE)) bcrτ a 2 +cr σ (a)b 2 + r σ (ab)c 2 +σ 2 cr σ (a)b 2 + r σ (ab)c 2 +σ 2 r σ (ab)c 2 +σ 2
10
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 h=treat e= tree(treat); /* tests for the difference between treatments with MS for tree(treat) as denominator */ TEST h= tree(treat) e=leaf(tree treat); /* tests for the difference between trees with MS for leaf(tree treat) as denominator*/
11
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 > F TREAT 2 71.78000000 35.89000000 2.99 0.1933 Tests of Hypotheses using the Type III MS for LEAF(TREAT*TREE) as an error term Source DF Type III SS Mean Square F Value Pr > F TREE(TREAT) 3 36.04666667 12.01555556 5.50 0.0130
12
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 h=treat e= tree(treat); /* tests for the difference between treatments with MS for tree(treat) as denominator */ TEST h= tree(treat) e=leaf(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;
13
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
14
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
15
14 PROC NESTED; CLASS treat tree leaf; VAR Nitro; RUN;
16
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 SourcecdfMSE[MS]F Treatments Trees Leaves Error a-1 a(b-1) ab(c-1) abc(r-1) MS a MS (a)b MS (ab)c MS e bcrσ a 2 +cr σ (a)b 2 + r σ (ab)c 2 +σ 2 cr σ (a)b 2 + r σ (ab)c 2 +σ 2 r σ (ab)c 2 +σ 2 σ 2 MS a /MS (a)b MS (a)b /MS (ab)c MS (ab)c /MS e MS e
17
16 Nested Random Effects Analysis of Variance for Variable NITRO Degrees Variance of Sum of Error Source Freedom Squares F Value Pr > 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 s 2 =MS e
18
17 The problem of pseudoreplication
19
18 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 3 1 2 3 1 2 3 A B C Two-way anova (A fixed, B random) Factor A (drug) Factor B (patient) Replicate 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!
20
19 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 1 2 3123123 ABC 1 2 1 2 3 4 5 6 A 1 2 3 4 5 6 1 2 3 4 5 6 C B Design 1 Design 2 Both experiments have 36 measurements 3 experimental units/treatment 6 experimental units/treatment Pseudoreplicates Design 2 is best because it uses 6 experimental units/treatment
21
20 40% 20% 0% Four level nested anova Tree (b = 2 ) Replicate (r = 2) Leaf (c = 3 ) 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 2 2 1 2 3 Treatment (a = 3) Trees are the experimental units (2 replicates/treatment) Pseudoreplicates
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.