Presentation is loading. Please wait.

Presentation is loading. Please wait.

Other ANOVA designs Two-way ANOVA

Similar presentations


Presentation on theme: "Other ANOVA designs Two-way ANOVA"— Presentation transcript:

1 Other ANOVA designs Two-way ANOVA
Chapter 11

2 Two-way ANOVA In this chapter Randomized block design Factorial design

3 The randomized block design
Ex (diet experiment)에서 inbred mice를 사용함으로써 유전적 차이에 의한 error를 제거함 야생 쥐에 관심이 있을 경우 inbred 개체들을 실험에 사용하는 것은 불가능하며 실험 개체들 사이에 유전적 변이가 존재함 야생 쥐로 Fixed-effect one-way ANOVA를 사용할 경우 이러한 genetic and age 차이에 의해서 error variance가 커지고 따라서 null hypothesis를 reject하기 힘들어짐 Type II error가 커진다 Randomized block design을 사용하면 이러한 문제를 해결할 수 있다

4 The randomized block design
Error variance를 분리해내기를 원하는 특성에 따라 실험개체들을 grouping (blocked) 한다 Ex. 야생 쥐의 경우 litters (한배의 새끼)에 따라 grouping 한다 Same litter의 경우 유전적으로 유사하고 same age 이므로 따라서 이 실험의 경우 실험대상 쥐들은 두 기준 (criteria)에 의해 분류됨 Diet and litter 각 diet and litter combination에 하나의 실험 개체가 존재 (no replication) Two-way ANOVA without replication이라 부른다 Mixed effects model Diet: fixed factor; Litter: random factor

5 The randomized block design
Ex. 11.1 거의 같은 나이의 야생 쥐 10 litters를 실험 개체로 선택 Litter: 한배새끼 각 litter에서 3마리를 3 groups으로 배당한 후 다른 diet (control, junk food, health food) 처리를 함 체중 증가를 기록함 Null hypothesis?? 2개의 귀무가설 H0: groups (diets)사이에 차이가 없다 H0: litters (blocks) 사이에 차이가 없다

6 The randomized block design
Calculation steps 1. 각 행 (row)의 값을 합함 (Σxr) 2. 각 열 (column)의 값을 합함 (Σxc) 3. column total 이나 row total을 계산, 두 값이 동일 함 (Σxt) 4. 각 행의 합을 제곱 {(Σxr)2}; 제곱한 값을 다 합한 후 treatments (columns)의 수로 나눔 Σ(Σxr)2 / c In this case: Σ(Σxr)2 / c = ( … )/3 = 5. 각 열의 합을 제곱: {(Σxc)2}; 제곱한 값을 다 합한 후 rows (blocks)의 수로 나눔: Σ(Σxc)2 / r In this case: Σ(Σxc)2 / r = ( )/10 =

7 The randomized block design
Calculation steps 6. 모든 observations을 제곱한 후 합함: Σx2t (11.8)2 + (12)2 + …..+ (10.1)2 = 7. grand total을 제곱한 후 total observations으로 나눔: (Σxt)2 / nt (325.30)2 / 30 = Correction term

8 The randomized block design
Variance (분산): -1. Total variance -2. Black (little)에 의한 분산 -3. Treatments (diets)에 의한 분산 -4. Error variance (오차분산)

9 The randomized block design
Total sum of square (SSt: 6 – 7) Σx2t - (Σxt)2 / nt – = Sum of square for treatments (columns) (SSc: 5 – 7) Σ(Σxc)2 / r - (Σxt)2 / nt – = Sum of square for blocks (rows) (SSr: 4 – 7) Σ(Σxr)2 / c - (Σxt)2 / nt – = Error sum of square SSe = SSt - SSc - SSr – – = 8.557

10 The randomized block design
Total degree of freedom (dft: nt – 1) = 29 Treatments (columns) 자유도 (dfc: columns – 1) 3 – 1 = 2 Blocks (rows) 자유도 (dfr: rows – 1) 10 – 1 = 9 Error degree of freedom (dfe = dft - dfc - dfr) 29 – 2 – 9 = 18

11 The randomized block design
ANOVA table For diet treatments Critical F value in table A.6 (α=0.05, df = 2, 18) F (df = 2, 15) = 3.68 Calculated F (73.25)가 critical F value보다 훨씬 크다 따라서 null hypothesis를 reject 결론: diets 가 체중증가에 유의하게 영향을 미친다

12 The randomized block design
For blocks Critical F value in table A.6 (α=0.05, df = 9, 18) F (df = 9, 15) = 2.59 Calculated F (6.06)가 critical F value보다 훨씬 크다 따라서 second null hypothesis를 reject 결론: litters에 따라 차이가 있음 litters에 의한 error variance가 randomized block design을 사용함으로써 분리되어짐 Randomized block ANOVA로는 treatments와 blocks 사이의 interaction (교호작용)을 알 수 없다 Interaction: treatments가 blocks 에 따라 따르게 영향을 미칠 경우, 또는 combined effects of the treatments and blocks 이 개개의 treatments와 blocks effects의 합과 다를 경우 Two-way factorial design으로 interaction 을 알 수 있다

13 Exercise 3종류의 diets가 mangrove toads의 혈압에 미치는 영향을 알고자 함.
이 두꺼비는 희귀하여 한 장소에서 여러 마리가 발견되지 않음 따라서 5장소에서 3마리씩을 채집하여 random하게 grouping한 후 다른 먹이를 주고 혈압을 측정함 혈압의 차이가 diets와 관련이 있는가? Location Diet A Diet B Diet C 1 65 75 80 2 60 69 79 3 55 50 70 4 53 54 5 64 85

14 The randomized block design
Location Diet A Diet B Diet C 1 65 75 80 2 60 69 79 3 55 50 70 4 53 54 5 64 85 각행의 합 220, 208, 175, 187, 218 합의 제곱의 합 = 각열의 합 297, 317, 394 = Correction term (Σxt)2 / nt = /15 = Σx2t 69484

15 The randomized block design
Location Diet A Diet B Diet C sum 1 65 75 80 220 2 60 69 79 208 3 55 50 70 175 4 53 54 187 5 64 85 218 297 317 394 Total sum of square (SSt) Σx2t - (Σxt)2 / nt 69484 – = Sum of square for treatments (columns) (SSc) Σ(Σxc)2 / r - (Σxt)2 / nt – = Sum of square for blocks (rows) (SSr) Σ(Σxr)2 / c - (Σxt)2 / nt – = Error sum of square SSe = SSt - SSc - SSr – – =

16 The randomized block design
Total degree of freedom (dft: nt – 1) = 14 Treatments (columns) 자유도 (dfc: columns – 1) 3 – 1 = 2 Blocks (rows) 자유도 (dfr: rows – 1) 5 – 1 = 4 Error degree of freedom (dfe = dft - dfc - dfr) 14 – 2 – 4 = 8

17 The randomized block design
ANOVA table For diet treatments Critical F value in table A.6 (α=0.05, df = 2, 8) F (df = 2, 8) = 4.46 Calculated F (24.1)가 critical F value보다 훨씬 크다 따라서 null hypothesis를 reject 결론: diets 가 두꺼비의 혈압에 유의하게 영향을 미친다 Source SS df MS F Diets 1049.2 2 524.6 24.1 Blocks (location) 523.07 4 130.77 6.01 Error 174.13 8 21.77 Total 1746.4 14

18 The randomized block design
ANOVA table For locations Critical F value in table A.6 (α=0.05, df = 4, 8) F (df = 4, 8) = 3.84 Calculated F (6.01)가 critical F value보다 크다 따라서 null hypothesis를 reject 결론: location에 따라 차이가 있다 Source SS df MS F Diets 1049.2 2 524.6 24.1 Blocks (location) 523.07 4 130.77 6.01 Error 174.13 8 21.77 Total 1746.4 14

19 The factorial design 많은 경우 두 factors (treatments)가 서로 상호작용하여 각각의 factors의 합과 다른 effects를 줄 수 있다 In other word, treatments 들은 synergistically or antagonistically 영향을 미칠 수 있다 Ex. 여러 종류의 약을 동시에 먹을 경우 유해한 영향이 나타날 수 있다 Treatments 사이에 interaction이 예견될 경우 factorial design을 사용

20 The factorial design Both factors가 treatments로 고려됨
Both treatments가 fixed effects 임 Treatments 사이에 interaction이 있음 각 treatments의 combinations 은 replicated observations을 가짐 Two-way ANOVA with replication이라 불림

21 The factorial design Ex. 11.2: a factorial design ANOVA
Diets 와 stress가 생쥐의 체중증가에 미치는 영향을 알고자 함 Interaction effects도 알고자 함 32마리의 inbred mice를 실험동물로 사용 Random 하게 4 groups으로 나눔 (8마리 씩) Treatments Diet: 2 treatments: junk food and control food Stress: 2 treatments: High stress and low stress Group 1: junk food + low stress Group 2: junk food + high stress Group 3: control food + low stress Group 4: control food + high stress

22 The factorial design Ex. 11.2: a factorial design ANOVA
High stress: 매일 8시간 rap music Low stress: 매일 8시간 classical music Null hypothesis 1. Effect of stress H0: Low = High vs Ha: Low ≠ High 2. Effect of diet H0: Control = Junk food vs Ha: Control ≠ Junk food 3. Interaction effect H0: no interaction vs Ha: interaction

23 The factorial design Variance (분산): -1. Total variance -2. Diet에 의한 분산
-3. Stress에 의한 분산 -4. Interaction에 의한 분산 -5. Error variance (오차분산)

24 The factorial design Preliminary calculations as shown in Table 7.11

25 The factorial design Total sum of square (SSt) Σx2t - (Σxt)2 / nt
– (4332)2/32 = Sum of square for stress (SSs) (ΣxL)2 / nL + (ΣxH)2 / nH - (Σxt)2 / nt (2058)2/16 + (2274)2/16 - (4332)2/32 = 1458 Sum of square for diet (SSd) (ΣxJ)2 / nJ + (ΣxR)2 / nR - (Σxt)2 / nt (2278)2/16 + (2054)2/16 - (4332)2/32 = 1568

26 The factorial design Sum of square for interaction (SSi)
(ΣxHR)2 / nHR + (ΣxLR)2 / nLR + (ΣxHJ)2 / nHJ + (ΣxLJ)2 / nLJ - (Σxt)2 / nt – SSs – SSd (1060)2/8 + (998)2/8 + (1218)2/8 + (1056)2/8 - (4332)2/32 – 1458 – 1568 = 312.5 Error sum of square SSe = SSt - (SSs + SSd + SSi) 4561 – ( ) =

27 The factorial design Degree of freedom for each main effect
Groups – 1 = 2 – 1 = 1 Degree of freedom for interaction dfstress * dfdiet = 1 * 1 = 1 Total degree of freedom nt – 1 = 32 – 1 = 31 Error degree of freedom dfe = dft - dfs - dfd - dfi = 31 – 1 – 1 – 1 = 28

28 The factorial design Fstress = 1458 / 48.32 = 30.18 (df = 1, 28)
Fdiet = 1568 / = (df = 1, 28) Finter = / = 6.47 (df = 1, 28) Critical F value in Table A.6 (α=0.05, df = 1,25): 4.24 Calculated F value가 critical F value보다 크다 따라서 귀무가설을 reject Stress 와 diet가 체중증가에 영향을 미치며 두 factors 사이에 interaction이 있다

29 The factorial design No interaction의 경우 두 직선이 평행하다
두 직선이 평행하지 않으므로 두 treatments 사이에 interaction이 있다 Junk food의 경우 high stress에 의해 체중증가 효과가 향상된다

30 The Friedman test The Friedman two-way ANOVA Ex. 11.5
Randomized block design의 nonparametric test Related samples Ex. 11.5 뱀은 연속적인 자극에 반응이 점점 약화된다 Habituation (습관화) 된다 6마리의 뱀을 random하게 선택하여 chamber에 넣어 약 30분간 순화시킴 빨리 움직이는 물체를 뱀 머리위로 10초 간격으로 연속적으로 지나가게 함 뱀의 반응 정도를 3 (즉시 반응) – 0 (no response)로 기록

31 The Friedman test Measurement scale?? Ordinal scale
따라서 nonparametric test를 사용해야 함 각 개체들은 연속적으로 test 되었으므로 observations들은 independent 하지 않음: related sample

32 The Friedman test 각 행 (row)의 값을 ranked: 각각의 행을 독립적으로 rank 함(각 행 내에서만 비교하므로) Logic of this test Treatments에 따라 차이가 없다면 각 columns의 rank의 합은 거의 같을 것이다 Test statistic: χ2 (chi-square)

33 The Friedman test k columns (8) and n rows (6)
ΣRi: sum of rank of a column = 12/6×8×9 {(45.5)2 + (35.5)2 + (23)2 + (26.5)2 + (27)2 + (23.5)2 + (19)2 + (16)2} – (3×6×9) = 17.44 Degree of freedom: k – 1 = 8 – 1 = 7 Critical chi-square value from Table A.3: 14.07 Calculated chi-square value가 critical value보다 크다 자극시간에 따른 차이가 없다는 귀무가설을 reject 결론: 뱀은 연속적인 자극에 약화되는 반응을 보인다

34 Homework 45마리의 guppy 암컷을 9 groups으로 random하게 나눔
물의 온도 3가지 (70ºF, 75ºF, 80ºF), 3 가지 feeding 횟수 (1, 2, 3회)로 two-way factorial design Offspring (새끼)의 수가 수온이나 feeding 횟수에 영향을 받는가? 이 두 factors의 interaction이 있는가? Both by hand and using computer software

35 Number of daily feedings
Homework Temperature Number of daily feedings 1 2 3 70°F 18 25 28 20 30 36 15 19 29 27 37 75°F 33 39 32 42 17 38 47 80°F 35 51 48 40 55


Download ppt "Other ANOVA designs Two-way ANOVA"

Similar presentations


Ads by Google