4. For this question, you are welcome to use STATA or some other matrix calculat
ID: 3328187 • Letter: 4
Question
4. For this question, you are welcome to use STATA or some other matrix calculator (e.g., http://www.bluebit.gr/matrix-calculator/). More specifically, please use matrix commands but not pre-programmed procedures in STATA. Try to show as much as your work as possible, but try to make it easy on yourself by cutting and pasting from your program output. For conceptual purposes, suppose you have a simple model and a very small sample of data 3 y-81 and X=11 5 3 1 4 6 (a) Find the following matrices or vectors: (i) X'X, (ii) (X'x)-1, (iii) X'y, and (iv) the LS estimate, b - 2 3 (b) Find total sum of squares (SST), regression sum of squares (SSR), error sum of squares (SSE), and (c) Test the joint significance ofX2 and x3. That is, test Ho: 2 = 3 = 0. (d) Test the significance of. 3 alone. That is, test Ho: ,-0. (e) (i) Use an F test to test the hypotheses that the coefficients onx2 and.x; are equal in magnitude, but opposite in sign. That is, test Ho: 2+ 3-0. (ii) Now, use a t-test to test the same hypothesis.Explanation / Answer
a)
X'*X
ans =
5 15 25
15 55 81
25 81 129
inv(X'*X)
ans =
26.7000 4.5000 -8.0000
4.5000 1.0000 -1.5000
-8.0000 -1.5000 2.5000
X'*Y
ans =
20
76
109
inv(X'*X)*X'*Y
ans =
4.0000
2.5000
-1.5000
b) SSE = 1.5
(Y - X*b)' * (Y - X*b)
ans =
1.5000
SST = 28
SSR = 26.5
c)
here = 2
F = (SSR/k)/(SSE/(n-k-1) = 17.6666
df1 = 2 , df2 = 2 , critical value = 19
since TS< critical value
the model is not significant at alpha = 0.05
d) p-value for b2 = 0.3876 > 0.05
b2 is not significant
SUMMARY OUTPUT Regression Statistics Multiple R 0.972845605 R Square 0.946428571 Adjusted R Square 0.892857143 Standard Error 0.866025404 Observations 5 ANOVA df SS MS F Significance F Regression 2 26.5 13.25 17.66666667 0.053571429 Residual 2 1.5 0.75 Total 4 28 Coefficients Standard Error t Stat P-value Lower 95% Intercept 4 4.474930167 0.893868698 0.465715983 -15.2540705 x1 2.5 0.866025404 2.886751346 0.10197349 -1.226206568 x2 -1.5 1.369306394 -1.095445115 0.387627564 -7.391649893Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.