Chapter 6 exercises

2 (a, b), 3, 4, 6, challenge: 5

Applied

Using the glmnet package, construct a ridge regression and LASSO model to predict violent crime in the training data set. A description for how to use this package can be found in your book on page 251 and 255.

  1. How many variables were selected by the LASSO?
  2. What are the training MSEs for ridge and LASSO using the optimal value of \(\lambda\)?
  3. If the MSEs differed, why do you think one is higher than the other in this setting?