To perform a stepwise multiple linear regression analysis download datafile "Bodymeasures.txt", then recode variable Sex[M,F] into Sex_num[0,1] and make sure the variable is treated as numeric. You can then create a linear regression model with the variables you want, and display it
Load library MASS (which is likely already pre-installed on your system), perform stepwise model selection by exact AIC, and display the results
|