Question
Use the heart data set for this question. Make sure to use R or R-studio for this question. You can find the data in the
Use the heart data set for this question. Make sure to use R or R-studio for this question. You can find the data in the below link. Besides answers and steps, PLEASE also prepare the R file for R script (you can add screenshot of R script. Thanks!)
data link:
https://raw.githubusercontent.com/tofighi/MachineLearning/master/datasets/heart.csv
The heart data set consists of a retrospective sample of males in a heart-disease high-risk region of the Western Cape, South Africa. Use sbp (symbolic blood pressure) as response variable and obesity as predictor. (a) Fit a polynomial regression for the heart data set, use cross validation to find the best polynomial model (b) Fit a cubic spline with three knots, the knots are chosen uniformly. (c) Fit a natural spline with same knots. (d) Fit a smooth spline model with degrees of freedom to be determined by cross validation. (e) Fit a kernel regression model with Gaussian kernel. (f) Which of the above models provides the best prediction performance? Please describe what validation method you used.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started