Question
For this assignment, you will continue analyzing the College data frame in the ISLR package, which contains 18 features for 777 U.S. colleges from the
For this assignment, you will continue analyzing the College data frame in the ISLR package, which contains 18 features for 777 U.S. colleges from the 1995 issue of U.S. News and World Report. The goal of this assignment is to become more familiar with cross-validation, feature selection, and regularization. All analyses must be performed in R using leaps, glmnet, and other packages discussed in class. Provide your answers and all code used to obtain them under the respective questions in this Word document, and then save it as a pdf and upload it to Canvas.
2) Next, we will use ridge regression to perform regularization and construct a model for predicting a colleges out-of-state tuition from the other variables in College. Before performing this analysis, set the seed to 1, and then randomly split the data into training and test datasets. a. [15 points] What value of yields the smallest CV(10) for ridge regression? Remember to set the seed to 1 again before performing this analysis. b. [10 points] Compute the test MSE for ridge regression with the value of from question 2a. c. [5 points] Use your answer from question 2b to estimate the average difference in dollars between observed and predicted out-of-state tuition. d. [5 points] Are any of the features removed from the model? If so, which ones? If not, why do you think all features are included in the model?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started