เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Building two models

In chapter 2, you built a model to examine if the number of commute days impacted chance of riding the bus. In chapter 3, you visualized if the distance a commuter traveled impacted the chance of riding the bus. During this exercise, you will build both of these logistic regressions using the glm() function with the binomial family. The bus data frame has been loaded for you.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Generalized Linear Models in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Build a logistic regression where Bus is predicted by CommuteDays and save it as bus_days.
  • Build a logistic regression where Bus is predicted by MilesOneWay and save it as bus_miles.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Build a logistic regression with Bus predicted by CommuteDays
___

# Build a logistic regression with Bus predicted by MilesOneWay
___
แก้ไขและรันโค้ด