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
讲解:ECO 321、regression model、R、RHaskell|R
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- The Inner Game of Tennis W Timothy Gallwey Jonathan Cape ...