Lecture 11

26
Analysis of variance Petter Mostad 2005.11.07

description

anova lecture

Transcript of Lecture 11

Analysis of variancePetter Mostad2005.11.07 Comparing more than two groups

!p to now we have studied situations with"#ne o$servation per o$%ect

#ne group

&wo groups"&wo or more o$servations per o$%ect

'e will now study situations with one o$servation per o$%ect( and three or more groups of o$%ects

&he most important )uestion is as usual* +o the num$ers in the groups come from the same population( or from different populations, A-#.A

/f you have three groups( could plausi$ly do pairwise comparisons. 0ut if you have 10 groups, &oo many pairwise comparisons* 1ou would get too many false positives2

1ou would really li3e to compare a null hypothesis of all e)ual( against some difference

A-#.A* A-alysis #f .Ariance #ne4way A-#.A* 56ample

Assume 7treatment results7 from 18 patients visiting one of three doctors are given* "+octor A* 29(2:(81(27"+octor 0* 2;(81(80(8:(88"+octor C* 2;(27(89(2: ums of s)uares for two4way A-#.A21@ AKiiSSG H x x== 21@ AHjjSS K x x== 21 1@ AK Hij i ji jSS! x x x x = == +21 1@ AK Hiji jSST x x= == SSG SS SS! SST + + = A-#.A ta$le for two4way data>ource of variation>ums of s)uares+eg. of freedomMean s)uares E ratio0etween groups >>F B41 M>FG >>FL@B41A M>FLM>50etween $loc3s >>0 0G >>0L@0LM>55rror >>5 @B41A@5G >>5L@B41A@>& n41&est for $etween groups effect* compare to &est for $etween $loc3s effect* comparetoMSGMS!MSMS!1(@ 1A@ 1A K K HF 1(@ 1A@ 1A H K HF &wo4way A-#.A @with interactionA

&he setup a$ove assumes that the $loc3ing varia$le influences outcomes in the same way in all categories @and vice versaA

'e can chec3 if there is interaction $etween the $loc3ing varia$le and the categories $y e6tending the model with an interaction term >ums of s)uares for two4way A-#.A @with interactionA

Assume B categories( < $loc3s( and assume I o$servations 6i%1( 6i%2( J(6i%I for each category i and each $loc3 % $loc3( so we have nGBums of s)uares for two4way A-#.A @with interactionA21@ AKiiSSG H" x x== 21@ AHjjSS K" x x == 21 1@ AK Hij i ji jSS# " x x x x = == +21 1 1@ AK H "ijli j lSST x x= = == SSG SS SS# SS! SST + + + =21 1 1@ AK H "ijl iji j lSS! x x= = == A-#.A ta$le for two4way data @with interactionA>ource of variation>ums of s)uares+eg. of freedomMean s)uares E ratio0etween groups >>F B41 M>FG >>FL@B41A M>FLM>50etween $loc3s >>0 0G >>0L@0LM>5/nteraction >>/ @B41A@/G>>/L@B41A@/LM>55rror >>5 B5G >>5LB>& n41&est for interaction* compare M>/LM>5 with &est for $loc3 effect* compare M>0LM>5 with &est for group effect* compare M>FLM>5 with 1( @ 1A K KH"F 1( @ 1A H KH"F @ 1A@ 1A( @ 1A K H KH"F -otes on A-#.AAll analysis of variance @A-#.AA methods are $ased on the assumptions of normally distri$uted and independent errors&he same pro$lems can $e descri$ed using the regression framewor3. 'e get e6actly the same tests and results2 &here are many e6tensions $eyond those mentioned