联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2019-10-27 02:49

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¯ − βˆ1X¯1 + βˆ2X¯2.

(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 teacher’s experience can also have an impact on the student’s

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).

2


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp