Question: You will use College data set for the Assignment. The data is available in iCollege Assignment page. Description of College data set available at ISLR
You will use College data set for the Assignment. The data is available in iCollege Assignment page.
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:
- Split the data set randomly into training and test data set.
- Fit Lasso model using glmnet() function on the training data set.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
