1 Mixed and Random Effects Models 1-way ANOVA - Random Effects Model 1-way ANOVA - Random Effects Model 2-way ANOVA - Mixed Effects Model 2-way ANOVA - Mixed Effects Model –X ij = + i + B j + G ij + ij –Distributions of B j, G ij & ij are N(0, 2,B ), N(0, 2,G ), N(0, 2, , ) respectively –Hypothesis Test –Order of testing Interaction first Interaction first Main effects Main effects
2
3 Three Factor ANOVA! Things can start to get messy now! Things can start to get messy now! Consider only fixed effects of the three factors: A,B, and C Consider only fixed effects of the three factors: A,B, and C The number of levels are: I, J, and K, respectively The number of levels are: I, J, and K, respectively L ijk = the number of observations L ijk = the number of observations –L will remain the same for all levels; otherwise it is difficult to do any calculations by hand
4 Three Factor ANOVA Estimators
5 Three Factor ANOVA Table
6
7 Three Factor ANOVA ANOVA table same as usual ANOVA table same as usual F-tests of main effects and interactions are: F-tests of main effects and interactions are: –MSA/MSE, MSB/MSE, MSC/MSE –MSAB/MSE, MSAC/MSE, MSBC/MSE –MSABC/MSE Testing procedure Testing procedure –Three way interaction –Two way interactions –Main effects Interpretation Interpretation –Draw graphs!!
8 Three Factor ANOVA Tukey’s Post Hoc test can be conducted as usual Tukey’s Post Hoc test can be conducted as usual –Second parameter is the number of sample means –Third parameter is df of error Mixed and Random effects Mixed and Random effects
9 Problem 1
10 Problem 1
11 Problem 1
12 Problem 1
13 Problem 1
14 Latin Square Complete layout Complete layout –Factors A,B, and C with levels I, J, and K –Need at least IJK observations Incomplete layout Incomplete layout –Have less than IJK observations Latin Square - Latin Square - –Incomplete layout, but it works because of the combinations –I=J=K –Assume no two-way or three-way interactions
15 Latin Square
16 Latin Square
17 Models for Latin Squares X ij = ij + i + j + k + ij(k) X ij = ij + i + j + k + ij(k) –Distribution of ij(k) is N(0, 2, , ) –Hypothesis Test
18 Latin Squares (Notation is a Little Different)
19
20 Example
21 Example
22 Example
23 Graeco Latin Square The Latin Square is a restriction on randomization of the cells The Latin Square is a restriction on randomization of the cells In some experiments one can impose another restriction on randomization - Graeco Latin In some experiments one can impose another restriction on randomization - Graeco Latin –A 4-way ANOVA Consider the following table Consider the following table –In this design, the 3rd restriction is at levels , , , and –They appear once and only once in each row and column and they appear once and only once with each level of treatment A,B, C, or D –Problem - only 3 df for the error
24 Gaeco Latin Square
25 Gaeco Latin Square
26 Example A composite measure of screen quality was made on screens using 4 lacquer concentrations (A), four standing times (B), four acryloid concentrations (C), and four acetone concentrations (D) A composite measure of screen quality was made on screens using 4 lacquer concentrations (A), four standing times (B), four acryloid concentrations (C), and four acetone concentrations (D)
27 Example
28 Example
29 Example
30 Example
31 Example
32 2 p Factorial Experiments Have lots of variables and want to see which variable(s) impact the response variable Have lots of variables and want to see which variable(s) impact the response variable Consider a plastic injection molding process (p) Consider a plastic injection molding process (p) –shot size –type of plastic –speed –temperature –type of mold –quality- flash Check each at only 2 levels (2) Check each at only 2 levels (2)
33 2 p Factorial Experiments 2 3 experiments 2 3 experiments –3-way ANOVA –SS - Yate’s Method 2 p when p>3 2 p when p>3 Confounding and blocking Confounding and blocking Confounding with more than two blocks Confounding with more than two blocks Fractional Replication Fractional Replication
Factorial Experiment Only 2 parameters, so…. Only 2 parameters, so…. Each effect (main and interaction) will have only one df Therefore...
Factorial Experiment The parameters of the model can be estimated The parameters of the model can be estimated –taking averages over the subscripts of X ijkl ’s and –forming linear combinations of the averages
Factorial Experiment
Factorial Experiment Concept of Contrasts Concept of Contrasts
Factorial Experiment Each estimator is a linear function of the cell totals Each estimator is a linear function of the cell totals Coefficients +1 or -1 Coefficients +1 or -1 Equal number of each Equal number of each Then each function is a contrast in the X ijk.’s Then each function is a contrast in the X ijk.’s
Factorial Experiment Example
40 Example of Computing Contrasts
41 Computing SS for 2 3 Factorial Experiment Each estimate is a contrast in the cell totals which are then multiplied by 1/(8n) Each estimate is a contrast in the cell totals which are then multiplied by 1/(8n) SS(effect) = contrast 2 /(8n) SS(effect) = contrast 2 /(8n) Set up a table of contrasts where coefficient is +1 or -1 for each x ijk Set up a table of contrasts where coefficient is +1 or -1 for each x ijk –Yate’s Method –Note the order of the contrasts - standard order 3 Factors - a,b,ab,c,ac,bc,abc 3 Factors - a,b,ab,c,ac,bc,abc When p>3, such as 4 Factors - a,b,ab,c, ac,bc,abc, d,ad,bd, abd,cd,acd,bcd, abcd When p>3, such as 4 Factors - a,b,ab,c, ac,bc,abc, d,ad,bd, abd,cd,acd,bcd, abcd
Factorial Experiment-Yate’s Contrasts AB contrast = x x x x x x x x 222.
Factorial Experiment-Yate’s Contrasts AB contrast = x x x x x x x x 222. AB contrast = x x x x x x x x 222. SS(effect) = ABcontrast 2 /(8n) SS(effect) = ABcontrast 2 /(8n) Computing the SS’s can be tedious to say the least Computing the SS’s can be tedious to say the least
Factorial Experiment-Yate’s Contrasts Computing SS Easily AB contrast = x x x x x x x x 222.
45 Example
46 Example 2
47 Example 2
48 Example 2
49 Example 2
50 Example 2