楼主: 神行汉堡
5634 5

[回归分析求助] 多元对数回归中如何改变多值自变量的基准组? [推广有奖]

  • 1关注
  • 5粉丝

已卖:17份资源

硕士生

29%

还不是VIP/贵宾

-

威望
0
论坛币
597 个
通用积分
5.4073
学术水平
3 点
热心指数
3 点
信用等级
3 点
经验
3857 点
帖子
17
精华
0
在线时间
276 小时
注册时间
2015-3-4
最后登录
2025-10-19

楼主
神行汉堡 学生认证  发表于 2015-12-14 02:55:28 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
在multinomial logistic regression里,其中一个多值自变量kids的取值有none,both,son和daughter。在回归的时候 i.kids 的基准组自动使用了both,我想换成none,请问该用什么指令呢
二维码

扫码加我 拉你入群

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

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

关键词:自变量 Multinomial regression regressio logistic 自变量 如何

沙发
夏目贵志 发表于 2015-12-14 05:53:38
可以参考help fvvarlist
相关部分引用如下
Base levels

    You can specify the base level of a factor variable by using the ib. operator.  The syntax is

           Base         
           operator(*)    Description
           -----------------------------------------------------------------------------------------------------------
           ib#.           use # as base, #=value of variable
           ib(##).        use the #th ordered value as base (**)
           ib(first).     use smallest value as base (the default)
           ib(last).      use largest value as base
           ib(freq).      use most frequent value as base
           ibn.           no base level
           -----------------------------------------------------------------------------------------------------------
            (*) The i may be omitted.  For instance, you may type ib2.group or b2.group.
           (**) For example, ib(#2). means to use the second value as the base.

    Thus, if you want to use group=3 as the base in a regression, you can type

        . regress y  i.sex ib3.group

    You can also permanently set the base levels of categorical variables by using the fvset command.

藤椅
神行汉堡 学生认证  发表于 2015-12-14 13:21:03 来自手机
夏目贵志 发表于 2015-12-14 05:53
可以参考help fvvarlist
相关部分引用如下
十分感谢!

板凳
0335E 发表于 2015-12-14 14:21:48
把各变量手动设成dummy。

例如
gen dum_none  = (kids == 1)
gen dum_both  = (kids == 2)
gen dum_son  = (kids == 3)
gen dum_daughter  = (kids == 4)
kids等于几要看stata如何默认的。

以none为base回归的时候,
mlogit y dum_both  dum_son  dum_daughter x, base(1) vce(robust)
已有 1 人评分经验 热心指数 收起 理由
夏目贵志 + 5 + 1 热心帮助其他会员

总评分: 经验 + 5  热心指数 + 1   查看全部评分

报纸
peyzf 发表于 2018-1-14 14:24:47
学习一下。

地板
peyzf 发表于 2018-1-14 14:30:52
help fvvarlist 可以进行系统学习

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-9 11:48