Question: Data source: Henderson and Velleman (1981), Building multiple regression models interactively. Biometrics, 37, 391-411. You are asked to perform the following tasks by writing a

Data source: Henderson and Velleman (1981), Building multiple regression models interactively. Biometrics, 37, 391-411. You are asked to perform the following tasks by writing a script in R. Submit both your R codes and a Word document. 1. Load the dataset mtcars.xlsx Download mtcars.xlsxinto memory and convert column am to a factor using factor() function. 2. Split the data into training set and test set. The training set contains the first 35 observations, the test set containing the remaining observations. 3. Build a logistic regression model with the response is am and the predictors are mpg, cyl, hp, and wt using glm() function 4. Compute the test error on the test data set using a confusion matrix. Is it a good model based on test error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!