Extracting and interpreting odds-ratios
You looked at the bus data in this chapter and in chapter 2.
During this exercise, you are going to extract out the odds-ratio ratio from a model that predicts the chance of riding the bus based upon number of commuting days.
The resulting odds-ratio (indicated by the CommuteDays
term) will give you the change in odds for each extra day a person commutes. For example, an odds-ratio of 1.5 would mean each extra-day a person commutes per week, the odds increase 50% (1.5 - 1.0 = 0.5 = 50%) they will ride the bus.
A logistic regression, bus_out
has been fit for you.
Diese Übung ist Teil des Kurses
Generalized Linear Models in R
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Extract out the coefficients
coef_out <- ___
# Convert the coefficients to odds-ratios
___