全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
4517 3
2013-03-14
悬赏 3 个论坛币 未解决
tree structure specified for the nested logit model

type  N      severity N   k
------------------------------
low   99 --- 1        99  30
high 198 --- 2        99  55
           +- 3        99  14
------------------------------
               total  297  99

k = number of times alternative is chosen
N = number of observations at each level

. nlogit choice  Cause Weather||type: AccidentForm  ControlType RoadType||severity:,case( accident
> _id)
variable Cause is not alternative-specific: it has no within-case variability
r(459);


其中cause是事故原因代码,是分类数据,求问红字原因,新手初学

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-3-14 13:30:56
Pages from nlogit_Page_1.jpg Pages from nlogit_Page_2.jpg
看手册里面例子的介绍
看看你的数据格式是否符合。
很明显你的那个变量是没有变化的,而人家要求是有变化的

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-3-14 14:22:15
蓝色 发表于 2013-3-14 13:30
看手册里面例子的介绍
看看你的数据格式是否符合。
很明显你的那个变量是没有变化的,而人家要求是有变 ...
我也觉得是版主大人所说的问题,但是这个案例http://www.stata.com/statalist/archive/2002-10/msg00187.html,里面
To run nlogit, we must interact the attributes with dummy variables for the choi
ces:
. gen sexJap = sex*(car==2)

. gen sexEur = sex*(car==3)

. gen incJap = income*(car==2)

. gen incEur = income*(car==3)

. gen consFor = (type==2)
这种处理方法我实在没看明白,请版主解惑
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-11-12 20:42:11
unholylight 发表于 2013-3-14 14:22
我也觉得是版主大人所说的问题,但是这个案例http://www.stata.com/statalist/archive/2002-10/msg00187. ...
请问lz这个问题解决了吗?我也遇到这个问题了,也是STATA新手,但是导师要解一个nlogit没办法了,各种纠结啊。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群