Answered You can hire a professional tutor to get the answer.

QUESTION

I have several functions to complete on a data set in R 1. Load the dataset mtcars.xlsx- completed. Preview the document into memory and convert...

I have several functions to complete on a data set in R

1. Load the dataset mtcars.xlsx- completed.

Preview the document into 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?

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question