提问人:Foster Cossam 提问时间:6/16/2023 最后编辑:Foster Cossam 更新时间:6/17/2023 访问量:56
如何在混合 logit 模型中指定属性级别?
How can I specify attribute levels in a mixed logit model?
问:
我正在进行一项关于消费者偏好的研究,要求受访者根据一组属性选择产品。在运行混合 logit 模型后,我得到了以下结果。我正在寻求有关如何按属性级别隔离结果的帮助。
. mixlogit y price3, rand(texture ingrid) group(option_set) id(numeric_id) nrep(200)
Iteration 0: log likelihood = -689.71115 (not concave)
Iteration 1: log likelihood = -685.58262
Iteration 2: log likelihood = -683.87879
Iteration 3: log likelihood = -683.84319
Iteration 4: log likelihood = -683.84307
Iteration 5: log likelihood = -683.84307
Mixed logit model Number of obs = 3,096
LR chi2(2) = 11.55
Log likelihood = -683.84307 Prob > chi2 = 0.0031
------------------------------------------------------------------------------
y | Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
Mean |
price3 | -.0009266 .0001381 -6.71 0.000 -.0011973 -.0006558
texture | -1.174523 .0879522 -13.35 0.000 -1.346906 -1.00214
ingrid | -.1090069 .0652664 -1.67 0.095 -.2369268 .0189129
-------------+----------------------------------------------------------------
SD |
texture | .6666297 .130163 5.12 0.000 .411515 .9217444
ingrid | .0030574 .1314769 0.02 0.981 -.2546326 .2607474
------------------------------------------------------------------------------`
我尝试使用运算符,它通常用于多项式对数分析。但是,我遇到了一个错误,指示我正在执行不允许的时间序列操作。i.
. mixlogit y price3, rand(i.texture i.ingrid) group(option_set)
id(numeric_id)
nrep(200)
factor-variable and time-series operators not allowed
(error in option rand())
我尝试将属性转换为虚拟变量,但由于共线性,模型最终删除了大部分变量。
我希望结果类似于下面介绍的结果。不应使用条件 logit 模型,而应采用混合 logit 模型。
. clogit y price3 i.texture5 i.ingrid5, group(numeric_id)
note: 5.ingrid5 omitted because of collinearity.
note: multiple positive outcomes within groups encountered.
Iteration 0: log likelihood = -2132.9689
Iteration 1: log likelihood = -2132.5788
Iteration 2: log likelihood = -2132.5786
Conditional (fixed-effects) logistic regression Number of obs = 9,288
LR chi2(6) = 1402.42
Prob > chi2 = 0.0000
Log likelihood = -2132.5786 Pseudo R2 = 0.2474
------------------------------------------------------------------------------
y | Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
price3 | -.0016488 .0001815 -9.09 0.000 -.0020044 -.0012931
|
texture5 |
coarse | 1.692396 .6769401 2.50 0.012 .3656177 3.019174
fine | 2.705765 .6652764 4.07 0.000 1.401847 4.009683
|
ingrid5 |
70,20,0,10 | .9481876 .1057004 8.97 0.000 .7410186 1.155357
100,0,0,0 | -1.167767 .1452245 -8.04 0.000 -1.452401 -.8831319
70,15,10,5 | .5271418 .1093191 4.82 0.000 .3128803 .7414032
Other | 0 (omitted)
------------------------------------------------------------------------------
答: 暂无答案
评论
i.