BaşlayınÜcretsiz başlayın

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.

Bu egzersiz, kursun bir parçasıdır

Generalized Linear Models in R

Kursa Göz Atın

Egzersiz talimatları

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

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

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

# Look at the summary of the output
___
Kodu Düzenle ve Çalıştır