楼主: 芍芍曼
8843 6

STATA建立虚拟变量问题 [推广有奖]

  • 0关注
  • 0粉丝

小学生

42%

还不是VIP/贵宾

-

威望
0
论坛币
10 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
146 点
帖子
5
精华
0
在线时间
2 小时
注册时间
2013-5-6
最后登录
2013-6-5

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
大神们,我正在用STATA做发展中国家人均GDP收敛性分析。面板数据。
但是在建立虚拟变量时出现了问题,求大神们指导一下。

首先阐述一下我们模型。我用了10个发展中国家和10个发达国家2001-2010年人均GDP的数据,建立模型确定是否贝塔收敛。模型为:LN(Yi,t/Yi,t-1)=A+BLN(Yi,t-1)+Ui,t,其中Yi,t是第I个国家在第t年的人均GDP水平,如果B<0,则表示模型收敛,发展中国家经济增长速度大于发达国家并且两者最终趋于同一水平。

楼主已经进行了hausman检验,p=0.0001,这可以拒绝原假设,就是模型应该选择固定效应模型。

但是当我加入时间和国家的虚拟变量之后,就出现了多重共线性的问题。

固定效应模型为Y=A+BX+CHi+DWk+Uit
其中Hi=1,when i=1,2,....,20, Hi=0,when i=其他
Wk=1,when k=2001,2002,....2010,Wk=0, when k=其他


我的STATA命令为:
xtreg y x i.country i.year,fe
但是输入之后,出现的结果是
xtreg y x i.country i.year,fe
note: 2.country omitted because of collinearity
note: 3.country omitted because of collinearity
note: 4.country omitted because of collinearity
note: 5.country omitted because of collinearity
note: 6.country omitted because of collinearity
note: 7.country omitted because of collinearity
note: 8.country omitted because of collinearity
note: 9.country omitted because of collinearity
note: 10.country omitted because of collinearity
note: 11.country omitted because of collinearity
note: 12.country omitted because of collinearity
note: 13.country omitted because of collinearity
note: 14.country omitted because of collinearity
note: 15.country omitted because of collinearity
note: 16.country omitted because of collinearity
note: 17.country omitted because of collinearity
note: 18.country omitted because of collinearity
note: 19.country omitted because of collinearity
note: 20.country omitted because of collinearity

Fixed-effects (within) regression               Number of obs      =       180
Group variable: country                         Number of groups   =        20

R-sq:  within  = 0.5316                         Obs per group: min =         9
       between = 0.5135                                        avg =       9.0
       overall = 0.3069                                        max =         9

                                                F(9,151)           =     19.04
corr(u_i, Xb)  = -0.8593                        Prob > F           =    0.0000

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           x |  -8.35e-06   1.55e-06    -5.40   0.000    -.0000114   -5.30e-06
             |
     country |
          2  |  (omitted)
          3  |  (omitted)
          4  |  (omitted)
          5  |  (omitted)
          6  |  (omitted)
          7  |  (omitted)
          8  |  (omitted)
          9  |  (omitted)
         10  |  (omitted)
         11  |  (omitted)
         12  |  (omitted)
         13  |  (omitted)
         14  |  (omitted)
         15  |  (omitted)
         16  |  (omitted)
         17  |  (omitted)
         18  |  (omitted)
         19  |  (omitted)
         20  |  (omitted)
             |
        year |
       2003  |   .1060854   .0216918     4.89   0.000     .0632268     .148944
       2004  |   .1120809   .0220987     5.07   0.000     .0684183    .1557435
       2005  |   .0951004   .0230097     4.13   0.000     .0496379    .1405629
       2006  |   .1019965   .0236382     4.31   0.000     .0552922    .1487009
       2007  |   .1495863   .0244018     6.13   0.000     .1013733    .1977994
       2008  |   .1380059   .0262394     5.26   0.000     .0861621    .1898496
       2009  |  -.0128397   .0279653    -0.46   0.647    -.0680936    .0424141
       2010  |   .1448073   .0258666     5.60   0.000     .0937002    .1959144
             |
       _cons |   .1536456   .0258056     5.95   0.000      .102659    .2046323
-------------+----------------------------------------------------------------
     sigma_u |  .10805511
     sigma_e |  .06853863
         rho |  .71309995   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(19, 151) =     0.00             Prob > F = 1.0000
说是多重共线性的问题,所有的国家数据都被去掉了 这是为什么????????

我觉得应该是虚拟变量设定有问题
请大神们知道我一下,这是毕业论文,老师也不明白哪里有问题,对于我来说,做不出来论文就没有办法往下写了!!!!!!!!!!!

求指导

在这里先谢谢大家了!!!!!!!!!!thanks a million



二维码

扫码加我 拉你入群

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

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

关键词:Stata tata 虚拟变量 Interval variance 人均GDP 国家 模型

回帖推荐

lopez93 发表于7楼  查看完整内容

正确的命令应该是: reg y x i.country i.year,fe 或者 xtreg y x i.year,fe

本帖被以下文库推荐

沙发
芍芍曼 发表于 2013-5-15 23:02:50 |只看作者 |坛友微信交流群
自己先顶一下!!!!!!!希望大神门快一点回复我啊 !!!!!!
小女子刚刚用人大经济论坛没多久,头像都是真实头像,就是表示我诚心诚意问问问题啊
亲们,支持我一下吧

使用道具

藤椅
芍芍曼 发表于 2013-5-15 23:04:13 |只看作者 |坛友微信交流群
自己先顶一下!!!!!!!希望大神门快一点回复我啊 !!!!!!
小女子刚刚用人大经济论坛没多久,头像都是真实头像,就是表示我诚心诚意问问问题啊
亲们,支持我一下吧

使用道具

板凳
singgersky2013 学生认证  发表于 2013-7-12 12:03:25 |只看作者 |坛友微信交流群
我不太清楚你要研究的问题,不过在设置虚拟变量的时候要注意,当所研究的某样本一定属于你所设的虚拟变量中某一类(如,10个国家,虚拟变量x1,x2,……x10,要少设置一个,因为在你研究的总体中,它不属于那9个,就一定是你没设出来的那一个。)具体原因我解释不了,有点像虚拟变量陷阱问题,见https://bbs.pinggu.org/thread-1273924-1-1.html

使用道具

报纸
dao124 发表于 2013-8-17 11:28:04 |只看作者 |坛友微信交流群
芍芍曼 发表于 2013-5-15 23:04
自己先顶一下!!!!!!!希望大神门快一点回复我啊 !!!!!!
小女子刚刚用人大经济论坛没多久,头像 ...
楼主好,请问楼主问题解决了没有啊。我也遇到了这样的问题,楼主能不能帮忙解答一下啊。好人有好报。谢谢

使用道具

地板
靠不会吧 发表于 2013-9-1 02:42:24 |只看作者 |坛友微信交流群
好像是虚拟变量设置有点问题吧,按这个设定,国别和年份数据都为1啊,似乎没什么意义啊

使用道具

7
lopez93 在职认证  发表于 2014-3-22 14:31:03 |只看作者 |坛友微信交流群
正确的命令应该是:

reg y x i.country i.year,fe

或者

xtreg y x i.year,fe
已有 1 人评分论坛币 信用等级 收起 理由
我的素质低 + 5 + 5 精彩帖子

总评分: 论坛币 + 5  信用等级 + 5   查看全部评分

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 15:43