Nested and mixed logit¶
In the app: Help → Help contents, Nested and mixed logit.
The conditional logit assumes the independence of irrelevant alternatives: the odds between two alternatives do not depend on the others, so a new alternative draws from every other in proportion to its share. Two models relax it, for the same long data (one row per case and alternative).
The nested logit groups alternatives in nests (bus and train in "public") whose unobserved utilities are correlated: IIA holds within a nest, not across nests. Each nest has a dissimilarity (log-sum) parameter lambda. pymetrix writes the model in McFadden's form consistent with random utility maximisation (Hensher and Greene's "RU2": utilities divided by their nest's lambda inside the nest's inclusive value). With every lambda 1 it is the conditional logit exactly; between 0 and 1 it is consistent with utility maximisation; near 0 the nest's alternatives are near-perfect substitutes; above 1 is a warning sign. A nest of one alternative has no lambda (it cancels), so it is fixed at 1; lambdas can be constrained equal. Estimation is full-information maximum likelihood, and the likelihood-ratio test of every lambda = 1 against the conditional logit is a test of IIA.
The mixed (random-parameters) logit lets coefficients vary across decision makers, normal or lognormal (positive: enter the negative of a price), uncorrelated or correlated; with repeated choices by one decision maker (a panel), their choices share one draw of the coefficients. Its probabilities are integrals over the coefficients' distribution, simulated with Halton draws (deterministic), pseudo-random ones, or scrambled Halton or Sobol sequences (quasi-random, scrambled from the seed), and the simulated likelihood is maximised. Too few draws bias the estimates: estimate again with more and compare. Each decision maker's conditional mean of a coefficient, given their choices, describes where they lie in the distribution.
Marginal effects (fit.marginal_effects()): derivatives and elasticities of each alternative's probability in each attribute of each alternative and each characteristic of the case, with delta-method standard errors, as after the conditional logit; unlike there, a column's cross elasticities differ. Discrete changes as after the conditional logit (dummy=, changes=), and effects at chosen values with choice_margins; the mixed logit's are simulated with the draws of the fit.
Predictions (fit.predict(data)): the probabilities of each alternative for new choice data with the same attributes and alternatives among the fit's. The mixed logit makes its draws as the fit did (so the estimation data give the fitted probabilities back), or new pseudo-random ones from a seed.
See also¶
References¶
- McFadden, D. (1978). Modelling the choice of residential location. In A. Karlqvist, L. Lundqvist, F. Snickars and J. W. Weibull (eds.), Spatial Interaction Theory and Planning Models, 75-96. Amsterdam: North-Holland. (search)
- Hensher, D. A. and Greene, W. H. (2002). Specification and estimation of the nested logit model: alternative normalisations. Transportation Research Part B: Methodological 36(1), 1-17. (search)
- McFadden, D. and Train, K. (2000). Mixed MNL models for discrete response. Journal of Applied Econometrics 15(5), 447-470. (search)
- Train, K. E. (2009). Discrete Choice Methods with Simulation, 2nd ed., chapters 4 ("GEV"), 6 ("Mixed logit"), 9 ("Drawing from densities"), 10 ("Simulation-assisted estimation") and 11 ("Individual-level parameters"). Cambridge University Press. (search)