Solution for Problem 13.3.4 Prob 13.3.4 Test Hyp: First 4 Steps a1) Ho : 1 = 2 = 0 All means are equal a2) Ha : i o for at least one i At least one mean is significantly different from others b1) Ho : 1 = 2 = 0 All slopes are equal b2) Ha : i o for at least one i At least one slope is significantly different from others Test all species of Drosophlia have same response to increasing levels of insecticide Perform ANCOVA Means X Trt 1 Trt 2 Trt 3 0 0.3 0.6 0.9 89 77 12 2 87 43 22 8 45 40 Tyx= 0 Txx= 0 91 71 23 5 0.45 47.5 Tyy=116.7 Eyy= 14315 Eyx= -133.5 Exx= 1.35 Syy= 14431 Syx= -133.5 Sxx= 1.35 44.2 Survival of Drosophlia Find Adjusted SS for Common Estimate from ANOVA Table Source Trt df Adjusted SS t-1 T' yy = S' yy - E' yy MST MSE Error t(r-1)-1 E' yy Total (sum) tr-2 S'yy Common Error 8 MS Eyy = 1113.3 Fobs MST / MSE Survival of Drosophlia Find SSQ & X-Product for Common Slope Adjust Error Sum of Squares of Y for Common Slope Tyy= 116.7 Tyx= 0 Eyy= 14315 Txx= 0 Eyx= -124.5 Exx= 1.35 Syy= 14431.7 Syx= -124.5 Sxx= 1.35 2 Exy Exy =1113.3 where b Eyy Eyy = -98.89 Exx Exx Survival of Drosophlia Setup table to Compare Common vs Separate S.V. Difference df Adjusted SS MS t-1 Separate Error t(r-2) Syyi= ? Common Error t(r-1)-1 Eyy = 1113.33 Fobs Survival of Drosophlia For each Treatment Get SSQ’s and X-product Where bi = Sxyi Sxxi X Trt 1 Trt 2 Trt 3 0 0.3 0.6 0.9 89 77 12 2 87 43 22 8 91 71 23 5 Syy=4851 Syy=5898 Syy=3566 Sxy= -45.9 Sxx= 0.45 Sxy= -48.9 Sxx= 0.45 Sxy= -38.7 Sxx= 0.45 b1 = -102 b2 = -108.7 b3 = -86 Survival of Drosophlia Calculate Separate Slopes and sum to get Separate Residual Error SS S.V. df Adjusted SS Syyi = Syyi - bi Sxyi Trt 1 4-2 4851 - (-102) (-45.9) = 169.2 Trt 2 4-2 5898 - (-108.7) (-48.9)= 584.2 Trt 3 4-2 3566 - (-86) (-38.7) Separate Error 6 = 237.8 Syyi=991.2 Survival of Drosophlia Compare Common vs Separate S.V. Difference df 2 Adjusted SS 122.13 Separate Error 6 Syyi= 991.2 Common Error 8 MS Fobs MSD= 61.07 .37 MSE=165.2 Eyy = 1113.33 Conclude Slopes are Equal b` = -98.88 F.05,2,6 = 5.14 Proceed with ANCOVA Source Trt df t-1 Adjusted SS MS T' yy = S' yy - E' yy MST MSE Error t(r-1)-1 E' yy Total (sum) tr-2 S'yy Fobs MST / MSE Sxy2 =1603.33 Exy2 =1113.33 S' yy Syy Eyy Eyy Sxx Exx Syy= 14431.7 Syx= -133.5 Sxx= 1.35 Proceed with ANCOVA Source df Adjusted SS Trt 2 Error 8 Total (sum) 10 T' yy = 116.7 E' yy= 1113.3 MS Fobs 58.3 0.42 139.2 S'yy= 14431.7 Reject H0 Conclude Adjusted means are equal F.05,2,8 = 4.459 Compare at Mean of X Series1 Series2 Series3 Gp Adjusted Mean A 47.500 A 45.000 A 40.000 100 80 60 40 20 0 0 0.2 0.4 0.6 0.8 1 • Which species has greatest relative best (best advantage)? Can’t tell since neither slopes nor means are significantly different NOTE: ADJUSTED = Unadjusted since X is same for all trts N trt 4 4 4 1 2 3 SAS: Program to test HOMOGENEITY of Slopes proc glm data=a; class trt; model y = trt x trt*x; estimate "slope for trt 1" x 1 trt*x 1 0 0; estimate "slope for trt 2" x 1 trt*x 0 1 0; estimate "slope for trt 3" x 1 trt*x 0 0 1; run; SAS Output Source DF Sum of Squares Mean Square F Value Pr > F Model 5 13440.46667 2688.09333 16.27 0.0020 Error 6 991.20000 165.20000 Corrected Total 11 14431.66667 R-Square Coeff Var Root MSE y Mean 0.931318 29.10117 12.85302 44.16667 Source DF trt 2 x 1 x*trt 2 Type I SS 116.66667 13201.66667 122.13333 Source DF trt 2 x 1 x*trt 2 Type III SS 213.03810 13201.66667 122.13333 Parameter slope for trt 1 slope for trt 2 slope for trt 3 Mean Square 58.33333 13201.66667 61.06667 F Value 0.35 79.91 0.37 Pr > F 0.7162 0.0001 0.7057 Mean Square 106.51905 13201.66667 61.06667 Standard Estimate Error t -102.000000 19.1601438 -108.666667 19.1601438 -86.000000 19.1601438 F Value 0.64 79.91 0.37 Pr > F 0.5576 0.0001 0.7057 Value Pr > |t| -5.32 0.0018 -5.67 0.0013 -4.49 0.0042 END