Question: In this exercise, you will use the cross-validation methods to assess the linear regression models on the Auto data set. (a) Fit a simple linear
In this exercise, you will use the cross-validation methods to assess the linear regression models on the Auto data set. (a) Fit a simple linear regression model to predict mpg from horsepower. Give the LOOCV es- timate for the test error of this model. Note: you may use the cv.glm() function instead of writing a for loop as you did in the previous problem. Remember that this function is available in the boot package
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
