Homework 5 (4 Points), due at the beginning of class on October 12

advertisement
Homework 5 (4 Points), due at the beginning of class on October
12, 2016
• Q2 (2 point) please prove
M2 M = M
on page 17 of the lecture note (Hint, first prove P2 P = P2 ), and
β̂1 = β1 + (X′1 M2 X1 )−1 (X′1 M2 U)
E((β̂1 − β1 )(β̂1 − β1 )′ |X) = σ 2 (X′1 M2 X1 )−1
on page 20. (Hint: look at page 8 of the lecture note)
• Q3 (1 point) Please use House data posted on my webpage, and consider the simple
regression
baths = β0 + β1 age + u.
However, I ask you to apply the FW theorem to obtain β̂1 . You need to construct
M2 ≡ I − X2 (X′2 X2 )−1 X′2 explicitly, and interpret M2 X1 . Hint: in this case, X1 is age,
and X2 is the intercept term, a variable that is equal to one for all observations. The
stata commands may be
sca n = 321
gen c = 1
mkmat c, matrix(x2)
matrix mx2 = I(n) - x2*invsym(x2’*x2)*x2’
• Q3 (1 point) Please use House data and use command reg to report the regression
baths = β0 + β1 age + β2 age2 + β3 log(area) + u.
Now consider the null hypothesis
H0 : β1 = 0, β2 = 0.
Interpret this null hypothesis. Construct R and c (in the codes file it is r) explicitly,
and use matrix algebra to find the Wald test and F test. Do not use test command!
(Hint: After running the regression, the β̂ and σ 2 (X′ X)−1 can be extracted by
1
matrix betahat = e(b)’
matrix v = e(V)
2
Download