Download presentation
Presentation is loading. Please wait.
Published byMiles Woods Modified over 8 years ago
1
Analysis of Variance Yonghui Dong 03/12/2013
2
Why not multiple t tests comparison? Three Groups comparison: Group 1 vs. Group 2 Group 1 vs. Group 3 Group 2 vs. Group 3 type I error possibility for 3 groups >1-0.95^3 >0.14 type I error possibility for 20 groups >1-0.95^20 >0.65 Type I error: incorrect rejection of a true null hypothesis
3
Warm up: Two distributions If X 1,X 2,…,X m are m independent random variables having the standard normal distribution, then V=X 1 2 +X 1 2 +…X m 2 ~X 2 (m) follows a Chi Squared distribution with m degrees of freedom
4
Types of ANOVA One-way independent Two-way independent One-way repeated …
5
ANOVA Models Fixed effect: the level of treatment is fixed. You want to compare the if the levels of treatment are the same. Random effect: the k levels of treatment are chosen at random. You want to estimate the components of variance. FE: If if those particular fertilizers have an impact on the result. RE: assume that you picked 3 fertilizers randomly from all possible fertilizers, and ask about the effect of fertilizer in general. A1A2A3 192120 232418 212719 132215
6
ANOVA model (1) : Fixed Model A1A2A3 192120 232418 212719 132215 One-way independent ANOVA:
7
Decomposition of MS and df SS T = SS A + Ss e f T = f A +f e
8
How big is significant? --F test SS T = SS A + SS e Such mean squared decomposition is meaningful: Since SS A is much bigger than SS e, we could conclude that there are treatment effects, else no. Fixed Effect model H 0 : a 1 =a 2 =….a a =0; H A : not all a i are equal to 0 or H 0 : u 1 =u 2 =….u a ; H A : not all u i are equal ------------------------------------------------------------------------------------------------------------------------- Under H 0 : 1)SS A and SS e are independent 2)MSS A ~ X 2 (a-1), MSS e ~ X 2 [a(r-1)] 3)MSS A / MSS e ~ F (a-1, a(r-1))
9
ANOVA model (2) : Random Model A1A2A3 192120 232418 212719 132215
10
F test for random effect model Random Effect model H 0 : σ 2 A =0; H A : σ 2 A !=0 ------------------------------------------------------------------------------------------------------------------------- Under H 0 : 1)MS A and MS e are independent 2)MS A /MS e ~ F[a-1, a(r-1)]
11
A big picture SourcedfSSMSFEMS FE RE Aa-1SS A MS A σ 2 +rσ 2 A ea(r-1)SS E MS e σ2 σ2 σ2σ2 Totalar-1SS T \\\\ Steps: Choose your model Calculate each element in the table Perform F test For Fixed Effect model, if H 0 is rejected, multiple comparison with LSD, LSR …. For Random effect model, estimate the component of variance
12
One way ANOVA example: fixed effect model A1A2A3 192120 232418 212719 132215 SST= 156, SSA=56, SSe=100 ; f T =11, f A =2, f e =9 F=2.52 ----- F(a=0.05)=3.98 >summary(aov(value~treatment, mydata)) Df Sum Sq Mean Sq F value Pr(>F) t 2 56 28.00 2.52 0.135 Residuals 9 100 11.11 While for pair wise t-test, A2 and A3 are found to be statistically different (p=0.046)
13
One way ANOVA example: random effect model A1A2A3 192120 232418 212719 132215 SST= 156, SSA=56, SSe=100 ; f T =11, f A =2, f e =9 MS A =28, MS e =11.11 --------------------------------------------------------------------------------------------- ESA=σ 2 +rσ 2 A, ESe=σ 2 σ 2 A = (ESA-Ese)/r = 4.22 So the total variance is 4.22+11.11=15.33 Contribution of fertilizer=4.22/15.33=28%
14
Two way ANOVA example SoilFertilizer NPK Type 14,5,6,57,8,9,1210,12,11,9 Type 26,6,4,413,15,12,1212,13,10,13 SourceDfSSMSSFF a (0.05) A (Fertilizer)(a-1)=21928138.37***3.55 B (soil type)(b-1)=124 11.37***4.41 AxB(a-1)*(b-1)=21262.843.55 withinab*(r-1)=18382.11 totalN-1=23
15
Take home messages Two way ANOVA is advantageous over 2 one way ANOVA: 1.More efficient 2.Reduce the residual variation in a model by including a second factor 3.Investigate interactions between factors Don’t forget Three assumptions before ANOVA: 1.Independence 2.Homogeneity 3.Normally distributed
16
Thank you
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.