Question: Exercise 3. For this exercise use the Boston data set from the MASS package (you can read about this data set in the help menu).

Exercise 3. For this exercise use the Boston data set from the MASS package (you can read about this data set in the help menu). Consider the multiple linear regression model with medv as the response, and dis, rm, tax and chas as predictor variables.

(a) In R, compute the vector of least squares estimates = (X'X) ^-1X'Y . Then verify that the results are the same as the parameter estimates provided by the lm() function.

(b) In R, compute the variance-covariance matrix Var() = 2 (X'X)^-1 (plug in ^2 = RSS/(n p 1) as the estimate for ^2 ). Then verify that the square root of the diagonal entries of this matrix are the same as the standard errors provided by the lm() function

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!