R.
standardized_wt standardized_disp 20.061042 -3.735770 -2.007111 After finding the OLS coefficients, we now try ridge regression using the glmnet library. #install.packages("glmnet") library(glmnet) set.seed(0125) x <- as.matrix(mtcars[, c("wt", "disp")]) y <- mtcars$mpg ridge_model <- glmnet(x, y,