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

Comparing variable order

The order of predictor variables can be important, especially if predictors are correlated. This is because changing the order of correlated predictor variables can change the estimates for the regression coefficients. The name for this problem is Multicollinearity.

During this exercise, you will build two different multiple regressions with the bus data in order to compare the importance of model inputs order. First, examine the correlation between CommuteDays and MilesOneWay. Second, build two logistic regressions using the bus data frame where Bus is predicted by CommuteDays and MilesOneWay in separate orders.

After you build the two models, look at each model's summary() to see the outputs.

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

Generalized Linear Models in R

ดูคอร์ส

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

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

# Run a correlation
___(bus$___, bus$___)
แก้ไขและรันโค้ด