Unbalanced 2 Factor Studies KNNL Chapter 23 Unequal Sample Sizes When sample sizes are unequal calculations and parameter interpretations especially marginal ones become messier Observational studies often have unequal sample sizes due to availability of sampling units for certain combinations of factor levels villagers of certain types in a rural study for instance Experimental studies even when planned with equal sample sizes can end up unbalanced through technical problems or drop outs Some conditions may be cheaper to measure than others and will have larger sample sizes Some situations have particular contrasts of higher importance Regression Approach I Sample Sizes of Cases when Factor A is at level i B j nij b ni nij j 1 a n j nij i 1 a nij b nT nij Yij Yijk i 1 j 1 k 1 eijk N 0 s 2 independent Model Yijk m a i b j ab ij eijk a b a b i 1 j 1 i 1 j 1 Restrictions on Effects a i b j ab ij ab ij 0 a a a1 a 2 a a 1 bb b1 b2 bb 1 Yij Y ij nij ab ib ab i1 ab i 2 ab i b 1 ab aj ab 1 j ab 2 j ab a 1 j Regression Approach II Regression Model Yijk m a1 X ijk 1 a a 1 X ijk a 1 b1 X ijka bb 1 X ijk a b 2 ab 11 X ijk1 X ijka ab a 1 b 1 X ijk a 1 X ijk a b 2 eijk 1 if case from level 1 of factor A where X ijk 1 1 if case from level a of factor A 0 otherwise 1 if case from level a 1 of factor A X ijk a 1 1 if case from level a of factor A 0 otherwise where X ijka X ijk a b 2 1 if case from level 1 of factor B 1 if case from level b of factor B 0 otherwise 1 if case from level b 1 of factor B 1 if case from level b of factor B 0 otherwise Regression Approach Example I Yijk m a1 X ijk 1 b1 X ijk 2 ab 11 X ijk1 X ijk 2 eijk a 2 a1 b2 b1 ab 12 ab 21 ab 11 ab 22 ab 11 Testing Strategies Models Fit 1 Model 1 all Factor A Factor B and Interaction AB Effects 2 Model 2 all Factor A Factor B Effects Remove Interaction 3 Model 3 all Factor B Interaction AB Effects Remove A 4 Model 4 all Factor A Interaction AB Effects Remove B 5 To test for Interaction Effects Model 1 is Full Model Model 2 is Reduced dfNumerator a 1 b 1 dfden nT ab 6 Testing for Factor A Effects Full Model 1 Reduced Model 3 dfNumerator a 1 dfden nT ab 7 Testing for Factor B Effects Full Model 1 Reduced Model 4 dfNumerator b 1 dfden nT ab Regression Approach Example Continued Yijk m a1 X ijk1 b1 X ijk 2 ab 11 X ijk1 X ijk 2 eijk Model 1 E Yijk m a1 X ijk 1 b1 X ijk 2 ab 11 X ijk1 X ijk 2 Y 36 22 5 32 X 1 2 59 X 2 0 29 X 1 X 2 Model 2 E Yijk m a1 X ijk 1 b1 X ijk 2 Y 36 23 5 33 X 1 2 63 X 2 Model 3 E Yijk m b1 X ijk 2 ab 11 X ijk1 X ijk 2 Y 36 90 2 77 X 2 0 47 X 1 X 2 Model 4 E Yijk m a1 X ijk 1 ab 11 X ijk1 X ijk 2 Y 36 31 5 41X 1 0 62 X 1 X 2 Regression Approach Example Continued H 0 ab 11 ab 12 ab 21 ab 22 0 SSE R 558 95 df E R 20 AB TS F H A Interaction Exists SSE F 557 05 df E F 19 SSE R SSE F df E R df E F SSE F df E F 558 95 557 05 20 19 0 065 RR F F 95 1 19 4 381 AB 557 05 19 Regression Approach Example Continued H 0 a1 a 2 0 H A Factor A Effects Exist SSE R 1196 19 df E R 20 1196 19 557 05 20 19 21 80 RR F F 95 1 19 4 381 F A 557 05 19 A H 0 b1 b2 0 H A Factor B Effects Exist SSE R 708 37 df E R 20 708 37 557 05 20 19 5 16 RR F F 95 1 19 4 381 F B 557 05 19 B Estimating Treatment and Factor Level Means Contrasts Treatment Means nij Parameter mij Y ijk Estimator mij Y ij Estimated Standard Error s mij k 1 nij MSE nij Factor A Means b m b ij Parameter mi j 1 b Estimator mi Y ij j 1 Estimated Standard Error s mi b MSE b 1 b 2 j 1 nij Factor B Means a Parameter m j mij i 1 a a Estimator m j Y ij i 1 a MSE a 1 Estimated Standard Error s m j a 2 i 1 nij Contrast or Linear Function of Factor A Means a a Parameter LA ci mi Estimator L A ci mi Estimated Standard Error s L A i 1 i 1 MSE a 2 b 1 ci b 2 i 1 j 1 nij Contrast or Linear Function of Factor B Means b Parameter LB c j m j j 1 b Estimator L B c j m j Estimated Standard Error s L B j 1 MSE b 2 a 1 c j a 2 j 1 i 1 nij Contrast or Linear Function of Treatment Means a b Parameter LAB cij mij i 1 j 1 a b a b cij2 Estimator L AB cij Y ij Estimated Standard Error s L AB MSE i 1 j 1 i 1 j 1 nij Standard Error Multipliers Single Comparisons t 1 a 2 nT ab General Multiple Comparisons of Treatment Cell Means Scheffe S ab 1 F 1 a ab 1 nT ab Bonferroni B t 1 a 2 g nT ab Tukey all pairs of treatment means T 1 q 1 a ab nT ab 2 General Multiple Comparisons of Factor Level Means Scheffe Factor A S A a 1 F 1 a a 1 nT ab Factor B S B b 1 F 1 a b 1 nT ab Bonferroni Factor A or Factor B B t 1 a 2 g nT ab Tukey Factor A TA 1 q 1 a a nT ab 2 Factor B TB 1 q 1 a b nT ab 2 Creative Life Cycles Comparing Treatment Means Comparing all 4 Treatment Means athough no interaction was present MSE 29 32 2 42 n11 5 Y 12 33 20 n12 5 s Y 12 MSE 29 32 2 21 n21 6 Y 22 44 …
View Full Document