V. Experiments With Two Crossed Treatment Factors

Size: px
Start display at page:

Download "V. Experiments With Two Crossed Treatment Factors"

Transcription

1 V. Experiments With Two Crossed Treatment Factors A.The Experimental Design Completely Randomized Design (CRD) Let A be a factor with levels i = 1,,a B be a factor with levels j = 1,,b Y ijt = the response obtained on the t th observation of the i th level of treatment factor A and the j th level of treatment factor B ijt = the error variable (or variation attributable to randomness and nuisance) The basic (cell means) model is now Y ijt = µ + τ ij+ ijt We can rewrite this model by substituting which results in τ ij = α i + βj Y ijt = µ + α i + β j+ ijt Again, we need to make some assumptions about the error terms ijt in order to statistically analyze the results of a CRD experiment: - ijt ~ N(0, σ ) - ijt s are mutually independent, t = 1,,r ij, i = 1,,a, j = 1,,b These assumptions facilitate an Analysis Of Variance (ANOVA), which when applied to this CRD is called a Two-Way Additive or Main Effects Model.

2 Also note that: the assumptions imply that Y it ~ N(u i,σ ) for the means model or Y it ~ N(u + τ i,σ ) for the effects model This model implies that the two treatment factor effects are independent what if they are not? This would imply the change in the response Y ijt that corresponds to changes in one treatment factor (say A) differs across levels of the other treatment factor (say B). The treatment effect is now given by τ ij = α i + β j + ( αβ) ij which by substitution yields the Two-Way Complete or Two-Way ANOVA Model Y = µ + α + β + αβ + ijt i j ij ijt The Two-Way Complete or Two-Way ANOVA Model should be used unless the experimenter has explicit information about the lack of existence of an interaction. To do otherwise (i.e., ignore an existing interaction) can result in very misleading inferences on the main effects: Crunchiness Rating Interaction Plot M inutes 1 M inutes º 400º Baking Temperature

3 B. Checking Model Assumptions We check the model assumptions in the same manner as with a one-factor CRD: We calculate the standardized residuals where z = ijt y ijt - yˆ ijt sse n - 1 Y ˆ = µ ˆ + ˆτ = µ ˆ + α ˆ + β ˆ + αβ or Yˆ ijt ij i j ij ijt = µ ˆ + ˆτ = µ ˆ + α ˆ + βˆ ij i j depending on the model selected. We plot the standardized residuals z ijt against: - order of observation to check independence ^ - levels of each factor A and B and estimated responses y ijt to check for outliers and homogeneity of variances - normal scores to check for normality

4 We also - use a Durbin-Watson test if the plot of the standardized residuals against order of observation suggests a lack of independence - use the Hartley, Levine, Box, Breusch-Pagan, Cochran, or Bartlett test if plots of the standardized residuals against ^ levels of each factor A and B or estimated responses y ijt suggest heteroskedasticity - use Shapiro-Wilk test if the plot of standardized residuals against normal scores indicates lack of normality - use interaction plots to check the assumption of no interaction if using a main-effects model if sufficient observations are made to allow the corresponding calculations to be made. C. Contrasts The cell means model Y ijt = µ + τ ij+ ijt is equivalent to the one-way ANOVA model, so all contrasts in the treatment effects τ ij are estimable. This leads to three broad categories of contrasts for a two-way model: 1.Treatment Contrasts these are contrasts of the form a b i=1 j=1 d and are no different from contrasts encountered in the one-way model. All previously discussed approaches to inference are applicable. ij τ ij

5 .Interaction Contrasts used to test if interactions are significant (i.e., do the lines in an interaction plot differ significantly from being parallel?). These contrasts are of the form a b a b d ijτ ij = d ij ( αβ) ij i = 1 j= 1 i = 1 j= 1 where and a i=1 b j=1 d = 0 j ij d = 0 i ij The most common type of interaction contrast has coefficients d ij = c i k j where c s = k h = 1, c s+1 = k g = -1, and all other c i and k j are zero What is the purpose of such a contrast?

6 For example, an interaction contrast could look like this ( τsh - τ ) - τsg - τ s+1 h s+1 g To recognize this as an interaction contrast recall that τ ij = α i + β j + ( αβ) ij Simple substitution yields (( αβ) - ( αβ) ) - ( αβ) - ( αβ) sh s+1 h sg s+1 g NO MAIN EFFECTS! Again note that interaction contrasts test whether the lines in an interaction plot differ significantly from being parallel. If we find a significant interaction, a two-way complete model should be used Crunchiness Rating Interaction Plot Minutes 1 Minutes º 400º Baking Temperature The mean rating at 350º is 6.5, while the mean rating at 400º is 57.5 does this really tell the whole story?

7 3.The main effects contrasts for Treatment Factors A and B, respectively, are a c i τ i i=1 where we have averaged the effect of Treatment Factor A at each level of Factor B, and b k jτ j j=1 where we have averaged the effect of Treatment Factor B at each level of Factor A. If do not find a significant contrast, a two-way additive model is appropriate (note that the lines in the interaction plot do not differ significantly from being parallel): Crunchiness Rating 100 Interaction Plot Minutes 1 Minutes º 400º Baking Temperature The mean rating at 350º is 3.5, while the mean rating at 400º is 8.5 this really does tell the whole story!

8 Under such conditions, the main effects contrasts for Treatment Factors A and B, respectively, reduce to a a a c τ = c α + αβ = c α ( ) i i i i i i i i=1 i=1 i=1 where we have averaged the effect of Treatment Factor A at each level of Factor B, and k τ = k β + αβ = k β ( j ) b b b j j j j j j j=1 j=1 j=1 where we have averaged the effect of Treatment Factor B at each level of Factor A. However, if an interaction effect exists, the main effects contrasts for Treatment Factors A and B, respectively, are a a c τ = c α + αβ ( ) i i i i i i=1 i=1 where we have averaged the effect of Treatment Factor A at each level of Factor B, and b b k τ = k β + αβ ( ) j j j j j j=1 j=1 where we have averaged the effect of Treatment Factor B at each level of Factor A. Such contrasts have very odd interpretations (i.e., they are generally meaningless)!

9 Example Again consider the Automobile Battery Life problem, with the addition of information regarding the class of auto in which the battery is installed (Mid-sized or Full-sized): Automobile Battery Life (in Months) Size New England Mid West South West Mid Full Mid Full We ll use Region as Factor A (i = 1 for New England, i = for Mid West, and i = 3 for South West) and Class of Auto as Factor B (j = 1 for Mid-sized and j = for Full-sized). Thus our treatments are: τ 11 is a Battery installed in New England on a Mid-sized auto τ 1 is a Battery installed in New England on a Full-sized auto τ 1 is a Battery installed in the Mid West on a Mid-sized auto τ is a Battery installed in the Mid West on a Full-sized auto τ 31 is a Battery installed in the South West on a Mid-sized auto τ 3 is a Battery installed in the South West on a Full-sized auto If we simply wished to test equality of means for the Battery installed in New England on a Mid-sized auto and the Battery installed in the South West on a Full-sized auto, we would have a simple contrast in the treatments with coefficients [ ]

10 Recalling that τ ij = α i + β j + ( αβ) ij This means our contrast is the equivalent of τ - τ = 11 3 α 1 + β 1 + αβ 11 - α 3 + β + αβ 3 So we have an equivalent contrast in the effects with coefficients [1 0-1] in α, [1 1] in β, and [ ] in αβ. If we wished to test for interaction between New England and the Southwest regions and class of auto, we would have a simple contrast in the treatments with coefficients [ ] or we can see that τ11 - τ1 τ31 - τ3 - = 0.5 ( α ) ( ) 1 + β 1 + αβ - α 1 + β + αβ ( α ) ( ) 3 + β 1 + αβ - α 3 + β + αβ 31 3 = 0.5 β1 - β + αβ - αβ β1 - β + αβ - αβ 31 3 = 0.5 αβ - αβ - αβ + αβ

11 So we have a simple contrast in the effects with coefficients [0 0 0] in α, [0 0] in β, and [ ] in αβ. Of course, both sets of contrast coefficients yield identical results. If we simply wished to test equality of means for New England and the South West, we would have a simple contrast in the treatments with coefficients [ ] or we can see that τ 11 + τ1 τ 31 + τ3 - = 0.5 α + β + αβ + α + β + αβ α + β + αβ + α + β + αβ = α αβ αβ α αβ αβ 31 3 ( 1 1 ) ( ) ( 3 1 ) ( )

12 which simplifies to τ + τ τ + τ = α 1 - α 3 if there are no interaction effects. So we have a simple contrast in the effects with coefficients [1 0-1] in α and [0 0] in β Again, both sets of contrast coefficients yield identical results. Finally, note that these contrast coefficients are often written in tabular form: ij A B AB Divisor This also illustrates that the interaction coefficients are products of corresponding coefficients from the interacting factors (in this case A and B) this is frequently the case.

13 D.The Two Way Complete Model Analysis Here we may proceed in either of two equivalent ways: 1. Use the cell-means model Y ijt = µ + τ ij+ ijt and our previously developed techniques or.use the Two-Way Complete Model Y = µ + α + β + αβ + ijt i j ij ijt which allows us to easily isolate the separate contribution made to the response by each factor and by their interaction - The Least Squares Estimators We know the least squares estimators for the cell means model are ˆµ + ˆij τ = Y ij so by substitution the least squares estimator for the twoway complete model are ˆµ + α ˆ + β ˆ + αβ = µ ˆ + ˆτ = Y i j ij ij ij with corresponding variance σ r ij

14 Thus any interaction of the form where and a b a b d ijτ ij = d ij ( αβ) ij i = 1 j= 1 i = 1 j= 1 a i=1 b j=1 d = 0 j ij d = 0 i ij has least squares estimate and associated variance of a b a b d ijyij and σ i=1 j=1 i=1 j=1 ij d r ij More specifically, interaction contrast ( τsh - τuh ) - ( τsq - τuq ) has least squares estimate Ysh - Yuh - Y sq + Yuq and associated variance of a b Var dijτ ij = σ i=1 j=1 rsh ruh rsq ruq

15 Similarly, any main effects of the form have a least squares estimate of 1 c αˆ = c Y b a a b i i i ij i=1 i=1 j=1 or a b c iα i or k jβ j i=1 j=1 ˆ 1 k β = k Y a b b a j j j ij j=1 j=1 i=1 and associated variance a a b * c ˆ i Var ci α i = σ i=1 i=1 j=1 b rij or b a b ˆ* k i Var kjβ j = σ j=1 i=1 j=1 a rij

16 Note that for a balanced design, these least squares reduce to a a c ˆ iα i = ciyi i=1 i=1 or b b ˆ k jβ j = kjy j j=1 j=1 where Y = i b r j=1 t =1 Y ijt br and Y = j a r i=1 t=1 Y ijt ar - Estimation of σ Again, since the two-way complete model is equivalent to the cell means model Y = µ + τ + ijt ij ijt = µ + α + β + αβ + i j ij ijt an estimate of σ is the same as for a one-way ANOVA model (allowing for the extra subscript j). First calculate a b r ij ( ijt ij ) sse = y - y i=1 j=1 t=1 a b rij a b ijt ij ij i=1 j=1 t=1 i=1 j=1 a b rij a b y ij ijt i=1 j=1 t=1 i=1 j=1 rij = y - r y = y - sum of squared errors

17 The use the sse to calculate the mse, which is an unbiased estimate of σ sse mse = n - ν Furthermore, since sse ~ χ σ n-ab a 100(1 α)% confidence bound for σ is given by σ χ sse n-ab,1-α - Multiple Comparisons A researcher may wish to make comparisons of i) treatment combinations, ii) main effects of Factor A, and iii) main effects of Factor B. To ensure the overall experimentwise error rate α, one could take a Bonferonni approach and set error rates α 1, α, and α 3 for these three sets of inferences such that α 1 + α + α 3 = α Of course, there are many ways to establish desired values for α 1, α, and α 3, including: - number of inferences to be made in each set - relative importance of each set of inferences

18 Comparisons of Treatment Combinations Under such circumstances the cell-means model is used and each of the previously discussed approaches to multiple comparisons (Bonferroni, Scheffé, Tukey, Dunnett, Hsu, Fisher, SNK, Duncan) can be used with sse mse = = n - ν a b r ij i=1 j=1 t=1 ( y ijt - y ij ) n - ab Comparisons of Main Effects Here we are comparing the effects of levels of one factor averaged over the levels of the other factor. Again, this is likely not of interest in the presence of interaction between the two factors. We can use each of the previously discussed approaches to multiple comparisons (Bonferroni, Scheffé, Tukey, Dunnett, Hsu, Fisher, SNK, Duncan) can be used with c τ i i = c α c y w mse i i i i ± a a a a * i i=1 i=1 i=1 i=1 for Factor A, or c br

19 * k τ j = k β k y j j j j w mse j ± for Factor B, where k j ar b b b b j=1 j=1 j=1 j=1 w B = t n-ab, α m or w = a - 1 F b - 1 F S a-1,n-ab,α b-1,n-ab,α w = T q q or a,n-ab,α b,n-ab,α ( 0.5) ( 0.5) w = w = t or t D1 H a-1,n-ab,α b-1,n-ab,α ( 0.5) ( 0.5) w = t or t D a-1,n-ab,α b -1,n-ab,α for balanced designs. For unbalanced designs, we can still use either the Bonferonni or Scheffé methods, using least squares estimates a a b 1 c ˆ iα i = c i Yij i=1 i=1 b j=1 or b b a ˆ 1 k jβ j = k j Yij j=1 j=1 a i=1 and variance a a b * c ˆ i Var ci α i = σ i=1 i=1 j=1 b rij or b a b ˆ * k i Var kjβ j = σ j=1 i=1 j=1 a rij For situations in which the variances are unequal, Satterwaithe s approximation can be used.

20 - Analysis of Variance The three standard hypotheses of a two-way complete model are: = 0 AB H : αβ - αβ - αβ + αβ i s,j q 0 ij iq sj sq i.e., there is no interaction effect. Note that this hypothesis suggests that the interaction plots show parallel lines, and can also be written as AB H0 : ( αβ) - ( αβ) - ( αβ ) + ( αβ) = 0 i, j ij i j Nonrejection of this hypothesis (i.e., concluding that a significant interaction effect does not exist) usually leads to consideration of the second and third standard hypotheses of a two-way complete model: The second and third standard hypotheses of a two-way complete model (in no particular order) are: H : α = α = L = α A * * * 0 1 a and B * * * H0 : β 1 = β = L = βb * * where α = α + αβ β = β + αβ and i i i j j i.e., there is no corresponding main effect. Again note that these hypotheses may be of little interest if a substantial interaction exists. j

21 In order to test these three hypotheses, the variation in responses must be partitioned. As one might expect, we again utilize the concepts of full and reduced models. To test the interaction hypothesis, we compare the sum of squares for error under the two-way complete model (sse) with the sum of squares for error under the reduced model that results when H 0 is true ( sse AB ). 0 The difference AB ssab = sse0 - sse is called the Sum of Squares for Interaction AB. Note that large values of ssab relative to sse lead to rejection of AB H0 : ( αβ) - ( αβ) - ( αβ ) + ( αβ) = 0 i, j ij i j * * * Given that the least squares estimates of µ + α i + βj are y i + y j - y for the reduced model (with equal sample sizes), the sum of squares for error for the reduced model is ( ˆ ˆ ) a b r AB * * * 0 ijt i j i=1 j=1 t=1 sse = y - µ - α - β a b r ( ijt i j ) = y -y -y +y i=1 j=1 t=1

22 _ Now if we add and subtract y ij to this expression, we have a b r ( ( ) ( ) ) i=1 j=1 t=1 a b r ( ( ijt ij ) ( ij i j ) ) sse = y - y + y - y - y + y AB 0 ijt ij ij i j = y -y + y -y -y +y i=1 j=1 t=1 ( ijt ij ) ( ij i j ) a b r a b r = y -y + y -y -y +y i=1 j=1 t=1 i=1 j=1 t=1 sse So for equal sample sizes we have ssab = sse AB 0 = y -y + y -y -y +y i=1 j=1 t=1 i=1 j=1 t=1 a b r a b r ( ijt ij ) ( ij i j ) a b ( ij i j ) i=1 j=1 i=1 j=1 - sse a b r ( ijt ij ) - y - y i=1 j=1 t=1 = r y - y - y + y a b yij = - r y a yi b j y - + i=1 j=1 br ar abr

23 ssab AB Now if H 0 is true, then ~ χ ( a-1)( b-1) σ sse and since ~ χ n-ab σ and ssab and sse are independent, the ratio of these two Chi-square statistics (divided by their respective degrees of freedom) yields ssab ssab ( a-1) ( b-1) σ ( a-1) ( b-1) msab = = ~ F sse sse mse ( n-ab) σ ( n-ab) a-1 b-1,n-ab which provides us with the means for testing AB H0 : ( αβ) - ( αβ) - ( αβ ) + ( αβ) = 0 i, j ij i j We will reject AB H0 : ( αβ) - ( αβ) - ( αβ ) + ( αβ) = 0 i, j ij i j when msab >Fa-1 ( b-1 ) mse,n-ab,α Note that: if this hypothesis is rejected, it is often preferable to use the equivalent cell-means model and look at contrasts in the treatment combinations τ ii. if this hypothesis is not rejected, we can use the resulting model to test main effects directly (and not rerun a main effects model).

24 To test that Factor A has no effect on the responses, we can consider A+AB * * * H : α = α = L = α 0 1 a and ij i j * where α = α + ( αβ) αβ - αβ - αβ + αβ = 0 i, j i i i based on the reduced model Y = µ + β + * * ijt j ijt The reduced model on which this approach is based has an intuitive appeal. We can consider a more traditional approach to testing the hypothesis that Factor A has no effect on the responses H : α = α = L = α * where α = α + αβ A * * * 0 1 a i i i based on the reduced model ( ij i j ) Y = µ + β + αβ - αβ - αβ + αβ + ** * ijt j ijt This approach is preferred if we take the view that a main effect is not tested unless the hypothesis of no interaction is first not rejected. This is the approach we will take.

25 It can be shown that the least squares estimate of E[Y ijt ] for this reduced model is y - y + y ij i and so the corresponding sum of squares for error is a b r ( ) sse = y - y + y - y A 0 ijt ij i i=1 j=1 t=1 ( ijt ij ) ( i ) a b r a = y - y - br y - y i=1 j=1 t=1 i=1 sse So for equal sample sizes we have ssa = sse A 0 = y -y + y -y i=1 j=1 t=1 a b r ( ijt ij ) ( i ) i=1 a ( i ) i=1 - sse = br y - y a y = - br y abr i a b r ( ijt ij ) - y - y i=1 j=1 t=1

26 Now if A H 0 is true, then ssa ~ χ σ a-1 sse and since ~ χ n-ab σ and ssa and sse are independent, the ratio of these two Chi-Square statistics (divided by their respective degrees of freedom) yields ssa ssa ( a-1) σ ( a-1) msa = = ~ Fa-1,n-ab sse sse mse ( n-ab) σ ( n-ab) which provides us with the means for testing A * * * H0 : α 1 = α = L = αa * where α = α + αβ i i i We will reject when H : α = α = L = α * where α = α + αβ A * * * 0 1 a msa >Fa-1,n-ab,α mse i i i

27 Similarly, to test that Factor B has no effect on the responses, we can consider B+AB * * * H : β = β = L = β 0 1 b and ij i j * where β = β + ( αβ) αβ - αβ - αβ + αβ = 0 i, j j j j based on the reduced model Y = µ + α + * * ijt i ijt Again, the reduced model on which this approach is based has an intuitive appeal. We can consider a more traditional approach to testing the hypothesis that Factor A has no effect on the responses H : β = β = L = β * where β = β + αβ B * * * 0 1 b j j j based on the reduced model ( ij i j ) Y = µ + α + αβ - αβ - αβ + αβ + ** * ijt i ijt Again, this approach is preferred if we take the view that a main effect is not tested unless the hypothesis of no interaction is first not rejected. This is the approach we will take.

28 It can be shown that the least squares estimate of E[Y ijt ] for this reduced model is y - y + y ij j and so the corresponding sum of squares for error is a b r ( ) sse = y - y + y - y B 0 ijt ij j i=1 j=1 t=1 ( ijt ij ) ( j ) a b r b = y - y - ar y - y i=1 j=1 t=1 j=1 sse So for equal sample sizes we have ssb = sse B 0 = y -y + y -y i=1 j=1 t=1 a b r ( ijt ij ) ( j ) j=1 b ( j ) j=1 - sse = ar y - y b y j y = - ar abr a b r ( ijt ij ) - y - y i=1 j=1 t=1

29 Now if B H 0 is true, then ssb ~ χ σ b-1 sse and since ~ χ n-ab σ and ssb and sse are independent, the ratio of these two Chi-Square statistics (divided by their respective degrees of freedom) yields ssb ssb ( b-1) σ ( b-1) msb = = ~ Fb-1,n-ab sse sse mse ( n-ab) σ ( n-ab) which provides us with the means for testing B * * * H0 : β 1 = β = L = βb * where β = β + αβ j j j We will reject H : β = β = L = β * where β j = β j + ( αβ) j when msb >Fb-1,n-ab,α mse B * * * 0 1 b

30 The results of a Two Way Complete Analysis of Variance can be summarized and displayed in an ANOVA Table: Source of Variation Error Total Degrees of Freedom (df) n ab n - 1 Sum of Squares (SS) ( ij i j ) i=1 j=1 a b r ( ijt ij ) sse = y - y i=1 j=1 t=1 a b r ( ijt i ) sstot = y - y i=1 j=1 t=1 Mean Square (MS) ssa Factor A a-1 a ssa = br ( yi - y ) msa = i=1 a-1 Factor B b-1 ssb b ssb = ar ( y j - y ) msb = j=1 b-1 AB (a-1)(b-1) ssab ssab = msab = ( a-1 ) ( b-1 ) a b r y - y - y + y sse mse = n-ab F-Ratio msa F A = mse msb F B = mse msab F AB = mse Example Again consider the Automobile Battery Life problem augmented by the class of auto in which the battery is installed (Mid-sized or Full-sized): Automobile Battery Life (in Months) Size New England Mid West South West Mid Full Mid Full We ll use Region as Factor A (i = 1 for New England, i = for Mid West, and i = 3 for South West) and Class of Auto as Factor B (j = 1 for Mid-sized and j = for Full-sized). Use these data to perform a Two Way Complete ANOVA.

31 The interaction plot for this data could look like this: Life of Battery (Months) 60 Interaction Plot Sealed Mid-sized Nonsealed Full-sized 10 0 New TryHard England NeverStart Mid West South WorryLast West Region Brand There is very little evidence of interaction between region and class of auto (the relationships between classes of auto are similar for the different classes of autos). Or the interaction plot could look like this: Life of Battery (Months) 60 Interaction Plot New TryHard England Mid NeverStart West South WorryLast West 10 0 Mid-sized Sealed Full-sized Nonsealed Type Region of Battery Again, there is very little evidence of interaction between region and class of auto (the relationships between classes of auto are similar for the different regions). However, we will proceed with a two-way complete analysis

32 We first test the interaction hypothesis: AB H0 : ( αβ) - ( αβ) - ( αβ ) + ( αβ) = 0 i, j ij i j The appropriate sum of squares is a b a b yij y y i j y ssab = r br ar abr i=1 j=1 i=1 j=1 a a i=1 b i=1 j=1 The calculated components of the ssab are ( ) y i = br y ij = + r ( 45+5) ( 51+56) ( 43+36) ( 39+38) = = 4588

33 and b j=1 y j = ar 3 ( ) 3 + = y = = 4300 abr 3 So the sum of squares for interaction AB is a b a b yij y y i j y ssab = r br ar abr i=1 j=1 i=1 j=1 = = The sum of squares for error is a b r ( ijt ij ) sse = y - y = 4 - i=1 j=1 t= L = 87.0

34 So the corresponding mean squares are and ssab msab = = = 9.33 a-1 b-1 sse 87.0 mse = = = 14.5 n-ab 6 which results in an F-statistic of msab 9.33 F AB = = = mse 14.5 At (a 1)(b 1) = and n ab = 6 degrees of freedom, this test statistic has a p-value of , so we do not reject the hypothesis of no interaction at any reasonable significance level. We can proceed with tests of main effects. Now we test the main effect associated with Factor A: H : α = α = L = α * where α = α + αβ A * * * 0 1 a The appropriate sum of squares is i i i y ssa = - y abr a i i=1 br Since we calculated the components of ssa when calculating ssab, we can simply substitute these results: ssa = = 88

35 So the corresponding mean square is ssa 88 msa = = = a-1 which results in an F-statistic of msa 144 F A = = = mse 14.5 At a 1 = and n ab = 6 degrees of freedom, this test statistic has a p-value of , so we have some evidence that the hypothesis of no main effect for Factor A is incorrect. Finally, we test the main effect associated with Factor B: H : β = β = L = β * where β = β + αβ B * * * 0 1 b The appropriate sum of squares is j j j y ssb = - y abr b j j=1 ar Since we calculated the components of ssb when calculating ssab, we can simply substitute these results: ssb = = 8.33

36 So the corresponding mean square is ssb 8.33 msb = = = 8.33 b-1 1 which results in an F-statistic of msb 8.33 F B = = = mse 14.5 At b 1 = 1 and n ab = 6 degrees of freedom, this test statistic has a p-value of , so we so we do not reject the hypothesis of no main effect for Factor B at any reasonable significance level. The results of this Two Way Complete Analysis of Variance are summarized and displayed in the following ANOVA Table: Source of Variation Degrees of Freedom (df) Sum of Squares (SS) Mean Square (MS) F-Ratio Factor A a-1= ssa = 88 msa = 144 F A = Factor B b-1=1 ssb = 8.33 msb = 8.33 F B = AB (a-1)(b-1)= ssab = msab = 9.33 F AB = Error n ab=6 sse = 87 mse = 14.5 Total n 1=11 sstot = 40

37 SAS code for a Two Way Complete Model: DATA battery; INPUT region $ autotype $ treatmnt life; num=_n_; LABEL region= Region of Country' autotype='type of Auto (Mid- vs. Full-sized)' life='observed Life of Battery in Months' num='order of Data'; CARDS; NewEngland Mid SouthWest Full 6 36 ; PROC GLM DATA=battery; TITLE4 'Using PROC GLM for a Two-Factor Complete Analysis'; CLASS region autotype; MODEL life=region autotype region*autotype; RUN; SAS output for a Two Way Complete Model: Analysis of Variance AUTOMOBILE BATTERY LIFE DATA ANALYSIS FOR QA 605 WINTER QUARTER 001 Using PROC GLM for a Two-Factor Analysis Dependent Variable: life The GLM Procedure Observed Life of Battery in Months Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE life Mean Source DF Type I SS Mean Square F Value Pr > F region autotype region*autotype Source DF Type III SS Mean Square F Value Pr > F region autotype region*autotype

38 Of course, we could also analyze some contrasts with this Two Way Complete Analysis of Variance. Suppose we are interested in the following contrasts: 1. τ MidWest τ NewEngland. τ Full τ Mid 3. τ NewEngland Mid τ SouthWest Full 4. (τ NewEngland Mid - τ NewEngland Full ) (τ SouthWest Mid - τ SouthWest Full ) For the first contrast we have a contrast in the effects with coefficients [1-1 0] in α, [0 0] in β, and [ ] in αβ. Note that SAS reads the effects in alphabetical or numerical order. For the other contrast we have effects coefficients [0 0 0] in α, [1-1] in β, and [ ] in αβ [0 1-1] in α, [-1 1] in β, and [ ] in αβ [0 0 0] in α, [0 0] in β, and [ ] in αβ respectively.

39 SAS code for Contrasts in a Two Way Complete Model: DATA battery; INPUT region $ autotype $ treatmnt life; num=n; LABEL region='region of Country' autotype='type of Auto (Mid- vs. Full-sized)' life='observed Life of battery in Months' num='order of Data'; CARDS; NewEngland Mid SouthWest Full 6 36 ; PROC GLM DATA=battery; TITLE4 'Using PROC GLM for a Two-Factor Complete Analysis'; CLASS region autotype; MODEL life=region autotype region*autotype; ESTIMATE MW vs NE' region 1-1 0; ESTIMATE Mid vs Full' autotype 1-1; ESTIMATE NE Mid vs SE Full' region autotype 1-1 region*autotype ; ESTIMATE 'Interaction - NE vs SW' region*autotype ; RUN; SAS output for Contrasts in a Two Way Complete Model: Analysis of Variance AUTOMOBILE BATTERY LIFE DATA ANALYSIS 3 FOR QA 605 WINTER QUARTER 001 Using PROC GLM for a Two-Factor Analysis The GLM Procedure Standard Parameter Estimate Error t Value Pr > t MW vs NW Mid vs Full NE Mid vs SW Full Interaction - MW vs SW

40 We could also compute the same contrasts with treatment coefficients. Again, suppose we are interested in the following contrasts: 1. τ MidWest τ NewEngland. τ Full τ Mid 3. τ NewEngland Mid τ SouthWest Full 4. (τ NewEngland Mid τ NewEngland Full ) (τ SouthWest Mid - τ SouthWest Full For the first contrast we have a contrast in the treatments with coefficients [ ] in τ For the other contrast we have treatment coefficients respectively. [ ] in τ, [ ] in τ, [ ] in τ, SAS code for Contrasts in a Two Way Complete Model: DATA battery; INPUT region $ autotype $ treatmnt life; num=_n_; CARDS; NewEngland Mid 1 48 NewEngland Full 4 NewEngland Mid 1 43 NewEngland Full 47 MidWest Mid 3 51 MidWest Full 4 45 MidWest Mid 3 56 MidWest Full 4 5 SouthWest Mid 5 39 SouthWest Full 6 43 SouthWest Mid 5 38 SouthWest Full 6 36 ; PROC GLM DATA=battery; New variable for treatment effects TITLE4 'Using PROC GLM for a Two-Factor Complete Analysis'; CLASS treatmnt; MODEL life=treatmnt; ESTIMATE MW vs. NE' treatmnt /divisor=; ESTIMATE Mid vs. Full' treatmnt /divisor=3; ESTIMATE NE Mid vs SW Full' treatmnt ; ESTIMATE 'Interaction - NE vs. SW' treatmnt ; RUN;

41 SAS output for Contrasts in a Two Way Complete Model: Analysis of Variance AUTOMOBILE BATTERY LIFE DATA ANALYSIS 3 FOR QA 605 WINTER QUARTER 001 Using PROC GLM for a Two-Factor Analysis The GLM Procedure Standard Parameter Estimate Error t Value Pr > t MW vs NE Mid vs Full NE Mid vs SW Full Interaction - NE vs SW Same results as with effects coefficients! E. The Two Way Main Effects Model Analysis The two-way main effects model is Y = µ ˆ + ˆτ = µ + α + β + ijt ij i j ijt - ijt ~ N(0, σ ) - ijt s are mutually independent, t = 1,,r ij, i = 1,,a j = 1,,b - The Least Squares Estimators For a balanced design, the least squares estimators for this model are ˆµ + ˆτ = ˆµ + α ˆ + β ˆ = Y + Y - Y ij i j i j

42 Thus the least squares estimator for an estimable main effects contrast is a c α or b k β i i j j i=1 j=1 a a a = c α = c Y + Y - Y c Y i i i i j i i i=1 i=1 i=1 or b b b = k β = k Y + Y - Y k Y j j j i j j j j=1 j=1 j=1 with associated variance a ˆ a σ a Var ciα i = Var ciy i = ci i=1 i=1 br i=1 or ˆ b b σ b Var kjβ j = Var kjy j = ki j=1 j=1 ar j=1 Note that similar formula for unbalanced designs can also be derived, but are relatively complex and will be left to SAS in this course.

43 - Estimation of σ The minimum value of the sums of squares for error in the two-way main effects model is ( ˆ ˆ ˆ ) ( ) sse = yijt - µ + α i + βj = y ijt - Y i + Yj - Y = y ijt -Yi -Y j +Y a b rij a b ijt i j i=1 j=1 t=1 i=1 j=1 a b rij a b 1 1 ijt i j i=1 j=1 t=1 br i=1 ar j=1 = y -br y -ar y +abry = y - y - y + sum of squared errors 1 y abr The use the sse to calculate the mse, which is an unbiased estimate of σ sse mse = n - a - b + 1 Furthermore, since sse ~ χ σ n-a-b+1 a 100(1 α)% confidence bound for σ is given by σ χ sse n-a-b+1,1-α

44 - Multiple Comparisons A researcher may wish to make comparisons of either i) treatment combinations, ii) main effects of Factor A, or iii) main effects of Factor B For balanced designs, the previously discussed methods for multiple comparisons (Bonferroni, Scheffé, Tukey, Dunnett, and Hsu methods) can be used. A set of 100(1 α)% simultaneous confidence intervals for contrasts comparing levels of Factor A are c iτ i = ciαi ciyi ± w mse a a a a i=1 i=1 i=1 i=1 Similarly, a set of 100(1 α)% simultaneous confidence intervals for contrasts comparing levels of Factor B are k jτ j = kjβ j ky j j ± w mse c i br k j ar b b b b j=1 j=1 j=1 j=1

45 where the critical coefficients are w B = t n-a-b+1, α m or w = a-1 F b-1 F S a-1,n-a-b+1,α b-1,n-a-b+1,α w = T q q or a,n-a-b+1,α b,n-a-b+1,α ( 0.5) ( 0.5) w = w = t or t D1 H a-1,n-a- b +1,α b-1,n-a-b+1,α ( 0.5) ( 0.5) w = t or t D a-1,n-a-b+1,α b-1,n-a-b+1,α 100(1 α)% simultaneous confidence intervals for treatment means τ ij = µ + α i + β j are given by a+b-1 τ ij = µ + α j + βj ( Y i + Y j - Y ) ± w mse abr where the critical coefficients for the Bonferroni and Scheffé methods are w = t and w = a + b - 1 F BM n-a-b+1, α SM a+b-1,n-a-b+1,α ab respectively. Note that Satterthwaite s method is still appropriate when the variances are unequal and can not be stabilized by transformation.

46 - Analysis of Variance The two standard hypotheses of a two-way main effects model (in no particular order) are: A H : α = α = L = α 0 1 a and B H : β = β = L = β 0 b b b i.e., there is no corresponding main effect. Note that this hypothesis suggests that the interaction plots show no consistent gap across levels of Factor A. To test that Factor A has no effect on the responses, we can consider A H : α = α = L = α based on the reduced model 0 1 a Y ijt = µ + β j + ijt which is identical to _ a one-way ANOVA model where µ is replaced by µ * = µ + β with br observations per treatment level of Factor A. A Thus sse 0 is the same as the sums of squares for error in a one-way ANOVA a b r sse = y - y A 0 ijt j i=1 j=1 t=1

47 The sums of squares for testing is A ssa = sse - sse 0 A H 0 for a balanced design ( ijt j ) ( ijt i j ) a b r a b r = y -y - y -y -y +y i=1 j=1 t=1 i=1 j=1 t=1 ( ijt j ) ( ijt j ) ( i ) a b r a b r = y -y - y -y - y -y i=1 j=1 t=1 i=1 j=1 t=1 a i=1 ( i ) = br y - y i=1 a y y i ijt = - br abr which is identical to the sums of squares for testing the corresponding main effect in a two-way complete model. Now if A H 0 is true, then ssa ~ χ σ a-1 sse and since ~ χ n-a-b+1 σ and ssa and sse are independent, the ratio of these two Chi-Square statistics (divided by their respective degrees of freedom) yields ssa ssa ( a-1) σ ( a-1) msa = = ~ F sse sse mse ( n-a-b+1) σ ( n-a-b+1) which provides us with the means for testing A H : α = α = L = α 0 1 a a-1,n-a-b+1

48 We will reject when A H : α = α = L = α 0 1 a msa >Fa-1,n-a-b+1,α mse Similarly, to test that Factor B has no effect on the responses, we can consider B H : β = β = L = β based on the reduced model 0 1 b Y ijt = µ + α i + ijt which is identical to _ a one-way ANOVA model where µ is replaced by µ * = µ + α. with ar observations per treatment level of Factor B. B Thus sse 0 is the same as the sums of squares for error in a one-way ANOVA a b r sse = y - y B 0 ijt i i=1 j=1 t=1

49 The sums of squares for testing is B ssb = sse - sse B H 0 for a balanced design ( ijt i ) ( ijt i j ) ( ijt i ) ( ijt i ) ( j ) 0 a b r a b r = y -y - y -y -y +y i=1 j=1 t=1 i=1 j=1 t=1 a b r a b r = y -y - y -y - y -y i=1 j=1 t=1 i=1 j=1 t=1 b ( j ) = ar y - y j=1 b y j yijt = - ar abr j=1 which again is identical to the sums of squares for testing the corresponding main effect in a two-way complete model. Now if B H 0 is true, then ssb ~ χ σ b-1 sse and since ~ χ n-a-b+1 σ and ssa and sse are independent, the ratio of these two Chi-Square statistics (divided by their respective degrees of freedom) yields ssb ssb ( b-1) σ ( b-1) msb = = ~ F sse sse mse ( n-a-b+1) σ ( n-a-b+1) which provides us with the means for testing B H : β = β = L = β 0 1 b b-1,n-a-b+1

50 We will reject when B H : β = β = L = β 0 1 b msb >Fb-1,n-a-b+1,α mse The results of a Two Way Main Effects Analysis of Variance can be summarized and displayed in an ANOVA Table: Source of Variation Degrees of Freedom (df) Sum of Squares (SS) Mean Square (MS) F-Ratio Factor A Error Total a-1 Factor B b-1 n a b+1 n - 1 sse = a b r ( yijt - yi - y j + y ) i=1 j=1 t=1 a b r a i i=1 ssa = br y - y ( j ) b j=1 ssb = ar y - y ( ijt i ) sstot = y - y i=1 j=1 t=1 ssa msa = a-1 ssb msb = b-1 sse mse = n-a-b+1 F A msa = mse msb F B = mse

51 Example Again consider the Automobile Battery Life problem augmented by the class of auto in which the battery is installed (Mid-sized or Full-sized): Automobile Battery Life (in Months) Size New England Mid West South West Mid Full Mid Full We ll use Region as Factor A (i = 1 for New England, i = for Mid West, and i = 3 for South West) and Class of Auto as Factor B (j = 1 for Mid-sized and j = for Full-sized). Use these data to perform a Two Way main effects ANOVA. Recall the interaction plot for this data: Life of Battery (Months) 60 Interaction Plot Sealed Mid-sized Nonsealed Full-sized 10 0 New TryHard England NeverStart Mid West South WorryLast West Region Brand There is very little evidence of interaction between region and class of auto (the relationships between classes of auto are similar for the different classes of auto).

52 Or this interaction plot: Life of Battery (Months) 60 Interaction Plot New TryHard England Mid NeverStart West South WorryLast West 10 0 Mid-sized Sealed Full-sized Nonsealed Type Region of Battery Again, there is very little evidence of interaction between region and class of auto (the relationships between classes of auto are similar for the different regions). This could be used to justify our choice of a main effects analysis. First we test the main effect associated with Factor A: A H : α = α = L = α 0 1 a The appropriate sum of squares is y ssa = - y abr a i i=1 br Since this is equivalent to the sums of squares associated with Factor A in the two-way complete model (which we already calculated) we have that: y y ssa = - = 88 abr a i i=1 br

53 So the corresponding mean square is ssa 88 msa = = = a-1 To calculate the F-statistic necessary to test the Factor A main effect hypothesis, we still need the sse: a b r ( ijt i j ) sse = y - y - y + y i=1 j=1 t=1 which is somewhat arduous to calculate. However, recall that for a balanced sample we have that sstot = ssa + ssb + sse From our previous work we already know that sstot = 40.0, so if we find ssb we can more easily calculate sse. Recall that ssb for the two-way main effects model is equivalent to the sums of squares associated with Factor B in the two-way complete model (which we already calculated): ( j ) b j=1 ssb = ar y - y = 8.33 so we have that sse = sstot - ssa - ssb = = and the corresponding mean squares is sse mse = = = n-a-b+1 8

54 which results in an F-statistic for the hypothesis test of a Factor A main effect of msa 144 F A = = = mse 13.1 At a 1 = and n a - b + 1 = 8 degrees of freedom, this test statistic has a p-value of , so we have strong evidence that the hypothesis of no main effect for Factor A is incorrect. Next we test the main effect associated with Factor B: B H : β = β = L = β 0 1 b The appropriate sum of squares is y ssb = - y abr b j j=1 ar which we have already seen is equivalent to the sums of squares associated with Factor B in the two-way complete model (which we already calculated): y y ssb = - = 8.33 abr b j j=1 ar

55 So the corresponding mean square is ssb 8.33 msb = = = 8.33 b-1 1 which results in an F-statistic of msb 8.33 F B = = = mse 13.1 At b 1 = 1 and n a - b + 1 = 8 degrees of freedom, this test statistic has a p-value of , so we so we do not reject the hypothesis of no main effect for Factor B at any reasonable significance level. The results of our Two Way Main Effects Analysis of Variance are be summarized and displayed in the following ANOVA Table: Source of Variation Degrees of Freedom (df) Sum of Squares (SS) Mean Square (MS) F-Ratio Factor A a-1= ssa = 88 msa = 144 F A = Factor B b-1=1 ssb = 8.33 msb = 8.33 F B = Error n a b+1=8 sse = mse = 13.1 Total n 1=11 sstot = 40

56 SAS code for a Two Way Main Effect Model: DATA battery; INPUT region $ autotype $ treatmnt life; num=_n_; LABEL region= Region of Country' autotype='type of Auto (Mid- vs. Full-sized)' life='observed Life of Battery in Months' num='order of Data'; CARDS; New England Mid SouthWest Full 6 36 ; PROC GLM DATA=battery; TITLE4 'Using PROC GLM for a Two-Factor Main Effects Analysis'; CLASS region autotype; MODEL life=region autotype; RUN; SAS output for a Two Way Main Effect Model: Analysis of Variance AUTOMOBILE BATTERY LIFE DATA ANALYSIS FOR QA 605 WINTER QUARTER 001 Using PROC GLM for a Two-Factor Analysis Dependent Variable: life The GLM Procedure Observed Life of Battery in Months Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE life Mean Source DF Type I SS Mean Square F Value Pr > F region autotype Source DF Type III SS Mean Square F Value Pr > F region autotype

57 - A Note About Contrasts: Two estimable contrasts are said to be orthogonal iff their least squares estimates are uncorrelated. In terms of treatment combinations, this means that contrasts ν i i i=1 c τ ν and ksτs s=1 are orthogonal iff ν ν ν ν 0 = Cov c Y, k Y = c k Cov Y, Y i=1 s=1 i=1 s=1 (, ) (, ) i i i i i s i s i=1 i=1 s 1 ν i i s s i s i s ν ν ν = c k Cov Y Y + c k Cov Y Y ( ) = c k Var Y + 0 = σ i i i i=1 ν ck i i r i=1 i i.e., observed responses (Y it s) are independent Thus the two estimable contrasts orthogonal iff ck ν i i i=1 ri = 0 which for balanced designs simplifies to ν ck i i = 0 i=1 These conditions can be rewritten in two subscripts for two-way models, first generally d h a b ij ij i=1 j=1 rij and for balanced designs a b i=1 j=1 ij ij = 0 d h = 0

58 Note also that for ν treatment combinations, the maximum number of mutually orthogonal contrasts is ν 1. Example Again consider the Automobile Battery Life problem with the addition of information regarding the class of auto (Mid-sized or Full-sized): One set of five orthogonal constraints in treatment effects could be given by Contrast τ 1 τ τ 3 τ 4 τ 5 τ This is often referred to as a complete set of mutually orthogonal contrasts. The sums of squares corresponding to the q th contrast in a complete set of mutually orthogonal contrasts is a b ij ij i=1 j=1 q a b cij ssc = c y r i=1 j=1 ij

59 SAS code for a Complete Set of Mutually Orthogonal Contrasts for Two Way Complete Model: DATA battery; INPUT region $ autotype $ treatmnt life; CARDS; NewEngland Mid SouthWest Full 6 36 ; PROC GLM DATA=battery; TITLE4 'Using PROC GLM for a Two-Factor Main Effects Analysis'; CLASS treatment; MODEL life=treatment; ESTIMATE 'Set of Orthogonal Contrasts - 1' treatmnt ; CONTRAST 'Set of Orthogonal Contrasts - 1' treatmnt ; ESTIMATE 'Set of Orthogonal Contrasts - ' treatmnt ; CONTRAST 'Set of Orthogonal Contrasts - ' treatmnt ; ESTIMATE 'Set of Orthogonal Contrasts - 3' treatmnt ; CONTRAST 'Set of Orthogonal Contrasts - 3' treatmnt ; ESTIMATE 'Set of Orthogonal Contrasts - 4' treatmnt ; CONTRAST 'Set of Orthogonal Contrasts - 4' treatmnt ; ESTIMATE 'Set of Orthogonal Contrasts - 5' treatmnt ; CONTRAST 'Set of Orthogonal Contrasts - 5' treatmnt ; RUN; SAS output for a Complete Set of Mutually Orthogonal Contrasts for Two Way Complete Model: Analysis of Variance AUTOMOBILE BATTERY LIFE DATA ANALYSIS 4 FOR QA 605 WINTER QUARTER 001 Using PROC GLM for a Two-Factor Analysis Dependent Variable: life The GLM Procedure Observed Life of battery in Months Contrast DF Contrast SS Mean Square F Value Pr > F Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts Standard Parameter Estimate Error t Value Pr > t Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts Set of Orthogonal Contrasts These sum to (sst in the complete treatment model)!

60 - A Note on Estimating Sample Sizes: Again, estimation of sample size necessary to achieve a minimum level of power (or specified length of confidence interval) are dependent on our ability to accurately estimate the mse. If the objective is to to achieve a specified length of confidence interval, we can work with the sample size until we find a suitable value of the critical coefficient w. If we are interested in the power of our hypothesis test, i.e., the probability of rejecting H 0 when at least two treatment effects differ by a given amount ( ) or more, we will work with each factor (A and B) individually. We again denote the power of the test as π( ), which is obviously a function of - the desired power of the test - the treatment sample sizes r i, i = 1,,ν - the number of treatments ν - the chosen level of significance α - the error variance σ We can use, ν, α and an estimate of σ to determine the treatment sample sizes through the formulae aσ φ bσ φ r = for Factor A and r = for Factor B. b a A B smallest difference of interest in Factor A smallest difference of interest in Factor B If the values of r differ across factors (as they usually will!) choose the larger (i.e., more conservative) r.

61 - A Note on Single Replicate Experiments: If the sample size is limited to r = 1 observation per treatment combination: the experiment will suffer from low power confidence intervals will be relatively wide These issues can be addressed to some extent through the use of a two-way main effects model. Note that if such a model is inappropriate, we must use the two-way compete model which has degrees of freedom for error of ab(r 1) which is zero for a single replicate experiment (and we are unable to estimate σ )! We can proceed with a two-way complete analysis of a single replicate experiment under any of the following conditions: σ (or a very reliable estimate) is known in advance (very unlikely) the interaction is expected to be of a form with fewer than (a 1)(b 1) degrees of freedom use Tukey s Test for Additivity to measure interaction the number of treatment combinations is large and only a few nonnegligble contrasts are expected occurs most frequently in the presence of more than two crossed factors

62 Tukey s Test for Additivity an approach that uses a single degree of freedom to test for the presence of interaction. The null hypothesis is γ H = αβ = γαβ ij 0 ij and the alternative hypothesis is that the interaction is not of this form. The test statistic is where * ssab = F = a b i=1 j=1 ssab sse e * γ H 0 ~ F 1, ( a-1)( b-1 ),α ab y y y - ssa + ssb + aby y ij i j ssa and sse = sstot ssa ssb ssab * ( ssb) Note that: Tukey s test for additivity can only be used to test for an interaction effect that is expected to change proportionally to changes in the main effects the test is not robust with respect to the assumption of normality. One final note for an imbalanced design, use Type III sums of squares to test hypotheses and Least Squares (LS) Means for pairwise comparisons of treatment means.

63 Short Summary of Types of Sums of Squares To examine these SS and associated tests, we must consider three experimental design scenarios (here a "cell" is a treatment combination): 1. balanced data (each treatment combination has exactly r replicates). unbalanced data but each treatment combination has at least one observation 3. unbalanced data with one or more empty treatment combination The various types of sums of squares are: Type I (sequential) the incremental improvement in the error SS as each effect is added to the model in some prespecified order (i.e., sequential sum of squares) Type II (partial or hierarchical) - reduction in error SS due to adding the term to the model after all other terms except those that contain it (i.e., partial sum of squares for balanced designs) Type III (orthogonal) - reduction in error SS due to adding the term after all other terms have been added to the model (i.e., partial sum of squares for imbalanced designs with no sparseness) Type IV (balanced) - variation explained by balanced comparison of averages of cell means (i.e., partial sum of squares for sparse designs)

64 Note that: All four types of sums of squares yield the same results for balanced designs (this is the same analysis as provided by Proc ANOVA) For unbalanced designs with no missing treatment combinations, types III and IV sums of squares test the balanced hypotheses (correct for imbalance) hypotheses for Types I and II depend on the number of observations per cell (do not correct for imbalance ) Type I sums of squares are appropriate when hypotheses depend on the order in which effects are specified/ introduced. This is particularly critical when some factors (such as blocking) should be taken out before other factors, even in an unbalanced design. Sums of squares for all the effects sum to the sstot only for Type I sums of squares. Type I sums of squares for polynomial models correspond to tests of orthogonal polynomials. Type II sums of squares are appropriate for model building, and are the natural choice for regression analysis. Type III and Type IV sums of squares tests differ only if the design has empty treatment combinations. With one or more empty treatment combinations, main effects are difficult to understand, interpret, and compare (some marginal means may not even be defined). It is not generally obvious how to work with main effects with missing treatment combinations.

65 Example Consider an imbalanced version of the Automobile Battery Life problem with the addition of information regarding the class of auto in which the battery is installed (Mid-sized or Full-sized): Automobile Battery Life (in Months) New England Mid West South West We ll use Region as Factor A (i = 1 for New England, i = for Mid West, and i = 3 for South West) and Class of Auto as Factor B (j = 1 for Mid-sized and j = for Full-sized). Use these data to perform a Two Way main effects ANOVA. SAS code for an Imbalanced Two Way Complete Model: DATA battery; INPUT region $ autotype $ treatmnt life; CARDS; NewEngland Mid SouthWest Full 6 36 ; PROC GLM DATA=battery; TITLE4 'Using PROC GLM for a Two-Factor Complete Analysis'; CLASS region autotype; MODEL life=region autotype region*autotype/ss1 SS SS3 SS4; MEANS region autotype/tukey CLDIFF ALPHA=0.01; LSMEANS region autotype/pdiff TDIFF ADJUST=TUKEY; RUN;

IX. Complete Block Designs (CBD s)

IX. Complete Block Designs (CBD s) IX. Complete Block Designs (CBD s) A.Background Noise Factors nuisance factors whose values can be controlled within the context of the experiment but not outside the context of the experiment Covariates

More information

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek Two-factor studies STAT 525 Chapter 19 and 20 Professor Olga Vitek December 2, 2010 19 Overview Now have two factors (A and B) Suppose each factor has two levels Could analyze as one factor with 4 levels

More information

The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization.

The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization. 1 Chapter 1: Research Design Principles The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization. 2 Chapter 2: Completely Randomized Design

More information

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS Ravinder Malhotra and Vipul Sharma National Dairy Research Institute, Karnal-132001 The most common use of statistics in dairy science is testing

More information

STAT 705 Chapter 19: Two-way ANOVA

STAT 705 Chapter 19: Two-way ANOVA STAT 705 Chapter 19: Two-way ANOVA Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 38 Two-way ANOVA Material covered in Sections 19.2 19.4, but a bit

More information

3. Design Experiments and Variance Analysis

3. Design Experiments and Variance Analysis 3. Design Experiments and Variance Analysis Isabel M. Rodrigues 1 / 46 3.1. Completely randomized experiment. Experimentation allows an investigator to find out what happens to the output variables when

More information

Ch 2: Simple Linear Regression

Ch 2: Simple Linear Regression Ch 2: Simple Linear Regression 1. Simple Linear Regression Model A simple regression model with a single regressor x is y = β 0 + β 1 x + ɛ, where we assume that the error ɛ is independent random component

More information

Two-Way Analysis of Variance - no interaction

Two-Way Analysis of Variance - no interaction 1 Two-Way Analysis of Variance - no interaction Example: Tests were conducted to assess the effects of two factors, engine type, and propellant type, on propellant burn rate in fired missiles. Three engine

More information

STAT 705 Chapter 19: Two-way ANOVA

STAT 705 Chapter 19: Two-way ANOVA STAT 705 Chapter 19: Two-way ANOVA Adapted from Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 41 Two-way ANOVA This material is covered in Sections

More information

Allow the investigation of the effects of a number of variables on some response

Allow the investigation of the effects of a number of variables on some response Lecture 12 Topic 9: Factorial treatment structures (Part I) Factorial experiments Allow the investigation of the effects of a number of variables on some response in a highly efficient manner, and in a

More information

Analysis of Variance and Design of Experiments-I

Analysis of Variance and Design of Experiments-I Analysis of Variance and Design of Experiments-I MODULE VIII LECTURE - 35 ANALYSIS OF VARIANCE IN RANDOM-EFFECTS MODEL AND MIXED-EFFECTS MODEL Dr. Shalabh Department of Mathematics and Statistics Indian

More information

Outline Topic 21 - Two Factor ANOVA

Outline Topic 21 - Two Factor ANOVA Outline Topic 21 - Two Factor ANOVA Data Model Parameter Estimates - Fall 2013 Equal Sample Size One replicate per cell Unequal Sample size Topic 21 2 Overview Now have two factors (A and B) Suppose each

More information

1 Tomato yield example.

1 Tomato yield example. ST706 - Linear Models II. Spring 2013 Two-way Analysis of Variance examples. Here we illustrate what happens analyzing two way data in proc glm in SAS. Similar issues come up with other software where

More information

Topic 6. Two-way designs: Randomized Complete Block Design [ST&D Chapter 9 sections 9.1 to 9.7 (except 9.6) and section 15.8]

Topic 6. Two-way designs: Randomized Complete Block Design [ST&D Chapter 9 sections 9.1 to 9.7 (except 9.6) and section 15.8] Topic 6. Two-way designs: Randomized Complete Block Design [ST&D Chapter 9 sections 9.1 to 9.7 (except 9.6) and section 15.8] The completely randomized design Treatments are randomly assigned to e.u. such

More information

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model Topic 23 - Unequal Replication Data Model Outline - Fall 2013 Parameter Estimates Inference Topic 23 2 Example Page 954 Data for Two Factor ANOVA Y is the response variable Factor A has levels i = 1, 2,...,

More information

Formal Statement of Simple Linear Regression Model

Formal Statement of Simple Linear Regression Model Formal Statement of Simple Linear Regression Model Y i = β 0 + β 1 X i + ɛ i Y i value of the response variable in the i th trial β 0 and β 1 are parameters X i is a known constant, the value of the predictor

More information

Lec 1: An Introduction to ANOVA

Lec 1: An Introduction to ANOVA Ying Li Stockholm University October 31, 2011 Three end-aisle displays Which is the best? Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to

More information

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Jurusan Teknik Industri Universitas Brawijaya Outline Introduction The Analysis of Variance Models for the Data Post-ANOVA Comparison of Means Sample

More information

Chapter 15: Analysis of Variance

Chapter 15: Analysis of Variance Chapter 5: Analysis of Variance 5. Introduction In this chapter, we introduced the analysis of variance technique, which deals with problems whose objective is to compare two or more populations of quantitative

More information

Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, E(X i X) 2 = (µ i µ) 2 + n 1 n σ2

Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, E(X i X) 2 = (µ i µ) 2 + n 1 n σ2 identity Y ijk Ȳ = (Y ijk Ȳij ) + (Ȳi Ȳ ) + (Ȳ j Ȳ ) + (Ȳij Ȳi Ȳ j + Ȳ ) Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, (1) E(MSE) = E(SSE/[IJ(K 1)]) = (2) E(MSA) = E(SSA/(I

More information

Analysis of Variance

Analysis of Variance Statistical Techniques II EXST7015 Analysis of Variance 15a_ANOVA_Introduction 1 Design The simplest model for Analysis of Variance (ANOVA) is the CRD, the Completely Randomized Design This model is also

More information

STAT 115:Experimental Designs

STAT 115:Experimental Designs STAT 115:Experimental Designs Josefina V. Almeda 2013 Multisample inference: Analysis of Variance 1 Learning Objectives 1. Describe Analysis of Variance (ANOVA) 2. Explain the Rationale of ANOVA 3. Compare

More information

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013

Outline. Topic 19 - Inference. The Cell Means Model. Estimates. Inference for Means Differences in cell means Contrasts. STAT Fall 2013 Topic 19 - Inference - Fall 2013 Outline Inference for Means Differences in cell means Contrasts Multiplicity Topic 19 2 The Cell Means Model Expressed numerically Y ij = µ i + ε ij where µ i is the theoretical

More information

Factorial and Unbalanced Analysis of Variance

Factorial and Unbalanced Analysis of Variance Factorial and Unbalanced Analysis of Variance Nathaniel E. Helwig Assistant Professor of Psychology and Statistics University of Minnesota (Twin Cities) Updated 04-Jan-2017 Nathaniel E. Helwig (U of Minnesota)

More information

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous.

COMPLETELY RANDOM DESIGN (CRD) -Design can be used when experimental units are essentially homogeneous. COMPLETELY RANDOM DESIGN (CRD) Description of the Design -Simplest design to use. -Design can be used when experimental units are essentially homogeneous. -Because of the homogeneity requirement, it may

More information

Unit 27 One-Way Analysis of Variance

Unit 27 One-Way Analysis of Variance Unit 27 One-Way Analysis of Variance Objectives: To perform the hypothesis test in a one-way analysis of variance for comparing more than two population means Recall that a two sample t test is applied

More information

Lecture 5: Comparing Treatment Means Montgomery: Section 3-5

Lecture 5: Comparing Treatment Means Montgomery: Section 3-5 Lecture 5: Comparing Treatment Means Montgomery: Section 3-5 Page 1 Linear Combination of Means ANOVA: y ij = µ + τ i + ɛ ij = µ i + ɛ ij Linear combination: L = c 1 µ 1 + c 1 µ 2 +...+ c a µ a = a i=1

More information

Estimating σ 2. We can do simple prediction of Y and estimation of the mean of Y at any value of X.

Estimating σ 2. We can do simple prediction of Y and estimation of the mean of Y at any value of X. Estimating σ 2 We can do simple prediction of Y and estimation of the mean of Y at any value of X. To perform inferences about our regression line, we must estimate σ 2, the variance of the error term.

More information

Statistics For Economics & Business

Statistics For Economics & Business Statistics For Economics & Business Analysis of Variance In this chapter, you learn: Learning Objectives The basic concepts of experimental design How to use one-way analysis of variance to test for differences

More information

Laboratory Topics 4 & 5

Laboratory Topics 4 & 5 PLS205 Lab 3 January 23, 2014 Orthogonal contrasts Class comparisons in SAS Trend analysis in SAS Multiple mean comparisons Laboratory Topics 4 & 5 Orthogonal contrasts Planned, single degree-of-freedom

More information

Chapter 8 Heteroskedasticity

Chapter 8 Heteroskedasticity Chapter 8 Walter R. Paczkowski Rutgers University Page 1 Chapter Contents 8.1 The Nature of 8. Detecting 8.3 -Consistent Standard Errors 8.4 Generalized Least Squares: Known Form of Variance 8.5 Generalized

More information

2 Hand-out 2. Dr. M. P. M. M. M c Loughlin Revised 2018

2 Hand-out 2. Dr. M. P. M. M. M c Loughlin Revised 2018 Math 403 - P. & S. III - Dr. McLoughlin - 1 2018 2 Hand-out 2 Dr. M. P. M. M. M c Loughlin Revised 2018 3. Fundamentals 3.1. Preliminaries. Suppose we can produce a random sample of weights of 10 year-olds

More information

Unit 12: Analysis of Single Factor Experiments

Unit 12: Analysis of Single Factor Experiments Unit 12: Analysis of Single Factor Experiments Statistics 571: Statistical Methods Ramón V. León 7/16/2004 Unit 12 - Stat 571 - Ramón V. León 1 Introduction Chapter 8: How to compare two treatments. Chapter

More information

Ch. 1: Data and Distributions

Ch. 1: Data and Distributions Ch. 1: Data and Distributions Populations vs. Samples How to graphically display data Histograms, dot plots, stem plots, etc Helps to show how samples are distributed Distributions of both continuous and

More information

Linear Combinations. Comparison of treatment means. Bruce A Craig. Department of Statistics Purdue University. STAT 514 Topic 6 1

Linear Combinations. Comparison of treatment means. Bruce A Craig. Department of Statistics Purdue University. STAT 514 Topic 6 1 Linear Combinations Comparison of treatment means Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 6 1 Linear Combinations of Means y ij = µ + τ i + ǫ ij = µ i + ǫ ij Often study

More information

Unit 8: 2 k Factorial Designs, Single or Unequal Replications in Factorial Designs, and Incomplete Block Designs

Unit 8: 2 k Factorial Designs, Single or Unequal Replications in Factorial Designs, and Incomplete Block Designs Unit 8: 2 k Factorial Designs, Single or Unequal Replications in Factorial Designs, and Incomplete Block Designs STA 643: Advanced Experimental Design Derek S. Young 1 Learning Objectives Revisit your

More information

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model Topic 17 - Single Factor Analysis of Variance - Fall 2013 One way ANOVA Cell means model Factor effects model Outline Topic 17 2 One-way ANOVA Response variable Y is continuous Explanatory variable is

More information

Incomplete Block Designs

Incomplete Block Designs Incomplete Block Designs Recall: in randomized complete block design, each of a treatments was used once within each of b blocks. In some situations, it will not be possible to use each of a treatments

More information

Factorial designs. Experiments

Factorial designs. Experiments Chapter 5: Factorial designs Petter Mostad mostad@chalmers.se Experiments Actively making changes and observing the result, to find causal relationships. Many types of experimental plans Measuring response

More information

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS

WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS 1 WITHIN-PARTICIPANT EXPERIMENTAL DESIGNS I. Single-factor designs: the model is: yij i j ij ij where: yij score for person j under treatment level i (i = 1,..., I; j = 1,..., n) overall mean βi treatment

More information

Inference for the Regression Coefficient

Inference for the Regression Coefficient Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression line. We can shows that b 0 and b 1 are the unbiased estimates

More information

TWO OR MORE RANDOM EFFECTS. The two-way complete model for two random effects:

TWO OR MORE RANDOM EFFECTS. The two-way complete model for two random effects: TWO OR MORE RANDOM EFFECTS Example: The factors that influence the breaking strength of a synthetic fiber are being studied. Four production machines and three operators are randomly selected. A two-way

More information

Group comparison test for independent samples

Group comparison test for independent samples Group comparison test for independent samples The purpose of the Analysis of Variance (ANOVA) is to test for significant differences between means. Supposing that: samples come from normal populations

More information

Fractional Factorial Designs

Fractional Factorial Designs k-p Fractional Factorial Designs Fractional Factorial Designs If we have 7 factors, a 7 factorial design will require 8 experiments How much information can we obtain from fewer experiments, e.g. 7-4 =

More information

Review of Statistics 101

Review of Statistics 101 Review of Statistics 101 We review some important themes from the course 1. Introduction Statistics- Set of methods for collecting/analyzing data (the art and science of learning from data). Provides methods

More information

Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures

Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures 12.1 Topic 12. The Split-plot Design and its Relatives (continued) Repeated Measures 12.9 Repeated measures analysis Sometimes researchers make multiple measurements on the same experimental unit. We have

More information

Analysis of Variance (ANOVA)

Analysis of Variance (ANOVA) Analysis of Variance ANOVA) Compare several means Radu Trîmbiţaş 1 Analysis of Variance for a One-Way Layout 1.1 One-way ANOVA Analysis of Variance for a One-Way Layout procedure for one-way layout Suppose

More information

Topic 13. Analysis of Covariance (ANCOVA) [ST&D chapter 17] 13.1 Introduction Review of regression concepts

Topic 13. Analysis of Covariance (ANCOVA) [ST&D chapter 17] 13.1 Introduction Review of regression concepts Topic 13. Analysis of Covariance (ANCOVA) [ST&D chapter 17] 13.1 Introduction The analysis of covariance (ANCOVA) is a technique that is occasionally useful for improving the precision of an experiment.

More information

STAT 506: Randomized complete block designs

STAT 506: Randomized complete block designs STAT 506: Randomized complete block designs Timothy Hanson Department of Statistics, University of South Carolina STAT 506: Introduction to Experimental Design 1 / 10 Randomized complete block designs

More information

Lecture 3: Inference in SLR

Lecture 3: Inference in SLR Lecture 3: Inference in SLR STAT 51 Spring 011 Background Reading KNNL:.1.6 3-1 Topic Overview This topic will cover: Review of hypothesis testing Inference about 1 Inference about 0 Confidence Intervals

More information

Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes)

Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes) Introduction to Design and Analysis of Experiments with the SAS System (Stat 7010 Lecture Notes) Asheber Abebe Discrete and Statistical Sciences Auburn University Contents 1 Completely Randomized Design

More information

Topic 9: Factorial treatment structures. Introduction. Terminology. Example of a 2x2 factorial

Topic 9: Factorial treatment structures. Introduction. Terminology. Example of a 2x2 factorial Topic 9: Factorial treatment structures Introduction A common objective in research is to investigate the effect of each of a number of variables, or factors, on some response variable. In earlier times,

More information

Two-Factor Full Factorial Design with Replications

Two-Factor Full Factorial Design with Replications Two-Factor Full Factorial Design with Replications Dr. John Mellor-Crummey Department of Computer Science Rice University johnmc@cs.rice.edu COMP 58 Lecture 17 March 005 Goals for Today Understand Two-factor

More information

W&M CSCI 688: Design of Experiments Homework 2. Megan Rose Bryant

W&M CSCI 688: Design of Experiments Homework 2. Megan Rose Bryant W&M CSCI 688: Design of Experiments Homework 2 Megan Rose Bryant September 25, 201 3.5 The tensile strength of Portland cement is being studied. Four different mixing techniques can be used economically.

More information

Contrasts and Multiple Comparisons Supplement for Pages

Contrasts and Multiple Comparisons Supplement for Pages Contrasts and Multiple Comparisons Supplement for Pages 302-323 Brian Habing University of South Carolina Last Updated: July 20, 2001 The F-test from the ANOVA table allows us to test the null hypothesis

More information

Lecture 9: Factorial Design Montgomery: chapter 5

Lecture 9: Factorial Design Montgomery: chapter 5 Lecture 9: Factorial Design Montgomery: chapter 5 Page 1 Examples Example I. Two factors (A, B) each with two levels (, +) Page 2 Three Data for Example I Ex.I-Data 1 A B + + 27,33 51,51 18,22 39,41 EX.I-Data

More information

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum T-test: means of Spock's judge versus all other judges 1 The TTEST Procedure Variable: pcwomen judge1 N Mean Std Dev Std Err Minimum Maximum OTHER 37 29.4919 7.4308 1.2216 16.5000 48.9000 SPOCKS 9 14.6222

More information

Unit 7: Random Effects, Subsampling, Nested and Crossed Factor Designs

Unit 7: Random Effects, Subsampling, Nested and Crossed Factor Designs Unit 7: Random Effects, Subsampling, Nested and Crossed Factor Designs STA 643: Advanced Experimental Design Derek S. Young 1 Learning Objectives Understand how to interpret a random effect Know the different

More information

Introduction to Analysis of Variance (ANOVA) Part 2

Introduction to Analysis of Variance (ANOVA) Part 2 Introduction to Analysis of Variance (ANOVA) Part 2 Single factor Serpulid recruitment and biofilms Effect of biofilm type on number of recruiting serpulid worms in Port Phillip Bay Response variable:

More information

Unbalanced Data in Factorials Types I, II, III SS Part 1

Unbalanced Data in Factorials Types I, II, III SS Part 1 Unbalanced Data in Factorials Types I, II, III SS Part 1 Chapter 10 in Oehlert STAT:5201 Week 9 - Lecture 2 1 / 14 When we perform an ANOVA, we try to quantify the amount of variability in the data accounted

More information

Chapter 10. Design of Experiments and Analysis of Variance

Chapter 10. Design of Experiments and Analysis of Variance Chapter 10 Design of Experiments and Analysis of Variance Elements of a Designed Experiment Response variable Also called the dependent variable Factors (quantitative and qualitative) Also called the independent

More information

4.8 Alternate Analysis as a Oneway ANOVA

4.8 Alternate Analysis as a Oneway ANOVA 4.8 Alternate Analysis as a Oneway ANOVA Suppose we have data from a two-factor factorial design. The following method can be used to perform a multiple comparison test to compare treatment means as well

More information

Assignment 6 Answer Keys

Assignment 6 Answer Keys ssignment 6 nswer Keys Problem 1 (a) The treatment sum of squares can be calculated by SS Treatment = b a ȳi 2 Nȳ 2 i=1 = 5 (5.40 2 + 5.80 2 + 10 2 + 9.80 2 ) 20 7.75 2 = 92.95 Then the F statistic for

More information

More about Single Factor Experiments

More about Single Factor Experiments More about Single Factor Experiments 1 2 3 0 / 23 1 2 3 1 / 23 Parameter estimation Effect Model (1): Y ij = µ + A i + ɛ ij, Ji A i = 0 Estimation: µ + A i = y i. ˆµ = y..  i = y i. y.. Effect Modell

More information

Analysis of Covariance

Analysis of Covariance Analysis of Covariance (ANCOVA) Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 10 1 When to Use ANCOVA In experiment, there is a nuisance factor x that is 1 Correlated with y 2

More information

One-Way ANOVA. Some examples of when ANOVA would be appropriate include:

One-Way ANOVA. Some examples of when ANOVA would be appropriate include: One-Way ANOVA 1. Purpose Analysis of variance (ANOVA) is used when one wishes to determine whether two or more groups (e.g., classes A, B, and C) differ on some outcome of interest (e.g., an achievement

More information

If we have many sets of populations, we may compare the means of populations in each set with one experiment.

If we have many sets of populations, we may compare the means of populations in each set with one experiment. Statistical Methods in Business Lecture 3. Factorial Design: If we have many sets of populations we may compare the means of populations in each set with one experiment. Assume we have two factors with

More information

http://www.statsoft.it/out.php?loc=http://www.statsoft.com/textbook/ Group comparison test for independent samples The purpose of the Analysis of Variance (ANOVA) is to test for significant differences

More information

STAT 705 Chapters 23 and 24: Two factors, unequal sample sizes; multi-factor ANOVA

STAT 705 Chapters 23 and 24: Two factors, unequal sample sizes; multi-factor ANOVA STAT 705 Chapters 23 and 24: Two factors, unequal sample sizes; multi-factor ANOVA Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 22 Balanced vs. unbalanced

More information

Lecture 15 Topic 11: Unbalanced Designs (missing data)

Lecture 15 Topic 11: Unbalanced Designs (missing data) Lecture 15 Topic 11: Unbalanced Designs (missing data) In the real world, things fall apart: plants are destroyed/trampled/eaten animals get sick volunteers quit assistants are sloppy accidents happen

More information

Descriptions of post-hoc tests

Descriptions of post-hoc tests Experimental Statistics II Page 81 Descriptions of post-hoc tests Post-hoc or Post-ANOVA tests! Once you have found out some treatment(s) are different, how do you determine which one(s) are different?

More information

Analysis of Variance

Analysis of Variance Analysis of Variance Math 36b May 7, 2009 Contents 2 ANOVA: Analysis of Variance 16 2.1 Basic ANOVA........................... 16 2.1.1 the model......................... 17 2.1.2 treatment sum of squares.................

More information

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis

PLS205!! Lab 9!! March 6, Topic 13: Covariance Analysis PLS205!! Lab 9!! March 6, 2014 Topic 13: Covariance Analysis Covariable as a tool for increasing precision Carrying out a full ANCOVA Testing ANOVA assumptions Happiness! Covariable as a Tool for Increasing

More information

Design & Analysis of Experiments 7E 2009 Montgomery

Design & Analysis of Experiments 7E 2009 Montgomery 1 What If There Are More Than Two Factor Levels? The t-test does not directly apply ppy There are lots of practical situations where there are either more than two levels of interest, or there are several

More information

Linear Combinations of Group Means

Linear Combinations of Group Means Linear Combinations of Group Means Look at the handicap example on p. 150 of the text. proc means data=mth567.disability; class handicap; var score; proc sort data=mth567.disability; by handicap; proc

More information

The Random Effects Model Introduction

The Random Effects Model Introduction The Random Effects Model Introduction Sometimes, treatments included in experiment are randomly chosen from set of all possible treatments. Conclusions from such experiment can then be generalized to other

More information

Confidence Intervals, Testing and ANOVA Summary

Confidence Intervals, Testing and ANOVA Summary Confidence Intervals, Testing and ANOVA Summary 1 One Sample Tests 1.1 One Sample z test: Mean (σ known) Let X 1,, X n a r.s. from N(µ, σ) or n > 30. Let The test statistic is H 0 : µ = µ 0. z = x µ 0

More information

PLS205 Lab 2 January 15, Laboratory Topic 3

PLS205 Lab 2 January 15, Laboratory Topic 3 PLS205 Lab 2 January 15, 2015 Laboratory Topic 3 General format of ANOVA in SAS Testing the assumption of homogeneity of variances by "/hovtest" by ANOVA of squared residuals Proc Power for ANOVA One-way

More information

Chap The McGraw-Hill Companies, Inc. All rights reserved.

Chap The McGraw-Hill Companies, Inc. All rights reserved. 11 pter11 Chap Analysis of Variance Overview of ANOVA Multiple Comparisons Tests for Homogeneity of Variances Two-Factor ANOVA Without Replication General Linear Model Experimental Design: An Overview

More information

STAT 401A - Statistical Methods for Research Workers

STAT 401A - Statistical Methods for Research Workers STAT 401A - Statistical Methods for Research Workers One-way ANOVA Jarad Niemi (Dr. J) Iowa State University last updated: October 10, 2014 Jarad Niemi (Iowa State) One-way ANOVA October 10, 2014 1 / 39

More information

Two-Way Factorial Designs

Two-Way Factorial Designs 81-86 Two-Way Factorial Designs Yibi Huang 81-86 Two-Way Factorial Designs Chapter 8A - 1 Problem 81 Sprouting Barley (p166 in Oehlert) Brewer s malt is produced from germinating barley, so brewers like

More information

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3

Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Lecture 3. Experiments with a Single Factor: ANOVA Montgomery 3-1 through 3-3 Page 1 Tensile Strength Experiment Investigate the tensile strength of a new synthetic fiber. The factor is the weight percent

More information

Ch. 5 Two-way ANOVA: Fixed effect model Equal sample sizes

Ch. 5 Two-way ANOVA: Fixed effect model Equal sample sizes Ch. 5 Two-way ANOVA: Fixed effect model Equal sample sizes 1 Assumptions and models There are two factors, factors A and B, that are of interest. Factor A is studied at a levels, and factor B at b levels;

More information

A posteriori multiple comparison tests

A posteriori multiple comparison tests A posteriori multiple comparison tests 11/15/16 1 Recall the Lakes experiment Source of variation SS DF MS F P Lakes 58.000 2 29.400 8.243 0.006 Error 42.800 12 3.567 Total 101.600 14 The ANOVA tells us

More information

Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests

Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests Throughout this chapter we consider a sample X taken from a population indexed by θ Θ R k. Instead of estimating the unknown parameter, we

More information

STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons (Ch. 4-5)

STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons (Ch. 4-5) STAT 5200 Handout #7a Contrasts & Post hoc Means Comparisons Ch. 4-5) Recall CRD means and effects models: Y ij = µ i + ϵ ij = µ + α i + ϵ ij i = 1,..., g ; j = 1,..., n ; ϵ ij s iid N0, σ 2 ) If we reject

More information

Lecture 7: Latin Square and Related Design

Lecture 7: Latin Square and Related Design Lecture 7: Latin Square and Related Design Montgomery: Section 4.2-4.3 Page 1 Automobile Emission Experiment Four cars and four drivers are employed in a study for possible differences between four gasoline

More information

Statistical Analysis of Unreplicated Factorial Designs Using Contrasts

Statistical Analysis of Unreplicated Factorial Designs Using Contrasts Georgia Southern University Digital Commons@Georgia Southern Electronic Theses & Dissertations Jack N. Averitt College of Graduate Studies COGS) Summer 204 Statistical Analysis of Unreplicated Factorial

More information

Lecture 7 Randomized Complete Block Design (RCBD) [ST&D sections (except 9.6) and section 15.8]

Lecture 7 Randomized Complete Block Design (RCBD) [ST&D sections (except 9.6) and section 15.8] Lecture 7 Randomized Complete Block Design () [ST&D sections 9.1 9.7 (except 9.6) and section 15.8] The Completely Randomized Design () 1. It is assumed that all experimental units (EU's) are uniform..

More information

Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs

Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs Chapter 20 : Two factor studies one case per treatment Chapter 21: Randomized complete block designs Adapted from Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis

More information

These are all actually contrasts (the coef sum to zero). What are these contrasts representing? What would make them large?

These are all actually contrasts (the coef sum to zero). What are these contrasts representing? What would make them large? Lecture 12 Comparing treatment effects Orthogonal Contrasts What use are contrasts? Recall the Cotton data In this case, the treatment levels have an ordering to them this is not always the case) Consider

More information

Lecture 4. Random Effects in Completely Randomized Design

Lecture 4. Random Effects in Completely Randomized Design Lecture 4. Random Effects in Completely Randomized Design Montgomery: 3.9, 13.1 and 13.7 1 Lecture 4 Page 1 Random Effects vs Fixed Effects Consider factor with numerous possible levels Want to draw inference

More information

Diagnostics and Remedial Measures

Diagnostics and Remedial Measures Diagnostics and Remedial Measures Yang Feng http://www.stat.columbia.edu/~yangfeng Yang Feng (Columbia University) Diagnostics and Remedial Measures 1 / 72 Remedial Measures How do we know that the regression

More information

In a one-way ANOVA, the total sums of squares among observations is partitioned into two components: Sums of squares represent:

In a one-way ANOVA, the total sums of squares among observations is partitioned into two components: Sums of squares represent: Activity #10: AxS ANOVA (Repeated subjects design) Resources: optimism.sav So far in MATH 300 and 301, we have studied the following hypothesis testing procedures: 1) Binomial test, sign-test, Fisher s

More information

df=degrees of freedom = n - 1

df=degrees of freedom = n - 1 One sample t-test test of the mean Assumptions: Independent, random samples Approximately normal distribution (from intro class: σ is unknown, need to calculate and use s (sample standard deviation)) Hypotheses:

More information

Multiple Regression Analysis

Multiple Regression Analysis Multiple Regression Analysis y = β 0 + β 1 x 1 + β 2 x 2 +... β k x k + u 2. Inference 0 Assumptions of the Classical Linear Model (CLM)! So far, we know: 1. The mean and variance of the OLS estimators

More information

Psychology 282 Lecture #4 Outline Inferences in SLR

Psychology 282 Lecture #4 Outline Inferences in SLR Psychology 282 Lecture #4 Outline Inferences in SLR Assumptions To this point we have not had to make any distributional assumptions. Principle of least squares requires no assumptions. Can use correlations

More information

Multiple Linear Regression

Multiple Linear Regression Chapter 3 Multiple Linear Regression 3.1 Introduction Multiple linear regression is in some ways a relatively straightforward extension of simple linear regression that allows for more than one independent

More information

Outline. Topic 22 - Interaction in Two Factor ANOVA. Interaction Not Significant. General Plan

Outline. Topic 22 - Interaction in Two Factor ANOVA. Interaction Not Significant. General Plan Topic 22 - Interaction in Two Factor ANOVA - Fall 2013 Outline Strategies for Analysis when interaction not present when interaction present when n ij = 1 when factor(s) quantitative Topic 22 2 General

More information

Assessing Model Adequacy

Assessing Model Adequacy Assessing Model Adequacy A number of assumptions were made about the model, and these need to be verified in order to use the model for inferences. In cases where some assumptions are violated, there are

More information