Solution file for additional exercise 7.1 ----------------------------------------- Data: measurements of 6 male and 6 female rat's consumption (in g) of fat (fresh or rancid). Notation: y_i = consumption for i'th rat, i=1,...,12, or y_ijk = consumption for k'th rat in gender group i and fat type group j i=f,m; j=f,r; k=1,2,3. The design would usually be considered a block design because gender is inherent in the animals and cannot be randomised (thus, the randomisation is within gender groups and consists in randomly allocating the 6 rats of each gender to the two types of fat). Despite being a blocking factor, there is probably real interest in gender and its interaction with fat type should be included in the full model. The statistical model is y_i = mu + alpha_sex(i) + beta_fat(i) + gamma_sex*fat(i) + eps_i, or y_ijk = mu + alpha_i + beta_j + gamma_ij + epsilon_ijk, depending on the chosen notation. MTB > WOpen "h:\VHM\VHM802\Data_csv\hs07_1.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_1.csv' Worksheet was saved on 17/02/2011 MTB > Name c4 "SRES1" c5 "TRES1" MTB > GLM 'consum' = gender| fat; SUBC> Brief 2 ; SUBC> Means gender|fat; SUBC> SResiduals 'SRES1'; SUBC> TResiduals 'TRES1'; SUBC> GFourpack; SUBC> RType 2 . General Linear Model: consum versus gender, fat Factor Type Levels Values gender fixed 2 f, m fat fixed 2 f, r Analysis of Variance for consum, using Adjusted SS for Tests Source DF Seq SS Adj SS Adj MS F P gender 1 3781 3781 3781 2.59 0.146 fat 1 61204 61204 61204 41.97 0.000 gender*fat 1 919 919 919 0.63 0.450 Error 8 11667 11667 1458 Total 11 77570 S = 38.1881 R-Sq = 84.96% R-Sq(adj) = 79.32% Least Squares Means for consum gender Mean SE Mean f 580.0 15.59 m 615.5 15.59 fat f 669.2 15.59 r 526.3 15.59 gender*fat f f 642.7 22.05 f r 517.3 22.05 m f 695.7 22.05 m r 535.3 22.05 Residual Plots for consum MTB > GLM 'consum' = gender| fat; SUBC> SMeans C4000; SUBC> Brief 0; SUBC> Interact 'gender' 'fat'. MTB > GFInt 'gender' 'fat'; SUBC> Responses 'consum'; SUBC> FMeans C4000. Interaction Plot for consum MTB > Erase C4000. MTB > PPlot 'SRES1'; SUBC> Normal; SUBC> Symbol; SUBC> FitD; SUBC> Grid 2; SUBC> Grid 1; SUBC> MGrid 1. Probability Plot of SRES1 The P-value for the Anderson-Darling test for normality is 0.775. Comments: --------- The analysis shows a clearly nonsignificant interaction (F=0.63), an also nonsignificant main effect of gender (F=2.59,P=0.15), and a strongly significant effect of fat type (F=42.0,P<0.001). The residuals look quite good, there is no sign of heteroscedasticity, and the normal plot is reasonably straight for only 12 observations (and the P-value for the normality test is large). None of the residuals are getting close to critical. Thus, there may be slight indication of larger consumption for males than females, but it is far from significant. There is clear evidence of different consumption of rancid and fresh fat, we give 95% confidence intervals: fresh: 669.2 +- 2.306*15.59 = 669.2 +- 36.0 rancid: 526.3 +- 2.306*15.59 = 526.3 +- 36.0 (the value 2.306 is the 97.5 percentile of the t(8) distribution)