Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help please. In this homework we will consider the problem of measuring body fat to practice model selection and obtain predictive models. In order to
help please.
In this homework we will consider the problem of measuring body fat to practice model selection and obtain predictive models. In order to accurately measure body fat typically a measure of body density is used to estimate the proportion of fat in the body using the Brozek or Siri equations. However determining the body density in terms of weight and volume can be difficult. To avoid this problem, a method that is able to estimate body fat using indirect measures (that are easy to obtain) is desired. To this end, researchers recorded age, weight, height and 10 body circumference measurements for 252 men. For each subject, an accurate estimate of body density was obtained using and underwater submersion method and the body fat was determined using the Brozek and Siri equations. The dataset with all these measurements is available in the file "fat.csv" 1. Read the data set in R and name it fat. Print the first 10 observations using the function head() (you can use the command help(head) to learn how to modify the number of observations printed in the output). The first two columns correspond to the values for the Brozek and Siri equations obtained using the measurement of density in the third column. All other columns are potential predictors for this problem. (a) Use the command dim(data) to learn the dimensions of your data: The first value us the number of rows (number of observations) and the second value is the number of columns (number of variables including responses and predictors). (b) We will split the data in a training set and a testing set to further assess the performance of the models we will fit. To this end, we will remove every tenth observations by running the code below n 125.5 1.0051 54 YETU Y916 CE ET FC TER SY IS 16 * VE EYES ATTY vs CSESZTES 10 Y II SE 15 CART WE Y TOWE ELE SU SE POTE SEE SEE SPIT THE SPICE su o e os HTC SE SEIS T o VE VENTE C 5299 SEE Ve Cetro 599 SE SE S NT 31 11.5 . 66 CO 02.7 52.7 37.5 2 2.1 2.13.5 LS 53 22.5 27.9 26.2173 1346 10.8795 3.6 1.065 20 15 7125 206 30. 1.01 46 133.5 675 206 1135 136 13737 141.3 3.7 1.6 LS 13. 1.067164.25 7.25 213 CHF 2* VERY TL It is SE SI SE SE SET 2 75 to 9 91 90 SI 12 CH W X6 11 tatt titt vet * Y CESTY S5 009 Cost CHE ttt 19 SEE 1 SC Scots 1 1 * 11 SOFRE COVE 3 1.600 30.5 22.25 5 512 13 141 1071 645 12 11.1 17 1164 S 1031 2. 1156 1101 712 433 2.3 2 1 110.4 2.1 117 172 L) 100% 1003 2 2 2 3 US $2 2 2 20 21.3 1.050241 2105 21 71.25 333 118 1019 17 18 L 16.25 7.25 222 11.2 1016 271273.75 33.5 59 CE So e CR 50 156 yet 6 st 1 st 9 SSC stoot th 69 VOTE 59 CE 5 TOTT st' Sot IN 5 SE TO Toot SHOCA 25 REFRESTE INSS HOT CRES FATO ES SE VCR 216 SCOT SET 59 SX TM WE Tot TE TOT TH Meret 529 S M L 2ST SEIT 12 ST ET CE YET 1 SS S 450 EX SV TESC 29 STES TEE 29 29 29 SST FEE St C TEST SCOTT 18 27 133.25 675 234 67.5 22 14 4.7 57.52 5.3 5.7 3.7 2.4 2.755 S SS 16.7 22.5 23 133 50 30 15) 224 222 22.5 2936.7 1063 64 606 3 3 15.2 1.066 28 2005 69.75 2026843 1114.3 * 1.0951 20 IN 15 1 100 24 M3 CLE 20.3 205 5 ve TOE TE 601 Stra YO SU SCHE Sort RECE SYS 6 01 Wow To 1 E SE two 10 12 SET *** 86 SO SO'N TO ve Scott 6 CE 579 10 Y SUS STT SOC SOTT SEEST W We cor 916 TO VSE ES SONY 6 TOE TEST 29 LOT * E LE OTEL So we 266 SEE SET ter 9 19 TH THE SEVEN SE GOT THE 10 tot 1 25 T20 5H TLE ESE MI SMOOT I 6 OG SO V 90 tot ze H 09 SS SS 000 e cu care DO COTT ve set tetto 10 vec ** STEL SCOOT C'ESC ES ste statt C1 C2 C3 C E 1973 A 100609 1723 35 101.5 33.6 17 2.1.6 7.5 11.7 1.0722 > 1925 735 25.5 12 12 723 23.6 69.75 252 19 207 1.6082 35 75 256 22. 2 90.7 57 218 219 2 In this homework we will consider the problem of measuring body fat to practice model selection and obtain predictive models. In order to accurately measure body fat typically a measure of body density is used to estimate the proportion of fat in the body using the Brozek or Siri equations. However determining the body density in terms of weight and volume can be difficult. To avoid this problem, a method that is able to estimate body fat using indirect measures (that are easy to obtain) is desired. To this end, researchers recorded age, weight, height and 10 body circumference measurements for 252 men. For each subject, an accurate estimate of body density was obtained using and underwater submersion method and the body fat was determined using the Brozek and Siri equations. The dataset with all these measurements is available in the file "fat.csv" 1. Read the data set in R and name it fat. Print the first 10 observations using the function head() (you can use the command help(head) to learn how to modify the number of observations printed in the output). The first two columns correspond to the values for the Brozek and Siri equations obtained using the measurement of density in the third column. All other columns are potential predictors for this problem. (a) Use the command dim(data) to learn the dimensions of your data: The first value us the number of rows (number of observations) and the second value is the number of columns (number of variables including responses and predictors). (b) We will split the data in a training set and a testing set to further assess the performance of the models we will fit. To this end, we will remove every tenth observations by running the code below n 125.5 1.0051 54 YETU Y916 CE ET FC TER SY IS 16 * VE EYES ATTY vs CSESZTES 10 Y II SE 15 CART WE Y TOWE ELE SU SE POTE SEE SEE SPIT THE SPICE su o e os HTC SE SEIS T o VE VENTE C 5299 SEE Ve Cetro 599 SE SE S NT 31 11.5 . 66 CO 02.7 52.7 37.5 2 2.1 2.13.5 LS 53 22.5 27.9 26.2173 1346 10.8795 3.6 1.065 20 15 7125 206 30. 1.01 46 133.5 675 206 1135 136 13737 141.3 3.7 1.6 LS 13. 1.067164.25 7.25 213 CHF 2* VERY TL It is SE SI SE SE SET 2 75 to 9 91 90 SI 12 CH W X6 11 tatt titt vet * Y CESTY S5 009 Cost CHE ttt 19 SEE 1 SC Scots 1 1 * 11 SOFRE COVE 3 1.600 30.5 22.25 5 512 13 141 1071 645 12 11.1 17 1164 S 1031 2. 1156 1101 712 433 2.3 2 1 110.4 2.1 117 172 L) 100% 1003 2 2 2 3 US $2 2 2 20 21.3 1.050241 2105 21 71.25 333 118 1019 17 18 L 16.25 7.25 222 11.2 1016 271273.75 33.5 59 CE So e CR 50 156 yet 6 st 1 st 9 SSC stoot th 69 VOTE 59 CE 5 TOTT st' Sot IN 5 SE TO Toot SHOCA 25 REFRESTE INSS HOT CRES FATO ES SE VCR 216 SCOT SET 59 SX TM WE Tot TE TOT TH Meret 529 S M L 2ST SEIT 12 ST ET CE YET 1 SS S 450 EX SV TESC 29 STES TEE 29 29 29 SST FEE St C TEST SCOTT 18 27 133.25 675 234 67.5 22 14 4.7 57.52 5.3 5.7 3.7 2.4 2.755 S SS 16.7 22.5 23 133 50 30 15) 224 222 22.5 2936.7 1063 64 606 3 3 15.2 1.066 28 2005 69.75 2026843 1114.3 * 1.0951 20 IN 15 1 100 24 M3 CLE 20.3 205 5 ve TOE TE 601 Stra YO SU SCHE Sort RECE SYS 6 01 Wow To 1 E SE two 10 12 SET *** 86 SO SO'N TO ve Scott 6 CE 579 10 Y SUS STT SOC SOTT SEEST W We cor 916 TO VSE ES SONY 6 TOE TEST 29 LOT * E LE OTEL So we 266 SEE SET ter 9 19 TH THE SEVEN SE GOT THE 10 tot 1 25 T20 5H TLE ESE MI SMOOT I 6 OG SO V 90 tot ze H 09 SS SS 000 e cu care DO COTT ve set tetto 10 vec ** STEL SCOOT C'ESC ES ste statt C1 C2 C3 C E 1973 A 100609 1723 35 101.5 33.6 17 2.1.6 7.5 11.7 1.0722 > 1925 735 25.5 12 12 723 23.6 69.75 252 19 207 1.6082 35 75 256 22. 2 90.7 57 218 219 2 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