7-2 Factorial Experiments
7-2 Factorial Experiments A significant interaction mask the significance of main effects. Consequently, when interaction is present, the main effects of the factors involved in the interaction may not have much meaning.
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels Two-Way Factorial Model 𝑌 𝑖𝑗𝑘 =𝜇+ 𝛼 𝑖 + 𝛽 𝑗 + (𝛼𝛽) 𝑖𝑗 + 𝜀 𝑖𝑗𝑘 = 𝜇 𝑖𝑗 + 𝜀 𝑖𝑗𝑘 where 𝜇= 𝑖=1 𝑎 𝑗=1 𝑏 𝜇 𝑖𝑗 𝑎𝑏 =𝑜𝑣𝑒𝑟𝑎𝑙𝑙 𝑚𝑒𝑎𝑛 𝛼 𝑖 = 𝜇 𝑖∙ −𝜇 = A main effect, i = 1, ∙∙∙∙, 𝑎 𝛽 𝑗 = 𝜇 ∙𝑗 −𝜇 = B main effect, i = 1, ∙∙∙∙, 𝑏 (𝛼𝛽) 𝑖𝑗 = 𝜇 𝑖𝑗 − 𝜇 𝑖∙ − 𝜇 ∙𝑗 +𝜇 = Interaction effect 𝜀 𝑖𝑗𝑘 = Error term, which is assumed to be normally distributed with constant variance Hypothesis A main Effect Hypothesis: 𝐻 0 : 𝜇 1∙ = 𝜇 2∙ =∙∙∙= 𝜇 𝑎∙ 𝑜𝑟 𝐻 0 : 𝛼 1 = 𝛼 2 =∙∙∙= 𝛼 𝑎 =0 B main Effect Hypothesis: 𝐻 0 : 𝜇 ∙1 = 𝜇 ∙2 =∙∙∙= 𝜇 ∙𝑏 𝑜𝑟 𝐻 0 : 𝛽 1 = 𝛽 2 =∙∙∙= 𝛽 𝑏 =0
7-7 Factorial Experiments with More than Two Levels Interaction Notice that the main effects are in terms of marginal means (means average over the other factor). It makes sense to do this only if the relationship between the means of one factor are the same for all levels of the other factor. If this is true, the factors are said not to interact. Before we can interpret the main effect tests, we must verify that the factors do not interact. That is test Two-way Interaction test: 𝐻 0 : (𝛼𝛽) 11 = (𝛼𝛽) 12 =∙∙∙= 𝛼𝛽 𝑎𝑏 =0 A graphical means of assessing interaction is to make an interaction (profile) plot. This consists plotting one of the factors along the horizontal axis and the 𝑋 𝑖𝑗 the vertical axis. The points corresponding to the same level of the other factor are connected by a line. No interaction implies that the lines will be parallel.
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels Sum of Squares partition: Degrees of freedom partition:
7-7 Factorial Experiments with More than Two Levels Mean Squares:
7-7 Factorial Experiments with More than Two Levels 𝑆𝑆𝑀𝑂𝐷=𝑆𝑆𝐴+𝑆𝑆𝐵+𝑆𝑆𝐴𝐵 𝑤𝑖𝑡ℎ 𝑑𝑓=𝑎𝑏−1
7-7 Factorial Experiments with More than Two Levels 𝑆𝑆𝑇= 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 ( 𝑌 𝑖,𝑗,𝑘 − 𝑌 ) 2 = 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 2 − ( 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 𝑆𝑆𝐴= 𝑖=1 𝑎 𝑛𝑏 ( 𝑌 𝑖,∙,∙ − 𝑌 ) 2 = 𝑖=1 𝑎 ( 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 − ( 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 𝑆𝑆𝐵= 𝑖=1 𝑎 𝑛𝑎 ( 𝑌 ∙,𝑗,∙ − 𝑌 ) 2 = 𝑗=1 𝑏 ( 𝑖=1 𝑎 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 − ( 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 𝑆𝑆𝐴𝐵=𝑆𝑆𝑀𝑂𝐷−𝑆𝑆𝐴−𝑆𝑆𝐵 𝑆𝑆𝑀𝑂𝐷= 𝑖=1 𝑎 𝑗=1 𝑏 𝑛 ( 𝑌 𝑖,𝑗,∙ − 𝑌 ) 2 = 𝑖=1 𝑎 𝑗=1 𝑏 ( 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 − ( 𝑖=1 𝑎 𝑗=1 𝑏 𝑘=1 𝑛 𝑌 𝑖,𝑗,𝑘 ) 2 𝑆𝑆𝐸=𝑆𝑆𝑇−𝑆𝑆𝐴−𝑆𝑆𝐵−𝑆𝑆𝐴𝐵 Multiple comparison and contrasts follow the same formulas as in the one-way ANOVA. The difference is that the comparisons are made on the marginal means for factors A & B. The ni are replaced by the number of observations used in calculating the sample mean. Also, they are only meaningful if there is no interaction.
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels Model Adequacy
7-7 Factorial Experiments with More than Two Levels Model Adequacy
7-7 Factorial Experiments with More than Two Levels Model Adequacy
7-7 Factorial Experiments with More than Two Levels Computer Output
7-7 Factorial Experiments with More than Two Levels Example 7-11 OPTIONS NOOVP NODATE NONUMBER LS=80; DATA ex711; DO obs= 1 to 3; DO type=1 to 3; DO method='Dipping', 'Spraying'; INPUT force @@; OUTPUT; END; END;END; CARDS; 4 5.4 5.6 5.8 3.8 5.5 4.5 4.9 4.9 6.1 3.7 5 4.3 5.6 5.4 6.3 4 5 ods graphics on; PROC GLM DATA=ex711 plots=all; CLASS type method; MODEL force= type method type*method; MEANS type method type*method/snk; output out=new r=resid; TITLE 'Two-way ANOVA'; PROC PLOT DATA=NEW; PLOT RESID*TYPE; PLOT RESID*METHOD; run; QUIT;
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels Residual Plot resid*type 도표. 범례: A = 1 관측치, B = 2 관측치, 등. resid | 0.35 + | A 0.30 +A A | 0.25 + | A A 0.20 + 0.15 + 0.10 +A A 0.05 + 0.00 + -0.05 + -0.10 + -0.15 + | B -0.20 + -0.25 + -0.30 + -0.35 + -0.40 +A A -+-----------------------------------+-----------------------------------+ 1 2 3 type Residual Plot resid*method 도표. 범례: A = 1 관측치, B = 2 관측치, 등. resid | 0.35 + | A 0.30 + A A | 0.25 + | A A 0.20 + | A 0.15 + 0.10 + A A 0.05 + 0.00 + -0.05 + -0.10 + -0.15 + | B -0.20 + -0.25 + | A A -0.30 + -0.35 + -0.40 + A A ---+------------------------------------------------+-- Dipping Sprayin method
Ex. 7-51 (pp. 430) OPTIONS NOOVP NODATE NONUMBER; proc format; value hc 1='10%' 2='15%' 3='20%'; value ct 1='1.5 hrs' 2='2.0 hrs'; value fn 1='300' 2='500' 3='650'; DATA ex751; infile 'C:\Users\korea\Desktop\Working Folder 2017\imen214-stats\ch07\SAS\ex751.txt'; INPUT hc ct fn strength @@; label hc='Hardwood Concentration' ct='Cooking Time' fn='Freeness'; format hc hc. ct ct. fn fn.; ods graphics on; PROC glm plots=diagnostics; CLASS hc ct fn; MODEL strength=hc | ct | fn; MEANS hc | ct | fn/snk; output out=new r=resid; TITLE 'Three-way ANOVA'; PROC PLOT DATA=NEW; PLOT RESID*hc; PLOT RESID*ct; plot resid*fn; run; quit; 1 96.6 2 97.7 3 99.4 98.4 99.6 100.6 98.5 96 97.5 98.7 95.6 97.4 97.6 97 99.8 98.6 100.4 100.9 97.2 96.9 98.1 99 96.2 97.8
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
7-7 Factorial Experiments with More than Two Levels
The Latin Square Design The Latin square design is used to eliminate two nuisance sources of variability; that is, it systemically allows blocking two dimensions. Thus, the rows and columns actually represent two restrictions on randomization. In a Latin square design, there are p treatments and p levels of each of the two blocking variables. Each treatment level appears in each row and column once. The arrangement should be randomly selected from all possible arrangement. For instance, there is only 1 3x3, 4 4x4, 56 5x5, and 9408 6x6 Latin squares.
The Latin Square Design
The Latin Square Design Example 5-4
The Latin Square Design OPTIONS NOOVP NODATE NONUMBER LS=80; DATA latin; INPUT operator batch treat$ force @@; CARDS; 1 1 A -1 1 2 B -8 1 3 C -7 1 4 D 1 1 5 E -3 2 1 B -5 2 2 C -1 2 3 D 13 2 4 E 6 2 5 A 5 3 1 C -6 3 2 D 5 3 3 E 1 3 4 A 1 3 5 B -5 4 1 D -1 4 2 E 2 4 3 A 2 4 4 B -2 4 5 C 4 5 1 E -1 5 2 A 11 5 3 B -4 5 4 C -3 5 5 D 6 ods graphics on; PROC GLM data=latin plots=(diagnostics); CLASS operator batch treat; MODEL force = operator batch treat; MEANS operator batch treat/snk; output out=new p=phat r=resid; TITLE 'Latin Square Design'; proc plot data=new; plot resid*(operator batch treat)/vaxis= -3.5 to 5.0 by 0.5; Title 'Residual plot'; RUN; QUIT;
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design
The Latin Square Design Residual plot resid*treat 도표. 범례: A = 1 관측치, B = 2 관측치, 등. resid | 5.0 + A | A 4.5 + | A 4.0 + | 3.5 + 3.0 + 2.5 + 2.0 + A | A 1.5 + 1.0 + A 0.5 + 0.0 + A B | A A -0.5 + | A -1.0 + A B | A A -1.5 + -2.0 + A -2.5 + | B -3.0 + A | A -3.5 + ---+--------------+--------------+--------------+--------------+-- A B C D E treat Residual plot resid*operator 도표. 범례: A = 1 관측치, B = 2 관측치, 등. resid | 5.0 + A | A 4.5 + | A 4.0 + | 3.5 + 3.0 + | A 2.5 + 2.0 + A 1.5 + 1.0 + A | A 0.5 + 0.0 + A B | A A -0.5 + -1.0 + B A | B -1.5 + -2.0 + A -2.5 + | A A -3.0 + A | A -3.5 + ---+--------------+--------------+--------------+--------------+-- 1 2 3 4 5 operator Residual plot resid*batch 도표. 범례: A = 1 관측치, B = 2 관측치, 등. resid | 5.0 + A | A 4.5 + | A 4.0 + | 3.5 + 3.0 + | A 2.5 + 2.0 + A | A 1.5 + 1.0 + A | A 0.5 + 0.0 + A A A | B -0.5 + -1.0 + A A A | A A -1.5 + -2.0 + A -2.5 + | A A -3.0 + A -3.5 + ---+--------------+--------------+--------------+--------------+-- 1 2 3 4 5 batch