TravelMode {AER} | R Documentation |
Data on travel mode choice for travel between Sydney and Melbourne, Australia.
data("TravelMode")
A data frame containing 840 observations on 4 modes for 210 individuals.
1
to 200
."car"
, "air"
, "train"
, or "bus"
."no"
and "yes"
.Online complements to Greene (2003).
http://pages.stern.nyu.edu/~wgreene/Text/tables/tablelist5.htm
Greene, W.H. (2003). Econometric Analysis, 5th edition. Upper Saddle River, NJ: Prentice Hall.
data("TravelMode") ## overall proportions for chosen mode with(TravelMode, prop.table(table(mode[choice == "yes"]))) ## travel vs. waiting time for different travel modes library("lattice") xyplot(travel ~ wait | mode, data = TravelMode) ## Greene (2003), Table 21.11, conditional logit model library("mlogit") TravelMode$choice2 <- TravelMode$choice == "yes" TravelMode$incair <- with(TravelMode, income * (mode == "air")) tm_cl <- mlogit(choice2 ~ gcost + wait + incair, data = TravelMode, shape = "long", choice = "choice", alt.var = "mode", reflevel = "car") summary(tm_cl)