楼主: 财经节析
150158 180

[学习心得] 面板数据模型中Stata如何控制行业、产业、区域、企业性质、规模、所有制、省域等   [推广有奖]

122
财经节析 发表于 2020-3-7 12:48:44 |只看作者 |坛友微信交流群
天堂328 发表于 2020-3-4 16:03
控制了行业省份城市产业的,而不控制个体,的文章能推荐一下吗?
太多了,2017年经济研究上有一篇关于僵尸企业投资溢出效应的文章,北大的作者,你可以找找

使用道具

121
财经节析 发表于 2020-3-7 12:47:39 |只看作者 |坛友微信交流群
天堂328 发表于 2020-3-4 16:03
控制了行业省份城市产业的,而不控制个体,的文章能推荐一下吗?
经济研究中有很多的

使用道具

120
财经节析 发表于 2020-3-7 12:47:07 |只看作者 |坛友微信交流群
落地是云 发表于 2020-2-17 23:06
老师您好。请问高维固定效应模型后面,vce后面要不要cluster一下个体变量?比如说 vce(cluster firm)、 v ...
这个是reghdfe的设定

使用道具

119
财经节析 发表于 2020-3-6 16:37:47 来自手机 |只看作者 |坛友微信交流群
大家可以参考

使用道具

118
天堂328 发表于 2020-3-4 16:03:45 |只看作者 |坛友微信交流群
luyao300 发表于 2019-2-27 23:31
您说的这个很有道理,我发现几位大咖发的论文,如果控制了行业省份城市产业的,一般不控制个体,如果控制了个体 ...
控制了行业省份城市产业的,而不控制个体,的文章能推荐一下吗?

使用道具

117
落地是云 发表于 2020-2-17 23:06:52 |只看作者 |坛友微信交流群
财经节析 发表于 2019-12-4 21:10
非也,
1. reghdfe中如果在absorb(个体变量名  行业 产业) 是一定控制不了。
2. reghdfe控制固定效应与 ...
老师您好。请问高维固定效应模型后面,vce后面要不要cluster一下个体变量?比如说 vce(cluster firm)、 vce(cluster industry),还是vce(r)?

使用道具

116
落地是云 发表于 2020-2-17 22:58:21 |只看作者 |坛友微信交流群
universeve 发表于 2019-3-21 23:09
求问楼主和各位老师,那reghdfe能不能用来设置双向固定效应模型?absorb(year 国家 行业等)vce(robust) ...
亲,后面的vce 不 cluster 个体一下吗?我查了好多资料,说 vce(cluster id)比vce(r)要好

使用道具

115
nzqld520 发表于 2020-2-17 06:27:51 |只看作者 |坛友微信交流群
老师您好,我有一些疑惑,希望您能解答一下。
(1)请问在LSDV法下,个体数是指哪个变量的个数?比如reg tobinq fem numexe lev size age ls  i.region1   i.industry1 i.number  , r 模型中,个体是指number、region还是industry?
(2)为什么若排序是这样的reg tobinq fem numexe lev size age ls  i.region1  i.industry1  i.number , r  那么i.number里将有23个虚拟变量会omitted?为什么这里不是以region1为个体变量,industry1和number中的16+1749个虚拟变量被omitted?
希望老师解答一下,谢谢老师!

使用道具

114
422866687 发表于 2020-2-7 13:54:22 |只看作者 |坛友微信交流群
财经节析 发表于 2018-5-19 16:46
首先,我说的就是在个体固定效应变截距面板数据模型下的结论(即我说的失效,是指reghdfe不能控制那些像行 ...
您好,老师。我分别做了三个回归xi:reg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r和xtreg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r以及reghdfe lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2, a(citycode industrycode) vce(cl new_id)。
控制了行业固定效应industrycode,加入了高技术行业的交互项hightech,正常来说industrycode与hightech存在多重共线性,根据这个帖子hightech的系数应该omitted,但是回归结果只有reghdfe的hightech系数omitted,其余两个回归没有,并且回归系数也不相同,这是什么原因?非常感谢!
回归结果如下:
xi:reg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r
---------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021595   .0001183    18.26   0.000     .0019277    .0023914
      1.hightech |   1.501399   .1638783     9.16   0.000     1.180189    1.822608
hightech#c.index|  -.0001405   .0001769    -0.79   0.427    -.0004872    .0002062
    lnemployment |   .4588536   .0075574    60.72   0.000     .4440407    .4736665
         assdebt |  -.0005759   .0008115    -0.71   0.478    -.0021665    .0010147
       curasslia |   .0021092   .0019901     1.06   0.289    -.0017915    .0060099
          fixass |  -.8463446   .0542857   -15.59   0.000    -.9527473   -.7399419
            gdpg |   -.096158   .0049903   -19.27   0.000    -.1059392   -.0863768
              m2 |  -.0135675    .002159    -6.28   0.000    -.0177993   -.0093357
   _Iindustryc_2 |   .3632323   .1788014     2.03   0.042     .0127727    .7136919
   _Iindustryc_3 |   .0604105   .1394887     0.43   0.665    -.2129943    .3338152
   _Iindustryc_4 |    .713872   .1598015     4.47   0.000     .4006531    1.027091
   _Iindustryc_5 |   .8429119   .2246513     3.75   0.000     .4025843     1.28324

xtreg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r
----------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021649   .0001114    19.44   0.000     .0019466    .0023832
      1.hightech |   1.368523   .3511785     3.90   0.000     .6802258     2.05682         
hightech#c.index  |   .0002928    .000214     1.37   0.171    -.0001267    .0007123
    lnemployment |   .4364049   .0193669    22.53   0.000     .3984465    .4743633
         assdebt |   -.000465   .0012858    -0.36   0.718     -.002985    .0020551
       curasslia |   .0005733   .0026383     0.22   0.828    -.0045975    .0057442
          fixass |  -.4755166   .0941779    -5.05   0.000     -.660102   -.2909312
            gdpg |  -.0941485   .0050511   -18.64   0.000    -.1040485   -.0842485
              m2 |  -.0150203   .0016675    -9.01   0.000    -.0182885    -.011752
                 |
    industrycode |
              2  |   .6245305   .2605092     2.40   0.017     .1139419    1.135119
              3  |   .1594951   .2964314     0.54   0.591    -.4214998    .7404901
              4  |   .8046571   .3948312     2.04   0.042     .0308022    1.578512
              5  |    .700001   .2642034     2.65   0.008     .1821718     1.21783
              6  |   .0890626   .3325467     0.27   0.789    -.5627169    .7408421

reghdfe lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2, a(citycode industrycode) vce(cl new_id)
(dropped 9 singleton observations)
note: 1bn.hightech is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 11 iterations)
note: 1.hightech omitted because of collinearity
----------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021595   .0001169    18.48   0.000     .0019304    .0023886
      1.hightech |          0  (omitted)
hightech#c.index |  -.0001405    .000233    -0.60   0.547    -.0005973    .0003163
    lnemployment |   .4588536   .0183455    25.01   0.000     .4228823    .4948249
         assdebt |  -.0005759   .0012194    -0.47   0.637    -.0029669    .0018151
       curasslia |   .0021092   .0028603     0.74   0.461    -.0034993    .0077177
          fixass |  -.8463446   .1109573    -7.63   0.000    -1.063906   -.6287827
            gdpg |   -.096158   .0054216   -17.74   0.000    -.1067885   -.0855275
              m2 |  -.0135675   .0017321    -7.83   0.000    -.0169637   -.0101713
           _cons |  -.8228936   .1505112    -5.47   0.000    -1.118012   -.5277755
----------------------------------------------------------------------------------
------------------------------------------------------+
  Absorbed FE | Categories  - Redundant  = Num. Coefs |
--------------+---------------------------------------|
     citycode |       273           0         273     |
industrycode |        74           1          73     |
------------------------------------------------------+

使用道具

113
422866687 发表于 2020-2-7 13:53:36 |只看作者 |坛友微信交流群
黃河泉 发表于 2018-5-19 15:56
1. 你说 (即reghdfe命令失效) 是不正确的,你的结果中区间与行业 (region and industry) 是因为与你的个体 ...
您好,老师。我分别做了三个回归xi:reg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r和xtreg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r以及reghdfe lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2, a(citycode industrycode) vce(cl new_id)。
控制了行业固定效应industrycode,加入了高技术行业的交互项hightech,正常来说industrycode与hightech存在多重共线性,根据这个帖子hightech的系数应该omitted,但是回归结果只有reghdfe的hightech系数omitted,其余两个回归没有,并且回归系数也不相同,这是什么原因?非常感谢!
回归结果如下:
xi:reg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r
---------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021595   .0001183    18.26   0.000     .0019277    .0023914
      1.hightech |   1.501399   .1638783     9.16   0.000     1.180189    1.822608
hightech#c.index|  -.0001405   .0001769    -0.79   0.427    -.0004872    .0002062
    lnemployment |   .4588536   .0075574    60.72   0.000     .4440407    .4736665
         assdebt |  -.0005759   .0008115    -0.71   0.478    -.0021665    .0010147
       curasslia |   .0021092   .0019901     1.06   0.289    -.0017915    .0060099
          fixass |  -.8463446   .0542857   -15.59   0.000    -.9527473   -.7399419
            gdpg |   -.096158   .0049903   -19.27   0.000    -.1059392   -.0863768
              m2 |  -.0135675    .002159    -6.28   0.000    -.0177993   -.0093357
   _Iindustryc_2 |   .3632323   .1788014     2.03   0.042     .0127727    .7136919
   _Iindustryc_3 |   .0604105   .1394887     0.43   0.665    -.2129943    .3338152
   _Iindustryc_4 |    .713872   .1598015     4.47   0.000     .4006531    1.027091
   _Iindustryc_5 |   .8429119   .2246513     3.75   0.000     .4025843     1.28324

xtreg lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2 i.industrycode i.citycode, r
----------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021649   .0001114    19.44   0.000     .0019466    .0023832
      1.hightech |   1.368523   .3511785     3.90   0.000     .6802258     2.05682         
hightech#c.index  |   .0002928    .000214     1.37   0.171    -.0001267    .0007123
    lnemployment |   .4364049   .0193669    22.53   0.000     .3984465    .4743633
         assdebt |   -.000465   .0012858    -0.36   0.718     -.002985    .0020551
       curasslia |   .0005733   .0026383     0.22   0.828    -.0045975    .0057442
          fixass |  -.4755166   .0941779    -5.05   0.000     -.660102   -.2909312
            gdpg |  -.0941485   .0050511   -18.64   0.000    -.1040485   -.0842485
              m2 |  -.0150203   .0016675    -9.01   0.000    -.0182885    -.011752
                 |
    industrycode |
              2  |   .6245305   .2605092     2.40   0.017     .1139419    1.135119
              3  |   .1594951   .2964314     0.54   0.591    -.4214998    .7404901
              4  |   .8046571   .3948312     2.04   0.042     .0308022    1.578512
              5  |    .700001   .2642034     2.65   0.008     .1821718     1.21783
              6  |   .0890626   .3325467     0.27   0.789    -.5627169    .7408421

reghdfe lnpatent c.index##i.hightech lnemployment assdebt curasslia fixass gdpg m2, a(citycode industrycode) vce(cl new_id)
(dropped 9 singleton observations)
note: 1bn.hightech is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
(MWFE estimator converged in 11 iterations)
note: 1.hightech omitted because of collinearity
----------------------------------------------------------------------------------
                 |               Robust
        lnpatent |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
           index |   .0021595   .0001169    18.48   0.000     .0019304    .0023886
      1.hightech |          0  (omitted)
hightech#c.index |  -.0001405    .000233    -0.60   0.547    -.0005973    .0003163
    lnemployment |   .4588536   .0183455    25.01   0.000     .4228823    .4948249
         assdebt |  -.0005759   .0012194    -0.47   0.637    -.0029669    .0018151
       curasslia |   .0021092   .0028603     0.74   0.461    -.0034993    .0077177
          fixass |  -.8463446   .1109573    -7.63   0.000    -1.063906   -.6287827
            gdpg |   -.096158   .0054216   -17.74   0.000    -.1067885   -.0855275
              m2 |  -.0135675   .0017321    -7.83   0.000    -.0169637   -.0101713
           _cons |  -.8228936   .1505112    -5.47   0.000    -1.118012   -.5277755
----------------------------------------------------------------------------------
------------------------------------------------------+
  Absorbed FE | Categories  - Redundant  = Num. Coefs |
--------------+---------------------------------------|
     citycode |       273           0         273     |
industrycode |        74           1          73     |
------------------------------------------------------+

使用道具

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

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

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

GMT+8, 2024-5-25 04:08