讲解:ECO 321、regression model、R、RHaskell|R

ECO 321 Fall 2019Homework 4Due Nov 1 by 5pmPlease also cut and paste at the end of your submission the R code you have usedin problem 2 to show your work.1. Consider the regression modelYi = β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 Pni=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 isYi = β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 randomlyassigned to “large” and “small” classes, and given standardized tests at the end of theyear. Large classes contained approximately 24 students and small classes containedapproximately 15 stude代做ECO 321、代写regression model、Rnts. We collected a sample of 3rd graders who were involvedin this experiment to investigate the relationship between TestScore and Smallclassas outlined above. A detailed description of the variables contained in the file is givenin the pdf file star project desc.docx available on Blackboard. Also, a sample codefor 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 followingregression 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’stest score and it is potentially correlated with the class size. (For example,school might assign certain teacher to certain class). We thus now estimate thefollowing 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 changeusing your result from question 1, part (f).2转自:http://www.3daixie.com/contents/11/3444.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容