Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
Applied Statistics Using 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): 1 2 3 4 17.9, 18.1 17.8, 17.8 18.1, 18.2 17.8, 17.9 18.0, 18.2 18.0, 18.3 18.4, 18.1 18.1, 18.5 18.0, 17.8 17.8, 18.0 18.1, 18.3 18.1, 17.9 BRAND 1 2 3 DEVICE NOTE: The “1”, “2”,etc... mean Level 1, Level 2, etc..., NOT metric values Here we have R = 3 rows (levels of the Row factor), C = 4 (levels of the column factor), and n = 2 replicates per cell [nij for (i,j)th cell if not all equal]
Yijk = ijijk Statistical model: i = 1, ..., R j = 1, ..., C k= 1, ..., n In general, n observations per cell, R • C cells.
1) Ho: Level of row factor has no impact on Y H1: Level of row factor does have impact on Y 2) Ho: Level of column factor has no impact on Y H1: Level of column factor does have impact on Y 3) Ho: The impact of row factor on Y does not depend on column H1: The impact of row factor on Y depends on column 1) Ho: All Row Means mi. Equal H1: Not all Row Means Equal 2) Ho: All Col. Means m.j Equal H1: Not All Col. Means Equal 3) Ho: No Interaction between factors H1: There is interaction between factors
INTERACTION 1) Two basic ways to look at interaction: BL BH AL 5 8 AH 10 ? 1) If AHBH = 13, no interaction If AHBH > 13, + interaction If AHBH < 13, - interaction - When B goes from BLBH, yield goes up by 3 (58). - When A goes from AL AH, yield goes up by 5 (510). - When both changes of level occur, does yield go up by the sum, 3 + 5 = 8? Interaction = degree of difference from sum of separate effects
BL BH AL 5 8 AH 10 17 2) - Holding BL, what happens as A goes from AL AH? +5 - Holding BH, what happens as A goes from AL AH? +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. NOTE: - Holding AL, BL BH has impact + 3 - Holding AH, BL BH 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 3 0.21000 0.21000 0.07000 2.80 0.085 device 2 0.28000 0.28000 0.14000 5.60 0.019 brand*device 6 0.11000 0.11000 0.01833 0.73 0.633 Error 12 0.30000 0.30000 0.02500 Total 23 0.90000 S = 0.158114 R-Sq = 66.67% R-Sq(adj) = 36.11%
Model Selection Backward model selection: Fit the full model: Y=A+B+A*B Remove A*B if not significant; otherwise, stop Remove the most insignificant main effect until all effects left are significant Assumption checking for the final model
Brand Name Appeal for Men & Women: M F Interesting Example:* Frontiersman April 50 people per cell Mean Scores “Frontiersman” “April” “Frontiersman” “April” Dependent males males females females Variables (n=50) (n=50) (n=50) (n=50) Intent-to- purchase 4.44 3.50 2.04 4.52 (*) Decision Sciences”, Vol. 9, p. 470, 1978
ANOVA Results Dependent Source d.f. MS F Variable Intent-to- Sex (A) 1 23.80 5.61* purchase Brand name (B) 1 29.64 6.99** (7 pt. scale) A x B 1 146.21 34.48*** Error 196 4.24 *p <.05 **p <.01 ***p <.001
Multiple Comparisons If A*B is not significant (so not included in the final model), conduct multiple comparison procedures as in one-way ANOVA. If A*B is significant, create one factor, called C, which contains all combinations of A and B, then conduct one-way ANOVA and multiple comparisons on the factor C.
Example: Child Activity Level placebo ritalin normal 50 45 55 52 67 60 58 65 hyperactive 70 72 68 75 51 57 48 55 One group of children is considered as normal and the other as hyperactive. Each group is randomly divided, with one half receiving a placebo and the other a drug called ritalin. A measure of activity is determined for each of the children.
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) Temperature Mode of use 1 2 3 4 I 12, 16 15, 19 31, 39 53, 55 C 17, 17 30, 34 51, 49 S 11, 17 24, 22 33, 37 61, 67