Midterm Stat 505 Fall 2013 October 19, 2013 Name: 100 pts total We’ll use the linear model: y = Xβ + with ∼ (0, σ 2 V ) unless otherwise noted below. 80 weight A study was done to determine the effect of two different diets on weight gain of pigs. A group of 48 freshly weaned pigs was selected at random from young pigs available at a large hog farm. They were randomly assigned to one of two rations which they are fed throughout the study. Each pig was weighed at 1, 2, . . . , 9 weeks and results are shown in Kg. Researchers want to know if one ration increases gain over the other. diet 60 Ration1 Ration2 40 20 2.5 5.0 7.5 week 1. Use this model for the kth row: yk = µ + τk[j] + βk[j] xk + k where k[j] = 1 if the pig in row k is fed ration 1, and is 2 if this pig is eating ration 2. To see if growth rates differ, researchers are interested in β1 − β2 . See the Appendix for part of the X matrix with row numbers and columns labeled with the associated components of β. (a) Find a linear combination of rows of y which has expectation β1 . I want to see E(aym + byn ) = β1 , you only have to pick a, b, m, n. (6 pts) (b) Find a linear combination of rows of y which has expectation β2 . (6 pts) (c) Find a linear combination of rows of y which has expectation β1 − β2 . (6 pts) (d) Is β1 − β2 estimable? Explain. (8 pts) Stat 505 Midterm F12 Page 2 2. Now add a random adjustment for each pig: y i = X i β + bi 1 + i , i = 1, . . . , 48 and assume i ∼ N (0, σ 2 I). Write out a normal distribution for the bi ’s. (6 pts) Does adding the random adjustment change the expectations used just above? Explain. (6 pts) 3. What is now the distribution of y i ? (In general, do not assume bi is known.) (6 pts) 4. When we stack up the response vectors for all 48 pigs into one big vector y of size 48 × 9, what is the variance-covariance of y? (6 pts) Stat 505 Midterm F12 Page 3 5. Label the variance covariance from part 4 as V and pretend that we know V up to a constant. Explain how to obtain the BLUE of β1 −β2 . Include a one sentence justification to explain why it is optimal. (12 pts) 6. Of course that wasn’t the whole story. What conclusions do you draw from the three diagnostic plots and the Box-Cox plot below? (12 pts) Box−Cox Plot Scale−Location 30 40 50 60 Fitted values 70 −2 0.0 −1 0 1 Theoretical Quantiles 2 3 30 40 50 60 Fitted values −220 ● 70 −225 ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●● ● ●● ● ●● ●● ● ●● ● ● ●● ● ●● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ●●●● ● ●● ● ● ● ●●●● ● ● ● ● 95% ● ● ●● −230 1.5 1.0 0.5 Standardized residuals ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● 369 ● 266 −3 ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 135369 ● ● log−Likelihood 3 2 ● ● ●● ● −3 ● 1 ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ●● ● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ●●●● ● ● ● ●● ● ●●●●●● ● ●● ●● ●● ● ●●●● ● ●● ● ● ●● ● ● ●●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● 369 ● ● 266 ● ● ● 0 ● 135 ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −1 ● ● ● ●●● ● Standardized residuals ● 135 ● ● −2 0 ● ● ● −10 −5 ● ● −15 Residuals 5 10 ● 266 −235 Normal Q−Q −240 Residuals vs Fitted −0.4 −0.2 0.0 λ 0.2 0.4 Stat 505 Midterm F12 Page 4 7. The estimated BLUE of β2 − β1 is shown in the appendix. Write out your conclusion about the ration effects. (12 pts) 8. What is the scope of inference? (12 pts) Appendix row 1 2 3 4 5 6 7 8 9 217 218 219 220 221 222 223 224 225 µ 1 1 1 1 1 1 1 1 1 .. . 1 1 1 1 1 1 1 1 1 .. . τ1 1 1 1 1 1 1 1 1 1 τ2 0 0 0 0 0 0 0 0 0 β1 1 2 3 4 5 6 7 8 9 β2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 Linear mixed-effects model fit by REML Data: myPigs AIC BIC logLik 1874 1902 -930 Random effects: Formula: ~1 | pigid (Intercept) Residual StdDev: 3.23 0.676 Variance function: Structure: Power of variance covariate Formula: ~fitted(.) Parameter estimates: power 0.24 Fixed effects: weight ~ diet * week Value Std.Error DF t-value p-value (Intercept) 19.47 0.698 382 27.9 0.000 dietRation2 -0.22 0.988 46 -0.2 0.824 week 5.77 0.044 382 130.7 0.000 dietRation2:week 0.87 0.063 382 13.9 0.000 Correlation: (Intr) dtRtn2 week dietRation2 -0.707 week -0.290 0.205 dietRation2:week 0.203 -0.291 -0.701 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -3.4321 -0.5483 0.0379 0.6426 3.4741 Number of Observations: 432 Number of Groups: 48