Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. The body fat percentage of a sample of n = 252 men was measured, along with other anatom- ical covariates. These data are contained
1. The body fat percentage of a sample of n = 252 men was measured, along with other anatom- ical covariates. These data are contained in the data frame fat from the faraway package. he variable siri is a measurement of body fat percentage using Siri's equation. In this problem, you will use siri as a response variable and all other variables, with the exception of brozek and density, as predictors in a linear model. (a) Load the faraway package and take a look at the data description by typing ?fat into the R console. Do you suspect that some regularization may be helpful in fitting this linear model? Explain (b) Use the code below to divide your data into two sets - a training set fatTrain used to fit the model and a testing set fatTest. set. Seed (123) # ensures that everyone uses the same data split # will give you a testing data set of 25 men, training set of 227 test.ind
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