ComenzarEmpieza gratis

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 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.

Este ejercicio forma parte del curso

Generalized Linear Models in R

Ver curso

Instrucciones del ejercicio

  • 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.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Build a logistic regression with Bus predicted by CommuteDays and MilesOneWay
___

# Look at the summary of the output
___
Editar y ejecutar código