five

MATLAB Code to Estimate Logit-Mixed Logit Model (Preference space, fixed and random parameters)

收藏
doi.org2025-01-15 收录
下载链接:
http://doi.org/10.17632/ttvm4cr25s.1
下载链接
链接失效反馈
官方服务:
资源简介:
This is a sample MATLAB code to estimate Logit-Mixed Logit Model in preference space. The example is provided for a model with 2 fixed parameters, 2 random parameters, and 3 alternatives. This code is an extension of the original code by Kenneth Train which considers all utility parameters to be random and the model is estimated in willingness-to-pay space. This code uses a simuated data. data_generation.m generate this data and give test.csv and test_save.mat as outputs. In the attached folder, main_test.m is the main file which takes test.csv and test_save.mat as inputs. The default setting is "no bootstrapping" because it would take some time to run. You can change WantBoot=1 to get the bootstrapped standard errors. You can increase the number of repetitions (NReps) to 50 to get stable standard error estimates. To get the histogram of random coefficient 1, use bar(MidEst(1,:),FreqEst(1,:)). Please cite the following papers if you use this code in any form: Bansal, P., Daziano, R. A., & Achtnicht, M. (2018). Extending the logit-mixed logit model for a combination of random and fixed parameters. Journal of choice modelling, 27, 88-96. Bansal, P., Daziano, R. A., & Achtnicht, M. (2018). Comparison of parametric and semiparametric representations of unobserved preference heterogeneity in logit models. Journal of choice modelling, 27, 97-113.

本示例为一套 MATLAB 编程示例,旨在对偏好空间中的 Logit-Mixed Logit 模型进行估计。该示例针对具有2个固定参数、2个随机参数及3个备选方案之模型进行阐述。此代码是对 Kenneth Train 原始代码的扩展,考虑到所有效用参数均为随机变量,模型估计在支付意愿空间内进行。代码使用模拟数据进行演示,由 data_generation.m 生成数据,并输出 test.csv 和 test_save.mat 文件。附带的文件夹中,main_test.m 为主要文件,其以 test.csv 和 test_save.mat 为输入。默认设置不进行自助法重采样,因为这将消耗一定时间。用户可将 WantBoot 设为 1 以获得自助法标准误差。增加重复次数(NReps)至 50 可获得稳定的标准误差估计。要获取随机系数 1 的直方图,请使用 bar(MidEst(1,:), FreqEst(1,:)) 命令。若在任一形式下使用此代码,请引用以下论文:Bansal, P.,Daziano, R. A.,& Achtnicht, M.(2018)。扩展 Logit-Mixed Logit 模型以组合随机和固定参数。选择建模杂志,27,88-96。Bansal, P.,Daziano, R. A.,& Achtnicht, M.(2018)。在 Logit 模型中比较未观测偏好异质性的参数化和半参数化表示。选择建模杂志,27,97-113。
提供机构:
Mendeley Data
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作