Mixed Logit Estimation Routine for Panel Data

Authors: Kenneth Train, David Revelt, Paul Ruud

Copyright (c) 1996 and 1999. Kenneth Train, David Revelt, and Paul Ruud.

New Version: This version allows Halton draws, uniform and triangular distributions, robust standard errors, and weights.

Keywords: mixed logit, random parameters logit, error components logit, panel data, simulations

References: D. Revelt and K. Train, "Mixed Logit with Repeated Choices of Appliance Efficiency Levels." Review of Economics and Statistics, Vol. LXXX, No. 4, 647-657, 1998. Working paper version available in Postscript or PDF.

K. Train, "Recreation Demand Models with Taste Differences Over People." Land Economics, Vol. 74, No. 2, pp. 230-239, 1998. Working paper version available in postscript or PDF.

D. Brownstone and K. Train, "Forecasting New Product Penetration with Flexible Substitution Patterns." Journal of Econometrics, Vol. 89, No. 1, pp. 109-129, 1999 (PDF file of journal article). Working paper version: " PS (Postscript file of working paper)."

D. McFadden and K. Train, 1996 (revised 1998 and 2000), "Mixed MNL Models for Discrete Response." Forthcoming, Applied Econometrics. Working paper version available in Postscript or PDF.

K. Train, 1999, "Halton Sequences for Mixed Logit." Working paper available in Postscript or PDF.

Description: A mixed logit (MXL) model is essentially a standard logit model with coefficients that vary in the population. The routine estimates the distribution of coefficients. MXL does not exhibit independence from irrelevant alternatives as does standard logit, and allows correlation in unobserved utility over alternatives and over time.

The utility of an alternative is specified as U=b'x+e, where x is a vector of observed variables (which vary over alternatives and agents), b is a vector of unobserved coefficients that vary over agents but not over alternatives (representing the agent's tastes), and e is an unobserved scalar distributed extreme value iid over agents and alternatives.

Each coefficient can take any of the following five distributions: (1) Fixed coefficient: the coefficient is the same for all agents (i.e., a degenerate distribution). (2) Normally distributed coefficient, with the mean and standard deviation being estimated. (3) Uniformly distributed coefficients, with the mean and "spread" being estimated. A uniform distribution with mean b and spread s has a uniform density between b-s and b+s. (4) Triangularly distributed coefficients, with the mean and "spread" being estimated. A triangular distribution with mean b and spread s has zero density below b-s, rises linearly from b-s to b, decreases linearly from b to b+s, and then is zero again above b+s. (5) Log-normally distributed coefficient; the coefficient is calculated as exp(c + s*u) where u is a standard normal deviate and c and s are parameters. The program estimates c and s. The log-normal distribution with parameters c and s has median exp(c), mean m=exp[c+((s-squared)/2)], and standard deviation m*square-root of (exp(s-squared) - 1).

This code is designed for panel data. It explicitly accounts for the correlation over time in unobserved utility that arises when there are repeated choices by a given agent. We have another, much faster code that does not account for repeated choices (i.e., for cross-sectional data). The latter code provides consistent but inefficient estimates when the data contain repeated choices for each agent.

Platforms: Gauss. The same Gauss program can be run on either Unix (Solaris 7) or PC (W95/98/NT) platforms.

Support: Please contact the authors with questions or suggestions at train@econ.berkeley.edu.

By clicking on the links below, you agree that you have read our disclaimer, understand it, and will abide by its terms and conditions.

Archive files: train0299.zip, train0299.tar
The program, manual, sample data, and output are contained in the files described in the manifest below. If you click on the zip archive (train0299.zip), you will download an archive that requires PKWare's unzip software to expand the archive. If you click on the tar archive (train0299.tar), you will download an archive that requires tar software to extract the tarfiles.


 21245 Aug 18 10:28 manual.txt
 38805 Aug 18 10:27 mxlp.g
 15885 Aug 18 10:28 out.txt
  8087 Aug 18 10:28 readme.txt
  1560 Aug 18 10:28 times.asc
484974 Aug 18 10:28 xmat.asc
 18114 Aug 18 10:28 yvec.asc

Test problem developed and replicated by K. Train. No errors reported. Test was run multiple times on a Pentium PC under Windows 98 and on a Sun Ultra running Solaris 7.

Archived by Grace Katagiri, 18 August 1999

Last modified: 18 August 1999