楼主: 梁燕芬
483 0

多期did平行趋势检验,政策实施后出现共线性怎么解决,删除前一期,政策时间有三个 [推广有奖]

  • 0关注
  • 0粉丝

高中生

57%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0.3000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
163 点
帖子
12
精华
0
在线时间
66 小时
注册时间
2021-11-1
最后登录
2024-3-23

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
HDFE Linear regression                            Number of obs   =        600
Absorbing 2 HDFE groups                           F(   8,     29) =       6.41
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.9408
                                                  Adj R-squared   =     0.9347
                                                  Within R-sq.    =     0.1408
Number of clusters (pro)     =         30         Root MSE        =     0.1765

                                   (Std. Err. adjusted for 30 clusters in pro)
------------------------------------------------------------------------------
             |               Robust
        lnci |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        pre6 |   .2076109   .0939738     2.21   0.035     .0154129    .3998089
        pre5 |   .1051003    .057062     1.84   0.076    -.0116047    .2218053
        pre4 |   .0801337   .0550019     1.46   0.156    -.0323577    .1926252
        pre3 |   .1080589   .0453272     2.38   0.024     .0153543    .2007634
        pre2 |   .0842464   .0227338     3.71   0.001     .0377507    .1307422
     current |   .1776746   .0542038     3.28   0.003     .0668155    .2885337
        post |  -.2033604   .0704668    -2.89   0.007    -.3474811   -.0592397
       post1 |   .1328196   .0520221     2.55   0.016     .0264224    .2392168
       post2 |          0  (omitted)
       post3 |          0  (omitted)
       post4 |          0  (omitted)
       post5 |          0  (omitted)
       post6 |          0  (omitted)
       _cons |    .989278   .0099459    99.47   0.000     .9689364     1.00962
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        20           1          19     |
         pro |        30          30           0    *|
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.
end of do-file
代码:*事件研究法///多期did要生成个体维度和政策维度的虚拟变量
gen tpilot=2013 if (pro_1==4|pro_1==7|pro_1==1|pro_1==12)
replace tpilot=2014 if pro==21
replace tpilot=2014 if pro==27
replace tpilot=2016 if pro==24
gen policy=year-tpilot //生产政策时点前后期数,tpilot是政策实施的时点
table policy //了解数据情况
replace policy = -6 if policy < -6
///根据政策时点前后期数event,生成表示政策时点前后各期的虚拟变量,*第一步,生成变量d_j、dj、current。

forvalues i=6(-1)1{
  gen pre`i'=(policy==-`i'& treat==1)
}

gen current=(policy==0 & treat==1)  /////第一步,生成变量prej、postj、current。

forvalues i=1(1)6{
  gen post`i'=(policy==`i'& policy==1)
}

drop pre1

///丢掉一期作为基准组
reghdfe lnci pre* current post* lnpopi lnpgdp tegdp lntech lnfin lnte si, absorb(year pro) vce(cluster pro)  //回归呈现政策前后各期的系数变化

二维码

扫码加我 拉你入群

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

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

关键词:DID 共线性 Computation Statistics categories

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

本版微信群
加JingGuanBbs
拉您进交流群

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

GMT+8, 2024-5-13 22:17