Solution file for Additional exercise 7.2 ----------------------------------------- Data: measurements of 3 rabbits' blood glucose levels after injection with 3 different doses of insulin and done on 3 different days. Notation: y_i = blood glucose conc. (mg per 100 ml blood) for i'th sample, i=1,...,9, or y_ijk = blood glucose conc. (mg per 100 ml blood) for rabbit j, after having received treatment i, at day k, i=A,B,C (0,1,2 doses); j=1,2,3; k=1,2,3. The design is a 3x3 Latin square. As measurements with different treatments are obtained from the same rabbits, the order of the treatments is an issue and is taken as a blocking factor in the design. This is a safeguard against any spurious treatment effects caused by day effects, but does not really take into account carry-over effects very well (because only certain combinations of treatments accur after each other). It is not possible to do better in such a small design. The statistical model is y_i = mu + alpha_trt(i) + beta_rabbit(i) + gamma_day(i) + eps_i, or y_ijk = mu + alpha_i + beta_j + gamma_k + epsilon_ijk, depending on the chosen notation. MTB > WOpen "h:\VHM\VHM802\Data_csv\hs07_2.csv"; SUBC> FType; SUBC> CSV; SUBC> DecSep; SUBC> Period; SUBC> Field; SUBC> Comma; SUBC> TDelimiter; SUBC> DoubleQuote. Retrieving worksheet from file: 'h:\VHM\VHM802\Data_csv\hs07_2.csv' Worksheet was saved on 17/02/2011 MTB > Name c5 "SRES1" c6 "TRES1" MTB > GLM 'glucose' = day rabbit insulin; SUBC> Brief 2 ; SUBC> Means day rabbit insulin; SUBC> GFourpack; SUBC> RType 2 . General Linear Model: glucose versus day, rabbit, insulin Factor Type Levels Values day fixed 3 1, 2, 3 rabbit fixed 3 1, 2, 3 insulin fixed 3 A, B, C Analysis of Variance for glucose, using Adjusted SS for Tests Source DF Seq SS Adj SS Adj MS F P day 2 92.67 92.67 46.33 5.56 0.152 rabbit 2 96.00 96.00 48.00 5.76 0.148 insulin 2 416.67 416.67 208.33 25.00 0.038 Error 2 16.67 16.67 8.33 Total 8 622.00 S = 2.88675 R-Sq = 97.32% R-Sq(adj) = 89.28% Least Squares Means for glucose day Mean SE Mean 1 41.67 1.667 2 47.00 1.667 3 49.33 1.667 rabbit 1 46.00 1.667 2 50.00 1.667 3 42.00 1.667 insulin A 54.33 1.667 B 46.00 1.667 C 37.67 1.667 Residual Plots for glucose Comments: --------- The analysis shows a significant effect of treatments and non-significant effects of rabbits and days. Note that the power of the F-tests is rather low with only 2 degrees of freedom for error. Therefore, the significant effect is quite satisfactory, despite a P-value of only 0.038. The treatment means indicate that doses of insulin decrease the blood glucose level. One question is whether to refit the model without the non-significant factors. Usually this is not of interest because the partial and sequential sum of squares coincide (so that results would be unchanged). However, with only 2 degrees of freedom for error, one potential and important advantage could be to increase the degrees of freedom for error (pooling). In this situation, I would not do that because the F-statistics are numerically large and pooling will therefore increase our estimate of model variance considerably. We carry out a test of linearity ("lack of fit") for number of doses in the full Latin square model. MTB > Name c5 "dose" MTB > Code ( "A" ) 0 ( "B" ) 1 ( "C" ) 2 'insulin' 'dose' MTB > GLM 'glucose' = day rabbit dose; SUBC> Covariates 'dose'; SUBC> Brief 2 . General Linear Model: glucose versus day, rabbit Factor Type Levels Values day fixed 3 1, 2, 3 rabbit fixed 3 1, 2, 3 Analysis of Variance for glucose, using Adjusted SS for Tests Source DF Seq SS Adj SS Adj MS F P day 2 92.67 92.67 46.33 8.34 0.060 rabbit 2 96.00 96.00 48.00 8.64 0.057 dose 1 416.67 416.67 416.67 75.00 0.003 Error 3 16.67 16.67 5.56 Total 8 622.00 S = 2.35702 R-Sq = 97.32% R-Sq(adj) = 92.85% Term Coef SE Coef T P Constant 54.333 1.242 43.74 0.000 dose -8.3333 0.9623 -8.66 0.003 Comments: --------- The (numerator of the) F-test statistic would now be obtained by subtracting SSE's and DFE's from the two model as usual, however in this case the SSE's are equal! This is because the 3 treatment means are exactly on a straight line. Obviously, the linear model is well supported by the data. A 95% confidence interval for the impact of one added insulin dose on the glucose level is -8.33 +- 3.1824*0.9623 = -8.33 +- 3.06 = (-11.4,-5.3).