全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
580 0
2023-03-20
我想用线性回归,研究拥有保险(自变量)是否会对患者的住院天数产生(因变量)影响。除了拥有保险(Insurance)这一个自变量以外,还有其他的自变量,包括性别,年龄,教育水平,收入,民族,是否有慢性疾病,就医医院等级。我的导师建议我把除拥有保险以外的因变量分为多个组(group1,2,3,4),然后每次对住院天数,拥有保险和不同的组进行回归。最后对所有自变量进行回归。
stata命令大致如下:
*1st
reg Number_of_Night Insurance
est store model1

*2nd

reg Number_of_Night Insurance Female Age_44_below o.Age_45_54 Age_55_64 Age_65_74 Age_75_Above Han_Nationality
est store model2

*3rd
reg Number_of_Night Insurance No_Formal_Education o.Elementary_School Middle_School High_School_and_Above logIncome
est store model3

*4th
reg Number_of_Night Insurance Chronic_Disease o.Hospital_Level1 Hospital_Level2  Hospital_Level3
est store model4

* 5th 总体回归
reg Number_of_Night Insurance Female Age_44_below o.Age_45_54 Age_55_64 Age_65_74 Age_75_Above Han_Nationality No_Formal_Education o.Elementary_School Middle_School High_School_and_Above logIncome Chronic_Disease o.Hospital_Level1 Hospital_Level2  Hospital_Level3
est store model5
*esttab model1 model2 model3 model4 model5 using RESULT2.rtf, title(Regression) b(a3) p(3) compress replace



请问这样的命令正确吗?‘对住院天数,拥有保险和不同的自变量组进行回归,最后对所有自变量进行回归’这样做的意义是什么呢?

提前感谢您的帮助!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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