# 混合logit

混合logit是一种离散选择模型，其中效用函数的系数在决策者之间随机变化，因而每个选择概率都是标准logit公式在系数密度上的积分。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 通过在该密度上取平均，模型得以容纳随机偏好差异、无限制的替代模式以及未观测因素跨时间的相关性——这正是约束标准多项logit的三项限制。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 它被称为离散选择领域的“未来模型”，并已内置于广泛使用的统计软件包中。<sup>[2](https://journals.sagepub.com/doi/10.3141/1805-11)</sup> McFadden和Train证明，它可以逼近任何随机效用模型。<sup>[3](https://doi.org/10.1002/1099-1255%28200009/10%2915:5<447::aid-jae570>3.0.co;2-1)</sup>

| 关键事实 | 细节 |
|---|---|
| 选择概率 | logit公式在混合密度 \( f(\beta \mid \theta) \) 上的积分；标准logit是无混合的退化情形。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> |
| 放松的限制 | 随机偏好差异、无限制替代，以及未观测因素跨时间的相关性。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> |
| 逼近性质 | 任何随机效用模型都可以用混合logit逼近到任意精度。<sup>[3](https://doi.org/10.1002/1099-1255%28200009/10%2915:5<447::aid-jae570>3.0.co;2-1)</sup> |
| 估计方法 | 最大模拟似然：对logit公式在 \( R \) 次 \( \beta \) 抽取上取平均。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> |
| 抽取方法 | 在Train的应用中，100次Halton抽取比1,000次随机抽取产生更低的参数模拟方差。<sup>[4](https://eml.berkeley.edu/wp/train0899.pdf)</sup> |
| 异质性还原 | 个体层面参数来自条件（贝叶斯）分布；支付意愿来自WTP空间或对数正态公式。<sup>[5](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)</sup><sup> • </sup><sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup> |
| 标准应用领域 | 环境经济学、产业组织、市场营销、公共经济学和交通经济学。<sup>[7](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)</sup> |

## 工作原理

决策者 \( n \) 选择备选方案 \( j \) 的效用，取决于该人特有的系数 \( \beta_{n} \) 以及一个扰动项 \( \varepsilon_{nj} \)——后者与多项logit中一样，是独立同分布的极值（Gumbel）扰动；模型将这种类似probit的随机系数与logit误差结合在一起。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup><sup> • </sup><sup>[2](https://journals.sagepub.com/doi/10.3141/1805-11)</sup> 给定 \( \beta \) 的取值，选择概率 \( L_{ni}(\beta) \) 取标准logit形式。分析者观测不到 \( \beta_{n} \)，只能观测到它的分布，即混合分布 \( f(\beta \mid \theta) \)，因此无条件概率为

\[ P_{ni} = \int L_{ni}(\beta) \, f(\beta \mid \theta) \, d\beta. \]

\( f \) 的常见选择有正态、对数正态、均匀、三角和瑞利分布，依据符号约束或有界支撑来选取；大多数应用使用正态或对数正态。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 当有 \( K \) 个随机系数时，这是一个 \( K \) 维积分，难以用求积法直接计算，因此没有可用的闭式解。<sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup> 在总体上的平均所产生的概率不满足无关备选方案独立性。<sup>[5](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)</sup> 在误差成分形式中，项 \( \eta_{nj} \) 在各备选方案之间制造相关性，其中 \( W \) 是各成分的协方差。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup>

McFadden和Train（2000）证明，任何随机效用模型都可以通过选取适当变量和混合分布的混合logit逼近到任意精度。<sup>[3](https://doi.org/10.1002/1099-1255%28200009/10%2915:5<447::aid-jae570>3.0.co;2-1)</sup>

## 实现方法

估计采用最大模拟似然：从 \( f(\beta \mid \theta) \) 中抽取 \( \beta^{r} \)，对每次抽取计算logit公式并取平均，

\[ \hat{P}_{ni} = \frac{1}{R} \sum_{r=1}^{R} L_{ni}(\beta^{r}), \]

然后在样本上最大化 log \( \hat{P}_{ni} \) 之和。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 在抽取次数固定时，该估计量是有偏的，因为无偏概率模拟器的对数并非无偏；经典渐近理论要求抽取次数随样本量增长。<sup>[8](https://fpcordeiro.r-universe.dev/choicer/doc/mxl.html)</sup> 另一种选择是Daniel McFadden于1989年提出的模拟矩方法。<sup>[9](https://doi.org/10.2307/1913621)</sup>

抽取的构造很重要。Kenneth Train用于混合logit的Halton序列、<sup>[4](https://eml.berkeley.edu/wp/train0899.pdf)</sup> Chandra R. Bhat的准随机最大模拟似然、<sup>[10](https://doi.org/10.1016/s0191-2615%2800%2900014-x)</sup> 随机化与置乱Halton序列、<sup>[11](https://doi.org/10.1016/s0191-2615%2802%2900090-5)</sup> 修正拉丁超立方抽样、<sup>[12](https://doi.org/10.1016/j.trb.2004.10.005)</sup> 以及 \( (t,m,s) \) 网，<sup>[13](https://ideas.repec.org/p/ems/eureir/1829.html)</sup> 相对于伪随机抽取都能降低模拟误差。实用建议因设定而异：一个含三个备选方案、一两个随机参数的小模型，用少至25次智能抽取即可稳定，100次是“良好”的数目。<sup>[5](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)</sup>

个体层面参数从条件分布 \( H_{q}(\beta \mid \theta) = L_{q}(\beta) g(\beta \mid \theta) / P_{q}(\theta) \) 中还原，该分布按观测到所选方案的概率对抽取重新加权。<sup>[5](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)</sup><sup> • </sup><sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup> 支付意愿可以直接在WTP空间中参数化；在偏好空间中，WTP由非价格效用系数除以价格系数的负值得到；对于对数正态系数，均值为 \( \exp(b + s^{2}/2) \)，标准差为 \( \exp(b + s^{2}/2) \times \sqrt{\exp(s^{2}) - 1} \)。<sup>[30](https://www.jstatsoft.org/article/download/v105i10/4440)</sup><sup> • </sup><sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup><sup> • </sup><sup>[14](https://ar5iv.labs.arxiv.org/html/2301.01091)</sup> 软件包括R包mlogit（正态、对数正态、零删失正态、均匀和三角混合，通过Choleski分解处理相关性）、<sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup> Stata的cmxtmixlogit（Halton、Hammersley和带对偶的伪随机抽取）、<sup>[15](https://www.stata.com/meeting/germany19/slides/germany19_Luedicke.pdf)</sup> 以及自2025年末起的jaxlogit，后者用JAX即时编译取代了xlogit计算引擎。<sup>[16](https://github.com/outerl/jaxlogit)</sup>

## 起源

最早的应用是Boyd和Mellman（1980）以及Cardell和Dunbar（1980）的汽车需求模型，使用的是市场份额数据而非个体选择。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 早期的客户层面应用，如Train等（1987a）和Ben-Akiva等（1993），仅限于一两个可用求积法计算的积分维度。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 该模型只有在基于模拟的估计方法出现后才完全可用；面板数据应用包括Erdem（1996）、Revelt和Train（1998）以及Bhat（2000）。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> Revelt和Train的论文将适用于重复选择的混合logit模型应用于家庭对家电能效等级的选择。<sup>[17](https://doi.org/10.1162/003465398557735)</sup> 一个处理总体需求冲击的扩展版本被用于数百项研究，包括Nevo（2001）和Petrin（2002）。<sup>[7](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)</sup>

## 变体

**误差成分与相关的系数。** 随机参数设定与误差成分设定只有在随机效应模型具有非零均值时才导致相同的模型，因此当效用结构匹配时二者等价。<sup>[29](https://pages.stern.nyu.edu/~wgreene/MixedLogitSOP.pdf)</sup><sup> • </sup><sup>[5](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)</sup> Greene和Hensher为随机系数和误差成分开发了异方差控制。<sup>[18](https://doi.org/10.1016/j.tre.2006.02.001)</sup> 当混合分布为含概率的 \( M \) 个取值的离散分布时，混合logit就变成了长期流行于心理学和市场营销领域的潜类别模型。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup>

**尺度异质性。** Fiebig、Keane、Louviere和Wasi（2009）的广义多项logit模型通过允许logit尺度系数存在异质性来扩展正态混合logit，解决了偏好异质性与误差尺度的混淆问题；尺度异质性logit是其仅含尺度的特例。<sup>[19](https://doi.org/10.1287/mksc.1090.0508)</sup>

**灵活与非参数混合。** Train的logit混合logit模型（2016）使用灵活的混合分布。<sup>[20](https://doi.org/10.1016/j.jocm.2016.07.004)</sup> Train的EM算法以非参数方式估计混合分布。<sup>[21](https://doi.org/10.1016/s1755-5345%2813%2970022-8)</sup>

**贝叶斯与机器学习版本。** 贝叶斯MCMC估计量（Rossi等2005；Burda等2008）是模拟似然的成熟替代方案。<sup>[7](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)</sup> Rodrigues（2022）将混合多项logit模型的贝叶斯推断扩展到大型数据集。<sup>[22](https://doi.org/10.1016/j.trb.2022.01.005)</sup> Łukawska、Jensen和Rodrigues（2024）的上下文感知贝叶斯混合多项logit（C-MMNL）使用神经网络将上下文信息映射为偏好参数的可解释偏移，其中 \( \mu_{t} \) 是上下文输入的神经网络，通过随机变分推断并借助GPU加速进行估计，计算成本增加很小。<sup>[23](https://doi.org/10.1016/j.jocm.2024.100536)</sup><sup> • </sup><sup>[24](https://arxiv.org/html/2210.05737v2)</sup> RUMnet（Aouad和Désir，2025）用神经网络表示随机效用选择。<sup>[25](https://doi.org/10.1287/mnsc.2023.02189)</sup>

## 应用

混合logit是交通运输领域的主力模型（城际出行方式选择、<sup>[10](https://doi.org/10.1016/s0191-2615%2800%2900014-x)</sup> 车辆选择、<sup>[12](https://doi.org/10.1016/j.trb.2004.10.005)</sup> 自行车路径选择<sup>[23](https://doi.org/10.1016/j.jocm.2024.100536)</sup>），还用于市场营销、家电能效需求<sup>[17](https://doi.org/10.1162/003465398557735)</sup> 以及健康与安全估值。<sup>[6](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)</sup> 跨领域而言，它被用于环境经济学、产业组织、市场营销、公共经济学和交通经济学。<sup>[7](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)</sup>

## 局限与替代方案

**识别。** 从多项logit设定出发再添加随机参数——这一看似显而易见的做法——可能产生有偏估计并显著损失拟合优度。<sup>[2](https://journals.sagepub.com/doi/10.3141/1805-11)</sup> 蒙特卡洛证据表明，识别问题取决于数据的低变异性，并随着与随机参数相关的数据丰富度增加而消失；即便数据丰富，估计参数也并不总能还原正确值，随机异质性的还原取决于混合分布的变异性和对称性，当每个个体被观测到多于一次选择时会有所改善。<sup>[26](https://link.springer.com/article/10.1007/s11067-007-9045-4)</sup> Fox、Kim、Ryan和Bajari（2011）利用有理零点检验证明了随机系数分布的非参数识别；McFadden和Train证明了逼近结果，但未研究识别问题。<sup>[7](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)</sup>

**支付意愿的病态问题。** 当成本系数随机时，支撑集跨越零点的正态混合分布意味着支付意愿的矩为无穷大，Daly、Hess和Train（2012）对此有详细记录。<sup>[27](https://onlinelibrary.wiley.com/doi/10.1111/ajae.12122)</sup> 对数正态价格系数会使一部分人群处于接近零的价格敏感度，这可能产生没有有限均值的支付意愿分布和爆炸性的福利数字。<sup>[8](https://fpcordeiro.r-universe.dev/choicer/doc/mxl.html)</sup> 在没有面板数据、市场变异或陈述偏好设计变异的情况下，随机系数方差只能被弱识别。<sup>[8](https://fpcordeiro.r-universe.dev/choicer/doc/mxl.html)</sup> 一项2024年的模拟研究发现，即便在正确设定下，最大模拟似然估计也是有偏的，且不同于真实参数。<sup>[28](https://link.springer.com/article/10.1007/s10614-024-10637-x)</sup>

**与替代方案的比较。** 在误差成分形式中，巢式虚拟变量的标准差所起的作用类似于嵌套logit的包容值系数。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup> 潜类别是离散混合的特例。<sup>[1](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)</sup>

## References

1. [Discrete Choice Methods with Simulation, 2nd ed., Chapter 6: Mixed Logit (Train)](https://eml.berkeley.edu/books/choice2nd/Ch06_p134-150.pdf)
2. [Mixed Logit (or Logit Kernel) Model: Dispelling Misconceptions of Identification (Walker et al., Transportation Research Record)](https://journals.sagepub.com/doi/10.3141/1805-11)
3. [10)15:5<447::aid jae570>3.0.co (doi.org)](https://doi.org/10.1002/1099-1255%28200009/10%2915:5<447::aid-jae570>3.0.co;2-1)
4. [Halton Sequences for Mixed Logit (Train, 1999/2000)](https://eml.berkeley.edu/wp/train0899.pdf)
5. [The Mixed Logit Model: The State of Practice (Hensher & Greene, Transportation 2003)](https://pages.stern.nyu.edu/%7Ewgreene/MixedLogitSOP.pdf)
6. [mlogit package vignette: The random parameters (or mixed) logit model (R documentation)](https://cran.r-project.org/web/packages/mlogit/vignettes/c5.mxl.html)
7. [The random coefficients logit model is identified (Fox, Kim, Ryan, Bajari; Journal of Econometrics version)](https://fox.web.rice.edu/published-papers/1-s20-s0304407611001655.pdf)
8. [choicer R package: mixed logit and preference heterogeneity vignette](https://fpcordeiro.r-universe.dev/choicer/doc/mxl.html)
9. [Daniel McFadden (1989). A Method of Simulated Moments for Estimation of Discrete Response Models Without Numerical Integration. Econometrica.](https://doi.org/10.2307/1913621)
10. [Quasi-random maximum simulated likelihood estimation of the mixed multinomial logit model (Transportation Research Part B Methodological, 2001)](https://doi.org/10.1016/s0191-2615%2800%2900014-x)
11. [Simulation estimation of mixed discrete choice models using randomized and scrambled Halton sequences (Transportation Research Part B Methodological, 2003)](https://doi.org/10.1016/s0191-2615%2802%2900090-5)
12. [Stephane Hess, Kenneth E. Train, John W. Polak (2005). On the use of a Modified Latin Hypercube Sampling (MLHS) method in the estimation of a Mixed Logit Model for vehicle choice. Transportation Research Part B Methodological.](https://doi.org/10.1016/j.trb.2004.10.005)
13. [Quasi-random simulation of discrete choice models (Sándor & Train, 2004)](https://ideas.repec.org/p/ems/eureir/1829.html)
14. [Fitting mixed logit random regret minimization models using maximum simulated likelihood (mixrandregret, Stata Journal article preprint)](https://ar5iv.labs.arxiv.org/html/2301.01091)
15. [Performing and interpreting discrete choice analyses in Stata (Lüdicke, Stata 16 cmxtmixlogit)](https://www.stata.com/meeting/germany19/slides/germany19_Luedicke.pdf)
16. [jaxlogit: MSLE estimation of linear-in-parameters mixed logit models with JAX](https://github.com/outerl/jaxlogit)
17. [David Revelt, Kenneth Train (1998). Mixed Logit with Repeated Choices: Households' Choices of Appliance Efficiency Level. The Review of Economics and Statistics.](https://doi.org/10.1162/003465398557735)
18. [William H. Greene, David A. Hensher (2006). Heteroscedastic control for random coefficients and error components in mixed logit. Transportation Research Part E Logistics and Transportation Review.](https://doi.org/10.1016/j.tre.2006.02.001)
19. [Denzil G. Fiebig and colleagues (2009). The Generalized Multinomial Logit Model: Accounting for Scale and Coefficient Heterogeneity. Marketing Science.](https://doi.org/10.1287/mksc.1090.0508)
20. [Kenneth Train (2016). Mixed logit with a flexible mixing distribution. Journal of Choice Modelling.](https://doi.org/10.1016/j.jocm.2016.07.004)
21. [EM Algorithms for nonparametric estimation of mixing distributions (Journal of Choice Modelling, 2008)](https://doi.org/10.1016/s1755-5345%2813%2970022-8)
22. [Filipe Rodrigues (2022). Scaling Bayesian inference of mixed multinomial logit models to large datasets. Transportation Research Part B Methodological.](https://doi.org/10.1016/j.trb.2022.01.005)
23. [Mirosława Łukawska, Anders Fjendbo Jensen, Filipe Rodrigues (2024). Context-aware Bayesian mixed multinomial logit model. Journal of Choice Modelling.](https://doi.org/10.1016/j.jocm.2024.100536)
24. [Context-aware Bayesian Mixed Multinomial Logit Model (arXiv full text)](https://arxiv.org/html/2210.05737v2)
25. [Ali Aouad, Antoine Désir (2025). Representing Random Utility Choice Models with Neural Networks. Management Science.](https://doi.org/10.1287/mnsc.2023.02189)
26. [Empirical Identification in the Mixed Logit Model: Analysing the Effect of Data Richness (Cherchi & Ortúzar, 2008)](https://link.springer.com/article/10.1007/s11067-007-9045-4)
27. [Logit Mixed Logit Under Asymmetry and Multimodality of WTP: A Monte Carlo Evaluation (American Journal of Agricultural Economics, 2020)](https://onlinelibrary.wiley.com/doi/10.1111/ajae.12122)
28. [Comparing the Mixed Logit Estimates and True Parameters under Informative and Uninformative Heterogeneity: A Simulated Discrete Choice Experiment (Computational Economics, 2024)](https://link.springer.com/article/10.1007/s10614-024-10637-x)
29. [MixedLogitSOP (pages.stern.nyu.edu)](https://pages.stern.nyu.edu/~wgreene/MixedLogitSOP.pdf)
30. [jstatsoft.org](https://www.jstatsoft.org/article/download/v105i10/4440)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing › Regression analysis › Categorical and choice models

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mixed-logit

English original: https://www.edgepedia.org/mixed-logit
