全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
7889 9
2012-10-23
入门级菜鸟捂脸求助
(各种翻书、搜索没有找到答案,大侠们就不要让我自己去解决了,知道的一定要伸出援手啊)
用stata做logit,有一个虚变量被dropped,理由是x13 != 0 predicts failure perfectly
我分析原因,可能是由于该虚变量取值为0的太多,而取值为1的又太少
详细样本情况是这样的
样本总数:191
虚变量a:69
虚变量b:8
虚变量c:22
虚变量d:28
虚变量e:26
虚变量f:1
虚变量g:9
虚变量h:5

上面所说的被dropped的虚变量就是f,估计结果的样本数变为190

求解释:虚变量0、1的赋值比例应该在多少?是不是只有1个样本赋值为1就要被dropped?
二维码

扫码加我 拉你入群

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

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

全部回复
2012-10-23 22:01:35
it is called perfect prediction.

http://www.ats.ucla.edu/stat/mul ... on_logit_models.htm


A complete separation happens when the outcome variable separates a predictor variable or a combination of predictor variables completely. Albert and Anderson (1984) define this as, "there is a vector α that correctly allocates all observations to their group." Below is a small example.

Y X1 X2
0 1  3
0 2  2
0 3 -1
0 3 -1
1 5  2
1 6  4
1 10 1
1 11 0

In this example, Y is the outcome variable, X1 and X2 are predictor variables. We can see that observations with Y = 0 all have values of X1<=3 and observations with Y = 1 all have values of X1>3. In other words, Y separates X1 perfectly. The other way to see it is that X1 predicts Y perfectly since X1<=3 corresponds to Y = 0 and X1 > 3 corresponds to Y = 1. By chance, we have found a perfect predictor X1 for the outcome variable Y. In terms of predicted probabilities, we have Prob(Y = 1 | X1<=3) = 0 and Prob(Y=1 X1>3) = 1, without the need for estimating a model.
二维码

扫码加我 拉你入群

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

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

2012-10-24 02:19:16
大白菜2012 发表于 2012-10-23 22:01
it is called perfect prediction.

http://www.ats.ucla.edu/stat/mult_pkg/faq/general/complete_separ ...
多谢大白菜!
第一次知道这种情况,以及怎么去处理。

刚做了一下研究,也有人针对这个问题做了解决方案。有兴趣,参加
http://artsandsciences.sc.edu/poli/psrw/Zorn_PA_Final.pdf
二维码

扫码加我 拉你入群

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

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

2012-10-24 04:27:15
fgleric 发表于 2012-10-24 02:19
多谢大白菜!
第一次知道这种情况,以及怎么去处理。
thanks for sharing
二维码

扫码加我 拉你入群

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

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

2012-10-24 09:21:48
大白菜2012 发表于 2012-10-23 22:01
it is called perfect prediction.

http://www.ats.ucla.edu/stat/mult_pkg/faq/general/complete_separ ...
多谢大白菜帮我认清了问题
二维码

扫码加我 拉你入群

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

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

2012-10-24 09:22:44
fgleric 发表于 2012-10-24 02:19
多谢大白菜!
第一次知道这种情况,以及怎么去处理。
多谢分享文献。。。我还是选择删除这个样本吧,毕竟只有1个
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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