o working with our size-finger length-htime SF htime 11 -.05 .15 12 .39 .23 13 -.12 -.40 21 -.21 -.82 22 -.94 .30 23 .00 -.20 31 -1.19 -1.00 32 -1.46 -1.95 33 -1.81 -.72 o interested in 2 factor experiment - for us : does size matter? does finger length matter? - model Y(ijt) = m +a(i) + b(i) + (ab)(ij) +e(ijt) - is there interaction - what is estimable? - finish orthogonal (trend) contrasts & use - then 2 way additive - then 2 way complete ALL MUST UNDERGO ASSUMPTION CHECKING AND DO APPROPRIATE FOLLOW UPS o I use definitional rather than computation formulas. will use equal sample sizes (see text for unequal). for now will ignore least squares derivation (revisit later) o trend - A.2 - what do you notice about trend and trend x trend contrasts? inner product = 0 ie. c(1)*C(1)' + ... c(ij)*c(ij)' = 0 Definition of orthogonal - on equal sample sizes and equally spaced factor levels - why special? theorem: in the case wehre we have a SS based on k df then k-1 orthogonal contrasts exist so that ssc(1)+...+ssc(k-1) = SS where ------ ssc(q) = (sum of c(ij)* Y (ij .)-squared ------------------------------ (sum of (c(ij)-squared/r(ij)) - like for SS (these derived from normal equations) ------- ---- SSA = br (sum (Y(i..) - Y(...))-squared) ------- ---- SSB = ar (sum (Y(.j.) - Y(...))-squared) ------- ---- SSAB = (sum (Y(ij.) - Y(i..) - ----- ------ Y(.j.) + Y(...))-squared) ------- ---- SSTOT = (sum (Y(ijt) - Y(...))-squared) - want to test H0: factor A treatment effects same OR H0: factor B treatment effects same OR H0: interaction is zero think of 1-way ANOVA ---- MSE = sum((Y(it) - Y(i.)-squared) / ( n - v) here # gps is 9 (in cell means model) and sample size is 9...oops! zero df - Need replicates or do 'orthogonal trick' = sacrifice some interaction contrasts to get an error term (if feasible) - Example pool SSAB do SSAB/SSE against F; if non-significant do main effects Note: my policy and Dean's is to check interaction and if significant only do cell mean comparisons individually..using MSE from global test. o what if we were sure there was no interaction (without data snooping) - use Y(ijt) = m + a(i) + b(j) + e(ijt) and now can do usual 2-wa ANOVA, i.e. enough df - the least squares estimate formulas are above - the table : Source SS df MS F ---------------------------------------- A SSA a-1 MSA MSA/MSE B SSB b-1 MSB MSB/MSE Error SSE n-a-b+1 MSE Total SStot n-1 - Example Note: get SSE = SStot - rest - followups form: sum (c(j)*b(j)) contained in ------- sum(c(j)*Y(.j.)) +- w * sqrt(MSE*sum(c(j)-squared/ar) sum(c(i)*Y(i..)) +- w * sqrt(MSE*sum(c(i)-squared/br) w is Bonferonni= t(df=same as MSE, alpha/2m) A4 Scheffe=sqrt((a-1)*F(dfn=a-1, dfd=same as MSE, alpha) A6 Tukey=q(a,df=same as MSE,alpha) A8 Hsu & Dunnett1=t(.5)(a-1, df same as MSE, alpha) A9 Dunnett2 = t(.5)(a-1, df same as MSE, alpha) A10 o 2-way complete model - the table Source SS df MS F -------------------------------- A SSA a-1 MSA MSA/MSE B SSB b-1 MSB MSB/MSE AB SSAB (a-1)(b-1) MSAB Error SSE n-ab MSE Total SStot n-1 - Example Note: get SSE = SStot - rest SSAB = sum ((Y(ij.) - Y(...)-squared) see above for other SS - MUST FIRST TEST INTERACTION AND FIND NONSIGNIFICANT TO PROCEED - followups see above