Example: dental hygienist

Chapter 6 Randomized Block Design Two Factor ANOVA ...

Chapter 6 Randomized Block DesignTwo Factor ANOVAI nteraction in ANOVATwo Factor (two way) ANOVATwo Factor ANOVA is used when: Y is a quantitative response variable There are two categorical explanatory variables, called Factors: Factor A has K levels, k =1, .., K Factor B has J levels, j = 1, .., J The combination of level k for A and level j for B has sample size nkjbut if all equal, just use n. Use N for overall sample case: Using BLOCKS Definition: A Block is a group of similar units, or the same unit measured multiple are used to reduce known sources of variability, by comparing levels of a Factor within (explained in detail in class): Factor = 3 methods of reducing blood pressure; Blocks defined using initial blood pressure. Factor = 4 methods for enhancing memory; Blocks defined by age. Factor = Impairment while driving (alcohol, marijuana, no sleep, control); Blocks = individuals.

Randomized Block Design Two Factor ANOVA Interaction in ANOVA. ... be parallel. Interaction: Differences in A depend on level of B. 50 60 70 80 Chemical mean of Ti me A1 A2 A3 Type Wood Gas However, looks like almost no overall A effect or B …

Tags:

  Parallel, Randomized

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Chapter 6 Randomized Block Design Two Factor ANOVA ...

1 Chapter 6 Randomized Block DesignTwo Factor ANOVAI nteraction in ANOVATwo Factor (two way) ANOVATwo Factor ANOVA is used when: Y is a quantitative response variable There are two categorical explanatory variables, called Factors: Factor A has K levels, k =1, .., K Factor B has J levels, j = 1, .., J The combination of level k for A and level j for B has sample size nkjbut if all equal, just use n. Use N for overall sample case: Using BLOCKS Definition: A Block is a group of similar units, or the same unit measured multiple are used to reduce known sources of variability, by comparing levels of a Factor within (explained in detail in class): Factor = 3 methods of reducing blood pressure; Blocks defined using initial blood pressure. Factor = 4 methods for enhancing memory; Blocks defined by age. Factor = Impairment while driving (alcohol, marijuana, no sleep, control); Blocks = individuals.

2 Simple Block Design , all nkj= 1A simple Block Design has two factors with: Exactly one data value (observation) in each combination of the factors. Factor A is Factor of interest, called treatment Factor B, called blocks, used to control a known source of variabilityMain interest is comparing levels of the : Factor A (Treatments) has KlevelsFactor B (Blocks) has J levels N = KJ data valuesExample: Do Means Differ for 4 Exam Formats?Treatments: 4 different exam formats, Blocks: 5 different studentsQuestion: Is there a difference in population means for the 4 exams?Use students as blocksbecause we know student abilities differ. Controls for that knownsource of #1: Exam #2:Exam #3:Exam #4: 62 94 68 86 5087 95 93 97 6374 86 82 70 2877 89 73 79 47 Mean 75 91 79 83 47 Adam Brenda Cathy Dave EmilyMean7287687375 Two way ANOVA : Main Effects ModelShown here for simple Block Design jkYGrand meanEffect for kthtreatmentRandom errorEffect for jthblockMean of all exams for all studentsHow mean for kthexam differs from overall meanHow mean for jthstudent differs from overall meanRandomized Block Calculations1.

3 Find the mean for each treatment (row means), each Block (column means), and grand Partition the SSTotalinto three pieces:22)1()(YsnyySSTotal (As usual) 2)(yyJSSAkCompare row means (exams) 2)(yyKSSBjCompare column means (students)SSBSSASST otalSSE SSESSBSSASST otal (Unexplained error) Randomized Block ANOVA TableSource p-value Trts = A Blocks Error Total K-1N-1(K-1)(J-1)SSTrSSESST otalSSE/(K-1)(J-1)MSTr/MSESSTr/(K-1)SSBJ -1 SSB/(J-1)MSB/MSET esting TWO hypotheses:H0: 1= 2 = .. = K= 0Ha: Some k 0( Factor A: Difference in treatment means)H0: 1= 2 = .. = J= 0Ha: Some j 0( Factor B: Difference in Block means) ANOVA Output in R>BlockMod=aov(Grade~ (Exam)+Student)>summary(BlockMod)Df Sum Sq Mean Sq F value Pr(>F) (Exam)3 1030 * Student 4 **Residuals 12 >model=aov(Grade~ (Exam))>summary(model)Df Sum Sq Mean Sq F value Pr(>F) (Exam)3 16 if we ignored Blocks (Students) and treated it as a one- Factor ANOVA ?

4 (See Lecture 15 didn t take into account blocks!)Ignoring student effect, exams don t seem to differ; but including student effect, exams do differ. SS(Student) becomes part of SSE if Blocks are ignored, which inflatesthe estimate of the standard Installing Three Packages in R: gplots, gdata, gtools>plotmeans(Grade~Exam)>plotmeans(G rade~Student)95% CI s for each group mean are shown in 50 60 70 80 90 100 ExamGrade1234n=5 n=5 n=5 n=5406080100 StudentGradeAdamCathyEmilyn=4 n=4 n=4 n=4 n=4 Fisher s LSD CIs After Two Way ANOVA in a Simple Block DesignSame as one-way, but we know that meanscolumn for 2means rowfor 211 KJnnjiJMSEtLSD2* For treatment (row) means: KMSEtLSD2* For Block (column) means: Two way ANOVA model with Interaction kjjkYGrand meanMain effect for Factor ARandom errorMain effect for Factor BInteraction effectWhat s an Interaction Effect?

5 An interaction effectoccurs when differences in mean level effects for one Factor depend on the level of the other : Y = GPAF actor A = Year in School (FY, So, Jr, Sr) Factor B = Major (Psych, Bio, Math)FY is hard. 1< 0 (Main effect)Bio is easy. 2> 0 (Main effect)Jr in Math is harder than just Jror just Math 33< 0 (Interaction effect)Example Fire extinguishers tested to see how quickly they put out fires. Factor A: 3 different chemicals in the extinguishers A1, A2, A3 Factor B: 2 types of fires, B1= wood, B2= gasYkj=time to put out the fire of type Bjwith chemical AkQuestions of interest: Do the 3 chemicals differ in mean time required? (If so, there is a Factor A effect.) Does mean time to put out fire dependon the type of fire? (If so, there is a Factor B effect.) Do the differences in times for the 3 chemicals depend on the type of fire?

6 (If so, there is an interactionbetween chemical type and fire type.)Example: Putting out firesFactor A:Chemical (A1, A2, A3) Factor B:Fire type (wood, gas)Response: Time until fire is completely out (in seconds)Data:Wood (j=1)Gas (j=2)A1 (k=1)52 64 72 60A2 (k=2)67 55 78 68A3 (k=3)86 72 43 51K = 3J = 2n= 2N = 12 Interpreting InteractionGraphical:Cell means plot (Interaction plot)Data: Plot via R> (FactorA,FactorB,Y)> (Chemical,Type,Time)> (Type,Chemical, Time)ORGeneric> (Type,Chemical,Time)50 60 70 80 Typemean of TimeGasWood ChemicalA3A2A1 Levels of Factor A (Chemical)Interpretation discussed in of Factor B (Type of Fire)Levels of Factor A (Chemical)50 60 70 80 Chemicalmean of TimeA1A2A3 TypeWoodGasLevels of Factor B (Type of Fire)> (Chemical,Type,Time)Interpretation discussed in way ANOVA (with Interaction) kjjkYGrand meanMain effect for Factor ARandom errorMain effect for Factor BInteraction effectGeneric Interaction Plots: 7 Cases Y Suppose A has three levels and B has two mean only (no treatment effects) Y k Treatment A Effect, No Treatment B EffectMeans differ for levels of A, not for levels of B.

7 Y j Treatment B Effect, No Treatment A EffectMeans differ for levels of B, not for levels of A. Y k j Treatments A and B Have Effects, No InteractionDifferences between the 2 levels of Factor Bdon t depend on level of Factor A (and vice versa). Y k j kj A and B Effects Plus Interaction Y j kj No A Effect but a B Effect Plus InteractionCannot say means of A do not differ! They do, at each level of B. Y k kj A Effect but No B Effect Plus InteractionCannot say means of B do not differ! They do, at each level of like a significantinteractionNointeraction: lines would be : Differences in A dependon level of 60 70 80 Chemicalmean of TimeA1A2A3 TypeWoodGasHowever, looks like almost no overall A effect or B effect! Chapter 6 Section Gory Details!Recall: Main Effects Model jkYGrand MeanEffect for kthlevel of Factor A Random errorEffect for jthlevel of Factor BFactorial ANOVA Example: Putting out firesFactor A: Chemical (A1, A2, A3) Factor B: Fire type (wood, gas)Response: Time required to put out fire (seconds)Data:WoodGasA152 64 72 60A267 55 78 68A386 72 43 51 Col mean6662 Row mean626763 Two way ANOVA (with Interaction) kjjkYGrand meanMain effect for Factor ARandom errorMain effect for Factor BInteraction effectFactorial DesignAssume: Factor A has Klevels, Factor B has estimate an interaction effect, we need more than oneobservation for each combination of nkj= sample size in (k,j) : For a balanced Design , nkjis constant for all nn = 1 in a typical Randomized Block designn> 1 in a balanced factorial designFire ExtinguishersFactor A.

8 Chemical (A1, A2, A3) Factor B:Fire type (wood, gas)Response: Time required to put out fire (seconds)Data: WoodGasA152 64 72 60A267 55 78 68A386 72 43 51K = 3J = 2n= 2N = 12 Estimating Factorial Effects)()()()()(kjjkkjjkyyyyyyyyyyyy mean Grand yrow for mean thkky column for mean thjjy cell),(for mean thkjjky Total= Factor A+ Factor B+Interaction+ Error kjjkySSTotal=SSA+SSB+SSAB+SSEP artitioning Variability (Balanced)22()(1)YSST otalyyNs (As usual)2()kkSSAJn yy (Row means)2()jjSSBKn yy (Column means)2,()kjkjkjSSAB nyyyy SSTotal SSA SSB SSAB(Cell means)(Error)SSESSABSSBSSASST otal SSE y ykj 2 Total= Factor A+ Factor B+Interaction+ Error Data: WoodGasA152 64 72 60A267 55 78 68A386 72 43 51 Decomposition: Fire extinguishersCell Means:Wood GasRow meanTrt A + 1 Col mean666264 Trt B effect+2 2 Interaction effectsWood GasRow meanTrt A effectA1 6662 2A2 8867+3A314 1463 1 Col mean666264 Trt B effect+2 258 66 62 + 64 = 6 Decomposition: Fire Extinguishers52 =64+-2 +2+-6 + -664 =64+-2 +2 +-6 + 672 =64+-2 +-2 + 6 + 660 =64+-2 +-2 +6 + -6 Top left cell: 52,64 Top right cell: 72,60 Observed ValueGrand MeanTrt A EffectResidualTrt B way ANOVA Table (with Interaction)Source AK 1 SSASSA/(K 1)MSA/MSEF actor BJ 1 SSBSSB/(J 1)MSB/MSEA B(K 1)(J 1)SSABSSAB/dfMSAB/MSEE rrorKJ(n 1)SSESSE/dfTotalN 1 SSYH0: 1= 2 =.

9 = K= 0H0: 1= 2 = .. = J= 0H0: All kj= 0 Recall: Randomized Block ANOVA TableSource p-value Trts/A Block Error Total K 1N 1(K 1) (J 1)SSTrSSESST otalSSE/(K 1)(J 1)MSTr/MSESSTr/(K 1)SSBJ 1 SSB/(J 1)MSB/MSE(Looking back) If n= 1 then df(interaction) = 0 Fire Example: Two way ANOVA Table, with InteractionSource : 1= 2 = .. = K= 0H0: 1= 2 = .. = J= 0H0: All kj= 0 Two way ANOVA with ROption #1 aov> model=aov(Time~Chemical+Type+Chemical:Ty pe)> summary(model)Df Sum Sq Mean Sq F value Pr(>F) Chemical 2 56 28 Type 1 48 48 Chemical:Type 2 1184 592 *Residuals 6 396 66 Two way ANOVA with ROption #2 ANOVA (lm), when predictors are categorical> ANOVA (lm(Time~Chemical+Type+Chemical:Typ e))Analysis of Variance TableResponse: TimeDf Sum Sq Mean Sq F value Pr(>F) Chemical 2 56 28 Type 1 48 48 Chemical:Type 2 1184 592 *Residuals 6 396 66 If sample sizes are notequal, order matters.

10 New example (on website): Y = GPAE xplanatory variables are:Seat location (front, middle, back)Alcohol consumption (none, some, lots)


Related search queries