Title: To Implement Logistic Regression in R
Title: To Implement Logistic Regression in R
Example Problem
For this analysis, we will use the mt cars dataset that comes with R by default. mtcars is
a standard built-in dataset. Here we need to predict the type of engine if weight and
displacement is given
b. Develop the model on the training data and use it to predict the type of
engine on test data.
myModel <- glm(am ~ wt+disp, data = train, family="binomial")
summary(myModel)