全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
25389 4
2011-01-21
假如分析在美国教育对收入的影响,性别,东西海岸,还有是白人非白人分别是三个dummy variable, 可是用SAS怎么处理啊 多谢
二维码

扫码加我 拉你入群

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

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

全部回复
2011-1-21 04:45:40
录入数据的时候,如果是男的,就是1,否则就是0;东海岸1,否则0;白人1;否则就是0。也可以选择女性为1,否则为0。对整体回归结果不产生影响。
二维码

扫码加我 拉你入群

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

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

2011-1-21 08:01:08
我了解的哑变量是这样的。若自变量中存在无序多分类的变量,比如血型,分为A、B、O、AB,因为它们之间不存在等级关系,所以在引入回归时,不能直接用1、2、3、4来表示,需要将血型转化为哑变量,并且要设置一个参照。SAS中好像不能直接设置哑变量,需要先根据条件自行设置。
二维码

扫码加我 拉你入群

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

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

2011-1-22 03:50:09
if I want to do a multiple linear regression, can I do it in the same way as before? I mean those dummy variable are nonlinear...
二维码

扫码加我 拉你入群

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

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

2011-1-22 09:09:29
linear model means linear in parameter only. When you have a dummy, you can treat it as class, add class statement in your code. However, you can treat it as an independent variable and run the regression as usual. Be aware of the interpretation of your final model. The coefficient is only meaningful when you compare to your baseline (like 3rd floor mentioned) , and that baseline is all the obs have "0" in the dummy.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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