Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
Applied Statistics Using SAS and SPSS Topic: Two Way ANOVA By Prof Kelly Fan, Cal State Univ, East Bay
Two Way ANOVA Consider studying the impact of two factors on the yield (response): Here we have R = 3 rows (levels of the Row factor), C = 4 (levels of the column factor), and n = 2 replicates per cell [n ij for (i,j) th cell if not all equal] NOTE: The “1”, “2”,etc... mean Level 1, Level 2, etc..., NOT metric values NOTE: The “1”, “2”,etc... mean Level 1, Level 2, etc..., NOT metric values , , , , , , , , , , , , 17.9 BRAND DEVICE
Statistical model: i = 1,..., R j = 1,..., C k= 1,..., n In general, n observations per cell, R C cells. Y ijk = ij ijk
1)H o : All Row Means i. Equal H 1 : Not all Row Means Equal 2)H o : All Col. Means . j Equal H 1 : Not All Col. Means Equal 3)H o : No Interaction between factors H 1 : There is interaction between factors 1)H o : Level of row factor has no impact on Y H 1 : Level of row factor does have impact on Y 2)H o : Level of column factor has no impact on Y H 1 : Level of column factor does have impact on Y 3)H o : The impact of row factor on Y does not depend on column H 1 : The impact of row factor on Y depends on column
Two basic ways to look at interaction: B L B H A L 58 A H 10? If A H B H = 13, no interaction If A H B H > 13, + interaction If A H B H < 13, - interaction -When B goes from B L B H, yield goes up by 3 (5 8). - When A goes from A L A H, yield goes up by 5 (5 10). -When both changes of level occur, does yield go up by the sum, = 8? Interaction = degree of difference from sum of separate effects INTERACTION 1)
2) -Holding B L, what happens as A goes from A L A H ?+5 -Holding B H, what happens as A goes from A L A H ?+9 If the effect of one factor (i.e., the impact of changing its level) is DIFFERENT for different levels of another factor, then INTERACTION exists between the two factors. B L B H A L 58 A H 1017 NOTE: - Holding A L, B L B H has impact Holding A H, B L B H has impact + 7 (AB) = (BA) or (9-5) = (7-3).
ANOVA Table for Battery Lifetime General Linear Model: time versus brand, device Factor Type Levels Values brand fixed 4 1, 2, 3, 4 device fixed 3 1, 2, 3 Analysis of Variance for time, using Adjusted SS for Tests Source DF Seq SS Adj SS Adj MS F P brand device brand*device Error Total S = R-Sq = 66.67% R-Sq(adj) = 36.11%
Model Selection Backward model selection: 1.Fit the full model: Y=A+B+A*B 2.Remove A*B if not significant; otherwise, stop 3.Remove the most insignificant main effect until all effects left are significant Assumption checking for the final model
MFMF Interesting Example:* Frontiersman April 50 people per cell Mean Scores “Frontiersman” “April” “Frontiersman” “April” Dependentmalesmalesfemalesfemales Variables(n=50)(n=50)(n=50) (n=50) Intent-to- purchase (*) Decision Sciences”, Vol. 9, p. 470, 1978 Brand Name Appeal for Men & Women:
ANOVA Results DependentSource d.f. MS F Variable Intent-to-Sex (A) * purchaseBrand name (B) ** (7 pt. scale)A x B *** Error *p<.05 **p<.01 ***p<.001
Exercise: Lifetime of a Special-purpose Battery It is important in battery testing to consider different temperatures and modes of use; a battery that is superior at one tempera- ture and mode of use is not necessarily superior at other treatment combination. The batteries were being tested at 4 diffe- rent temperatures for three modes of use (I for intermittent, C for continuous, S for sporadic). Analyze the data.
Battery Lifetime (2 replicates) Mode of use 1234 I12, 1615, 1931, 3953, 55 C15, 1917, 1730, 3451, 49 S11, 1724, 2233, 3761, 67 Temperature