Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Full Model Ridge Regression Ridge Regression (Intercept) 116.3 119.3 158.5 Age 1.1 1.0 0.3 Asthma 0.7 0.5 0.4 CAD 17.0 16.9 10.0 CHF 8.0 8.6

Full ModelRidge RegressionRidge Regression
(Intercept)116.3119.3158.5
Age1.11.00.3
Asthma0.70.50.4
CAD17.016.910.0
CHF8.08.69.4
CKD19.519.812.8
COPD-5.4-4.04.5
Depression31.129.910.3
Diabetes11.010.96.9
ESRD31.129.311.3
Female-2.5-2.10.2
HIV70.768.223.2
Hyperlipidemia19.919.510.2
Hypertension-8.2-5.55.8
Injury-23.6-22.2-5.9
Obesity8.98.76.0
Substance_Abuse40.238.210.5
Wait_Time0.70.70.2
RMSE - Ridge Regression,
120.57

To compute the test error for the ridge.min model,

  1. compute the predicted values of the response by applying the ridge.min estimated above to the test_set

x=model.matrix(LOV~ .,data = test_set)[,-1] predicted=predict(ridge.min,newx=x)

  1. compare the observed values of the response in the test set, test_set$LOV, to the predicted values of the response obtained in step 1 (for reference below save the result as rmse_ridge.min)

rmse_ridge.min=round(rmse(test_set$LOV, predicted),2) knitr::kable(rmse_ridge.min, col.names =c("RMSE -- Ridge Regression, $\\lambda_{min}$"))

RMSE - Ridge Regression,
image text in transcribedimage text in transcribed

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

A First Course In Differential Equations With Modeling Applications

Authors: Dennis G Zill

11th Edition

1337515574, 9781337515573

More Books

Students also viewed these Mathematics questions