NYU Regression Method Worksheet
Description
#HW08
#You will be using the Boston housing data to generate model selection procedures
#execute the following code to obtain the variables to be used in model selection procedures
library(MASS) #Boston housing data is available in the MASS package
library(olsrr)
HW08=Boston[c(1,5,6:8,11:14)]
head(HW08)
attach(HW08)
help(Boston) #provides a description of the Boston data set used in HW08
#use the HW08 data set to complete the following analyses.
#a. perform best subsets regression using medv as the response and
#the remaining 8 variables as predictors
#b. perform an all possible regressions
#comment on the model you would choose with a 1-sentence justification
#c. perform forward, backward, and bi-directional stepwise regressions
# use the default p-to-enter, p-to-remove values
#compare the three models selected. One or two sentences are sufficient.
#d. perform a 5-fold Cross-Validation comparing model 6 with model 7 from the best subset regression models
# Based on the CV-metrics that are reported by R, which model do you prefer?
# Provide a one-sentence justification for your response.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."