Download Stat 511 Homework Solution - Equivalence of Hypotheses in Linear Regression and more Assignments Data Analysis & Statistical Methods in PDF only on Docsity! 1 Stat 511 HW#2 Spring 2009 1. In class Vardeman claimed that hypotheses of the form 0H : =Cβ 0 can be written as ( )0 0H : E C∈Y X for 0X a suitable matrix (and ( ) ( )0C C⊂X X ). Let’s investigate this notion in the context of Problem 10 of Homework 1. Consider 0 1 1 0 0 .5 .5 .5 .5 0 0 0 1 1 .5 .5 .5 .5 − − −⎛ ⎞ = ⎜ ⎟− − −⎝ ⎠ C and the hypothesis 0H : =Cβ 0 . a) Find a matrix A such that =C AX . b) Let 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ⎛ ⎞′ = ⎜ ⎟− − − −⎝ ⎠ X Argue that the hypothesis under consideration is equivalent to the hypothesis ( )0 0H : E C∈Y X . (Note: One clearly has ( ) ( )0C C⊂X X . To show that ( ) ( )0C C ⊥′⊂X A it suffices to show that 0′ =AP X 0 and you can use R to do this. Then the dimension of ( )0C X is clearly 2, i.e. ( )0rank 2=X . So ( )0C X is a subspace of ( ) ( )C C ⊥′X A∩ of dimension 2. But the dimension of ( ) ( )C C ⊥′X A∩ is itself ( ) ( )rank rank 4 2 2− = − =X C .) c) Interpret the null hypothesis under discussion here in Stat 500 language. 2. Suppose we are operating under the (common Gauss-Markov) assumptions that E =ε 0 and 2Var σ=ε I . a) Use fact 1. of Appendix 7.1 of the 2008 class outline to find ( ) ( )ˆ ˆE and Var− −Y Y Y Y . (Use the fact that ( )ˆ− = − XY Y I P Y .) Then write ˆ ˆ ⎛ ⎞ ⎛ ⎞ =⎜ ⎟ ⎜ ⎟⎜ ⎟ −− ⎝ ⎠⎝ ⎠ X X PY Y I PY Y and use fact 1 of Appendix 7.1 to argue that every entry of ˆ−Y Y is uncorrelated with every entry of Ŷ . b) Theorem 5.2.a of Rencher and Schaalje or Theorem 1.3.2 of Christensen say that if E =Y μ and Var =Y Σ and A is a symmetric matrix of constants, then ( )E tr′ ′= +Y AY AΣ μAμ Use this fact and argue carefully that 2 ( ) ( ) ( )( )2ˆ ˆE ranknσ′− − = −Y Y Y Y X 3. a) In the context of Problem 3 of HW 1 and the fake data vector used in Problem 4 of HW 1, use R and generalized least squares to find appropriate estimates for 1 1 0 0 0 1 0 1 0 0 E and 0 0 0 1 1 1 .25 .25 .25 .25 ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥− ⎢ ⎥ ⎣ ⎦ Y β in the Aitken models with ( )1 2 1 1 0 0 0 0 0 1 4 0 0 0 0 0 0 0 4 1 0 0 0 first diag 1,4,4,1,1,1,4 and then 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 4 ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥− ⎢ ⎥= = −⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ V V (Do the necessary matrix calculations in R.) b) For both of the above covariance structures, compare the (Aitken model) covariance matrices for generalized least squares estimators to (Aitken model) covariance matrices for the OLS estimators of EY and the Cβ above. 4. a) The basic lm function in R allows one to automatically do weighted least squares, i.e. minimize ( )2ˆi i iw y y−∑ for positive weights iw . For the 1V case of the Aitken model of Problem 3, find the BLUEs of the 4 cell means using lm and an appropriate vector of weights. (Type > help(lm) in R in order to get help with the syntax.) b) The lm.gls() function in the R contributed package MASS allows one to do generalized least squares as described in class. For the 2V case of the Aitken model of Problem 3, find the BLUEs of the 4 cell means using lm.gls. (After loading the MASS package, Type > help(lm.gls) in order to get help with the syntax.) 5. In the context of Problems 3 and 4 of HW #1, use R matrix calculations to do the following in the (non-full-rank) Gauss-Markov normal linear model. a) Find 90% two-sided confidence limits for σ . b) Find 90% two-sided confidence limits for ( )1 2 3 4 1 4 μ τ τ τ τ+ + + + . c) Find 90% two-sided confidence limits for 1 2τ τ− .