Session Ready
Exercise

Fitting a multiple logistic regression

In the video, you learned about fitting a regression with two different predictor variables. In this exercise, you'll get to build the model we talked about. The distance a commuter rides might be important in determining if they are more likely to to ride the bus. Similarly, the number of days a commuter goes to work might be important in determining if they are more likely to ride the bus. Using this model, we will examine how this variables may be used to predict the chance a commuter rides the bus.

Instructions
100 XP
  • Build a logistic regression using the bus data frame. Save the output as bus_both.
  • Predict if someone rides the Bus based upon both CommuteDays and MilesOneWay. Make sure you use the variables in this order in the formula..
  • Use summary() on bus_both.