Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 College data set is available in ISLR Library. Load the College data in the R environment by loading the ISLR library. Description of

Part 1

College data set is available in ISLR Library. Load the College data in the R environment by loading the ISLR library.

Description of College data set available at ISLR Library:

Statistics for a large number of US Colleges from the 1995 issue of US News and World Report.

A data frame with 777 observations on the following 18 variables.

  • Private A factor with levels No and Yes indicating private or public university
  • Apps Number of applications received
  • Accept Number of applications accepted
  • Enroll Number of new students enrolled
  • Top10perc Pct. new students from top 10% of H.S. class
  • Top25perc Pct. new students from top 25% of H.S. class
  • F.Undergrad Number of fulltime undergraduates
  • P.Undergrad Number of parttime undergraduates
  • Outstate Out-of-state tuition
  • Room.Board Room and board costs
  • Books Estimated book costs
  • Personal Estimated personal spending
  • PhD Pct. of faculty with Ph.D.s
  • Terminal Pct. of faculty with terminal degree
  • S.F.Ratio Student/faculty ratio
  • perc.alumni Pct. alumni who donate
  • Expend Instructional expenditure per student
  • Grad.Rate Graduation rate

We will predict the number of applications received Apps using all other variables in the College data set and apply LASSO and Tree regression models and compare their performance (test MSE).

Part 1

LASSO

Predict the number of applications received Apps using all other variables in the College data set using LASSO model for variable selection:

  1. Split the data set randomly into training and test data set.
  2. Fit Lasso model using glmnet() function on the training data set.
  3. Perform cross-validation on the training data set to choose the best lambda.
  4. Estimate the predicted values using the best lambda obtained in part (c) on the test data (using the predict() function) and compute test MSE.
  5. Compare the Lasso predicted test MSE with the null model (lambda=infinity) test MSE and least square regression model (lambda=0) test MSE.
  6. Now construct the Lasso model for the entire data set and obtain the Lasso coefficients using the best lambda obtained in part (c) and report the number of non-zero coefficient estimates.
  7. Now use the Lasso predictors obtained in part (f) to fit the Linear Regression Model and report the summary of the linear model.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Financial Management

Authors: Brigham, Daves

10th Edition

978-1439051764, 1111783659, 9780324594690, 1439051763, 9781111783655, 324594690, 978-1111021573

More Books

Students also viewed these Finance questions

Question

4-42. Thank you in advance for your co-operation on this matter.

Answered: 1 week ago