写作ECO 321作业  辅导regression model作业

” ECO 321 Fall 2019
Homework 4
Due Nov 1 by 5pm
Please also cut and paste at the end of your submission the R code you have used
in problem 2 to show your work.
1. Consider the regression model
Yi = 1X1i + 2X2i + Ui,
for i = 1, . . . , n (notice that there is no intercept in the regression).
(a) Specify the least squares function that is minimized by OLS.
(b) Compute the derivatives of the objective function with respect to 1 and 2.
(c) Suppose that Pni=1 X1iX2i = 0.
(d) Suppose that Pn
i=1 X1iX2i 6= 0. Derive an expression for
1 as a function of the data. (Yi, X1i, X2i)ni=1.
(e) Suppose that the model includes an intercept. That is
Yi = 0 + 1X1i + 2X2i + Ui.
Show that the least-squares estimators satisfies 0 = Y 1X1 + 2X2.
(f) As in (e), suppose that the model contains an intercept.
How does this compare to the OLS estimator of 1 from the regression that omits X2?
2. In the 1980s, Tennessee conducted an experiment in which students were randomly
assigned to large and small classes, and given standardized tests at the end of the
year. Large classes contained approximately 24 students and small classes contained
approximately 15 students. We collected a sample of 3rd graders who were involved
in this experiment to investigate the relationship between TestScore and Smallclass
as outlined above. A detailed description of the variables contained in the file is given
in the pdf file star project desc.docx available on Blackboard. Also, a sample code
for fitting and testing a linear regression model in R is available on Blackboard.
(a) Suppose that all assumptions for OLS are satisfied and estimate the following
regression model:
T estScorei = 0 + 1SmallClassi + ui
, i = 1, . . . , n.
Report the value of
1, and of its heteroskedasticity robust standard error.
(b) We conjecture that teachers experience can also have an impact on the students
test score and it is potentially correlated with the class size. (For example,
school might assign certain teacher to certain class). We thus now estimate the
following model,
T estScorei = 0 + 1SmallClassi + 2T eachExpi + ui
, i = 1, . . . , n.
Report the value of
1, and of its heteroskedasticity robust standard error.
(c) How has your estimator of 1 changed compared to (a)? Explain the change
using your result from question 1, part (f).

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导