Question: Please answer every parts and include the R code if possible Q2.Least Squares Estimation & Matrix Computation [28pts 10, 6, 6, 6] Suppose now our

Please answer every parts and include the R code if possible

Please answer every parts and include the R code if possible Q2.Least

Q2.Least Squares Estimation & Matrix Computation [28pts 10, 6, 6, 6] Suppose now our regression model only includes the slope term, 31, that is, =le, + ,-,Where ESENW, 0'2), t' = 1, 2. A. Find the least squares estimate of 1 (191) for such a model that minimize SSE. You need to clearly show all reasonable steps to receive full credits. [Hint] Try to minimize L = 231 sf as we did in class. B. Assume we collect 4 data points (xi, yi): (1,0), (1 ,,3) (2,6), (3,10). Now we want to formulize them with the above model (slope only mode1)' 1n the form of matrix computation. For example, y= X B + E. Clearly type down X and [1' as matrices in your R Markdown report. You should provide all the elements and the matrix dimensions forX and B. No need to provide 3! and" 8. [Note] I taught in my live sessions how to type a matrix in R MarkdownfLaTeX or you can google it. C. Find the value of the least squares estimate b1 by performing matrix computation: B (X' X) 1X'y. You are allowed to use R for the matrix computation or calculate it manually D. Please use lm( ) function' 1n R to nd the value of hi for the slope only model. Show the R codes and R output. Your answer should be exactly the same as the answer in part C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!