全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5870 13
2012-02-13
第一次用stata    nlogit中所用的数据格式应该是什么样的? 没有数据  自己照着有些文献中的语句举例  模拟了一份数据;  right是我设置的其中一个变量   报错为:variable right is not alternative-specific: it has no within-case variability,这是什么意思呀?
二维码

扫码加我 拉你入群

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

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

全部回复
2012-2-13 15:23:05
顶一个
二维码

扫码加我 拉你入群

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

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

2012-2-13 15:24:57
stata软件手册中有数据的啊
二维码

扫码加我 拉你入群

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

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

2012-2-13 15:25:35
Examples

    Setup
        . webuse restaurant

    Generate a new categorical variable named type that identifies the first-level set of alternatives based on the
    variable named restaurant
        . nlogitgen type = restaurant(fast: Freebirds | MamasPizza, family:  CafeEccell | LosNortenos | WingsNmore,
            fancy: Christophers | MadCows)


    Examine the tree structure
        . nlogittree restaurant type, choice(chosen)

    Perform nested logit regression
       . nlogit chosen cost distance rating || type: income kids, base(family) || restaurant:, noconst
            case(family_id)




看看人家的数据就知道了
二维码

扫码加我 拉你入群

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

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

2012-2-13 15:40:33
蓝色 发表于 2012-2-13 15:25
Examples

    Setup
谢谢您的回答   但是我用的stata中没有restaurant的数据呀
二维码

扫码加我 拉你入群

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

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

2012-2-13 15:41:05
蓝色 发表于 2012-2-13 15:24
stata软件手册中有数据的啊
没有嵌套logit举例的数据
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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