| mode_choice | R Documentation |
Stated choices of intercity travel mode for 210 travellers, each choosing among the same four modes: air, train, bus and car. This is the classic Greene & Hensher (1997) data set, reshaped into choicer's long layout (one row per traveller-by-alternative). It is a convenient, recognizable example for multinomial and nested logit models and the demand/welfare toolkit (elasticities, diversion ratios, willingness-to-pay, counterfactuals).
mode_choice
A data frame with 840 rows (210 travellers x 4 modes) and 9 columns:
Integer traveller (choice situation) identifier, 1-210.
Factor giving the travel mode: "air", "train",
"bus" or "car". Use as the alternative column.
Integer indicator, 1 for the chosen mode and 0 otherwise. Exactly one mode is chosen per traveller.
Terminal waiting time in minutes (0 for car).
In-vehicle travel time in minutes.
In-vehicle cost component, in currency units.
Generalized cost measure, in currency units.
Household income (traveller level, in thousands).
Size of the travelling party (traveller level).
wait, travel, vcost and gcost vary across modes
within a traveller, while income and size are traveller-level
attributes that are constant across modes. A standard specification regresses
the choice on wait, travel and vcost with
alternative-specific constants; vcost then plays the role of price for
willingness-to-pay and consumer-surplus calculations.
The sample is choice-based: the survey over-sampled the less popular
modes (air, train, bus) and under-sampled car, so sample choice shares do
not estimate population mode shares. With a full set of
alternative-specific constants the slope coefficients remain consistently
estimated under this design (Manski and Lerman, 1977), and
willingness-to-pay ratios are unaffected; the constants, and any shares,
elasticities or surplus levels computed from fitted probabilities, inherit
the sampling design. To target population quantities, attach WESML weights
with wesml_weights using external population shares; see
vignette("wesml", package = "choicer").
Greene, W. H. and Hensher, D. A. (1997). Reshaped from the TravelMode
data distributed with the AER package
(https://CRAN.R-project.org/package=AER). The same data appear in
Greene's Econometric Analysis and in several other choice-modelling
packages.
Manski, C. F. and Lerman, S. R. (1977). The estimation of choice probabilities from choice based samples. Econometrica, 45(8), 1977-1988.
data(mode_choice)
head(mode_choice)
table(mode_choice$mode[mode_choice$choice == 1L])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.