Question: In this exercise we will predict the number of applications received using the other variables in the College data set. Please use R code for

In this exercise we will predict the number of applications received using the other variables in the College data set.

Please use R code for answers!

a. split the data set into training set and test set

b. use 5-fold cross-validation using the entire data set to estimate the test error in in addition to the test setapproach.

c. Fit a ridge regression model on the training set, with lambda chosen by cross-validation. Report the test error obtained

d. Fit a lasso model on the training set, with lambda chosen by cross-validation. Report the test error obtained, along with the number of non-zero coefficients obtained.

e.Fit a PCR model on the training set, with M chosen by cross-validation. Report the test error obtained, along with the value of M selected by cross-validation.

f. Fit a PLS model on the training set, with M chosen by cross-validation.Report the test error obtained, along with the value of M selected by cross-validation.

g. Comment on the result obtained. How accurately can we predict the number of colleges applications received? Is there much of difference among the test errors resulting from these five appproaches?

In order to get the College data set you must do the following in the RStudio

require(ISLR)

require(caret)

data('College')

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!