表示企業-月份固定效應。我們關注的係數是 ,代表雙重差異,第一重差異是 2017 年 9-11 月的出口額與 2017 年 6-8 月出口額的差異,第二重是處理組和對照組的差異,即 2017 年和其他年份的差異。
需要注意的是,此處 RDD-DID 設計要求是所有接受無紙化退稅的企業 (才會在斷點處跳躍) ,儘管梁老師論文中存在不享受無紙化退稅的樣本,但是這部分樣本是不納入 RDD-DID 分析的。
3. stata實例由於梁老師的數據難以獲取,我們生成一份模擬數據,數據存在一定的簡化。具體數據結構為 60 個體 * 3 年 * 6 個月, 共 1080 個觀測值的平衡面板數據,其中我們遵循原文設定,以 2017 年的 9 月為政策衝擊年份
首先生成樣本
// 設定 60 個觀測值,設定隨機數種子 clear all brow set obs 60 set seed 10101 gen id = _n //每一個數值的數量擴大 3 倍,生成 60*3 = 180,為 60 個個體 3 年的面板數據 expand 3 sort id count bys id: gen year = _n+2014 //由於 RDD 的帶寬為 3 個月,因此每個樣本每年需要擴大 6 倍,即 180*6 = 1080 ,為 60 個個體 3 年 6 個月份的數據 expand 6 sort id year count bys id year: gen month= _n+5 // 生成協變量 x1,x2 gen x1 = rnormal(1,7) gen x2 = rnormal(2,5) // 生成固定效應 * 個體固定效應 sort year month id bys year month: gen ID = _n sort ID * 年份固定效應 sort id month year bys id month: gen Y = _n sort Y * 月份固定效應 sort id year month bys id year: gen M = _n sort M // 生成 YPost MPost變量,以 2017 年 9 月為政策衝擊年份, * 月份跳躍前後的識別,即跳躍前 (6-8月) MPost為 0,跳躍後 (9-11月) MPost為 1 gen MPost = 0 replace MPost = 1 if month >= 9 tab month MPost //從下表可以看出,我們的月份和MPost的關係設定正確 | MPost month | 0 1 | Total -+--+ 6 | 180 0 | 180 7 | 180 0 | 180 8 | 180 0 | 180 9 | 0 180 | 180 10 | 0 180 | 180 11 | 0 180 | 180 -+--+ Total | 540 540 | 1,080 * 年份識別變量,政策於 2017 年出臺,出臺前 YPost 為 0,出臺當年 YPost 為 1 gen YPost = 0 replace YPost = 1 if year == 2017 tab year YPost //從下表可以看出,我們的年份和YPost的關係設定正確 | YPost year | 0 1 | Total -+--+ 2015 | 360 0 | 360 2016 | 360 0 | 360 2017 | 0 360 | 360 -+--+ Total | 720 360 | 1,080 save RD_DID_sample.dta //我們將這些基礎信息保存為一個數據文件我們首先觀察處理組 ( 2017 年) 和對照組 ( 2015 年、 2016 年) ,在 9 月前後的跳躍變化(即上文中提到第一個 Dif ),由於 RDD-DID 允許出現協變量引發的變化 (系統性差異的存在),因此我們在此允許 x1 和 x2 在 9 月前後發生變化。
首先,我們觀察對照組 ( 2015年、 2016 年)在斷點 ( 9 月) 前後的變換。
use RD_DID_sample.dta, clear // 生成被解釋變量 // 由於 RDD-DID 允許出現協變量引發的變化,因此我們在此允許 x1 在 9 月後增加 1 個單位,x2 在 9 月後增加 2 個單位。 bys id year: gen y0 = 10 + 5*x1 +3*x2 + rnormal() if MPost==0 & YPost==0 bys id year: replace y0 = 10 + 5*(x1+1) +3*(x2+2) + rnormal() if MPost==1 & YPost==0 save RD_DID_sample.dta,replace從上述 y0 的設定可以看出,我們應該觀測到 9 月前後跳躍了 11 個單位(5 * 1 + 3 * 2 = 11),其中包括 x1 增加一個單位引發的變化 5 和 x2 增加一個單位引發的變化 6 。
use RD_DID_sample.dta, clear areg y0 MPost x1 x2 i.M i.year if YPost==0, ab(ID ) vce(robust) //從回歸結果可以看出,MPost的係數為10.848,接近11 note: 6.M omitted because of collinearity Linear regression, absorbing indicators Number of obs = 720 Absorbed variable: ID No. of categories = 60 F(8, 652) = 138753.76 Prob > F = 0.0000 R-squared = 0.9994 Adj R-squared = 0.9994 Root MSE = 0.9851 ---- | Robust y0 | Coef. Std. Err. t P>|t| [95% Conf. Interval] --+- MPost | 10.84842 .1233064 87.98 0.000 10.6063 11.09055 x1 | 5.007873 .0051366 974.94 0.000 4.997787 5.017959 x2 | 2.993566 .0075459 396.72 0.000 2.978748 3.008383 | M | 2 | -.1385908 .1215393 -1.14 0.255 -.3772466 .100065 3 | -.1391771 .1374009 -1.01 0.311 -.4089787 .1306246 4 | .0192871 .125654 0.15 0.878 -.2274483 .2660225 5 | .0274213 .1198433 0.23 0.819 -.2079042 .2627467 6 | 0 (omitted) | year | 2016 | -.098825 .0734967 -1.34 0.179 -.2431439 .0454938 | _cons | 10.17572 .0990673 102.72 0.000 9.981186 10.37025 ----其次,我們觀察處理組 (2017 年) 在斷點 (9 月) 前後的變換。
use RD_DID_sample.dta, clear // 生成被解釋變量 // 由於 RDD-DID 允許出現協變量引發的變化,因此我們在此允許 x1 在 9 月後增加 1 個單位,x2 在 9 月後增加 2 個單位。此外,政策衝擊導致 Y 增加 5 個單位, bys id year: gen y1 = 10 + 5*x1 +3*x2 +rnormal() if MPost==0 & YPost==1 bys id year: replace y1 = 10 + 5 + 5*(x1+1) +3*(x2+2) +rnormal() if MPost==1 & YPost==1 save RD_DID_sample.dta,replace從上述 y0 的設定可以看出,我們應該觀測到 9 月前後跳躍了 11 個單位(5 * 1 + 3 * 2 + 5 = 16),其中包括 x1 增加一個單位引發的變化 5 和 x2 增加一個單位引發的變化 6 ,以及政策衝擊導致的 5 。
areg y1 MPost x1 x2 i.M if YPost==1, ab(ID ) vce(r) //下表可以看出,MPost的係數為15.914,接近16 note: 6.M omitted because of collinearity Linear regression, absorbing indicators Number of obs = 360 Absorbed variable: ID No. of categories = 60 F( 7, 293) = 57048.35 Prob > F = 0.0000 R-squared = 0.9994 Adj R-squared = 0.9993 Root MSE = 1.0256 ---- | Robust y1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] --+- MPost | 15.91433 .1878629 84.71 0.000 15.5446 16.28406 x1 | 5.010561 .0086649 578.26 0.000 4.993508 5.027614 x2 | 2.996086 .0114469 261.74 0.000 2.973557 3.018614 | M | 2 | -.0627951 .2038922 -0.31 0.758 -.464074 .3384838 3 | .0912909 .2006643 0.45 0.649 -.3036352 .4862169 4 | -.1209243 .1728636 -0.70 0.485 -.4611359 .2192873 5 | .2545042 .1729513 1.47 0.142 -.0858801 .5948885 6 | 0 (omitted) | _cons | 9.947508 .147951 67.24 0.000 9.656327 10.23869 ----我們知道,政策真實的處理效應為 5 , 但是如果僅僅針對政策當年使用斷點識別,我們估計的處理效應為 16, 這是由於衝擊時點前後 y 存在系統性差異 (11 =5 * 1 + 3 * 2 ) 導致的。
所以,我們可以通過用估計的處理效應 16 減去利用之前年份估計出的衝擊前後的系統性差異 11 ( 即 x1 增加一個單位引發的變化 5 和 x2 增加一個單位引發的變化 6 ,合計 11)得到真實的處理效應 5 ( 即 Dif-Dif ),這個可以通過構造交互項 YPost*MPost 實現 (類似於 DID 研究設定中的 Treat*Post ,其中 YPost 類比為 Treat , MPost 類比為 Post ,但是時間前後的差異是利用斷點方法識別而非差分方法) 。
use RD_DID_sample.dta, clear gen y = y0 if YPost==0 replace y = y1 if YPost==1 gen YPost_MPost = YPost*MPost areg y MPost YPost_MPost x1 x2 c.x1#i.MPost c.x2#i.MPost i.M i.Y , ab(ID ) vce(r) // YPost_MPost係數是我們關注的核心,類似於 DID 研究中的 Treat*Post,約等於 5 ,說明捕捉到了真實的改革處理效果 note: 6.M omitted because of collinearity Linear regression, absorbing indicators Number of obs = 1,080 Absorbed variable: ID No. of categories = 60 F( 12, 1008) = 131182.72 Prob > F = 0.0000 R-squared = 0.9994 Adj R-squared = 0.9993 Root MSE = 0.9956 | Robust y | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---+- MPost | 10.90144 .1133312 96.19 0.000 10.67905 11.12383 YPost_MPost | 5.01466 .1302858 38.49 0.000 4.758997 5.270322 x1 | 5.016943 .006198 809.45 0.000 5.00478 5.029105 x2 | 2.998538 .0092015 325.88 0.000 2.980482 3.016594 | MPost#c.x1 | 1 | -.0229563 .0088027 -2.61 0.009 -.04023 -.0056827 | MPost#c.x2 | 1 | -.004164 .0119499 -0.35 0.728 -.0276135 .0192855 | M | 2 | -.1182666 .1045555 -1.13 0.258 -.323438 .0869048 3 | -.0688265 .1112079 -0.62 0.536 -.287052 .149399 4 | -.0321119 .1033496 -0.31 0.756 -.2349169 .1706931 5 | .0923329 .0985065 0.94 0.349 -.1009684 .2856342 6 | 0 (omitted) | Y | 2 | -.0941455 .0734446 -1.28 0.200 -.2382673 .0499764 3 | -.1257474 .1056452 -1.19 0.234 -.333057 .0815623 | _cons | 10.12667 .090287 112.16 0.000 9.949501 10.30384
4. 參考資料參考文獻:
陳曉光.財政壓力、稅收徵管與地區不平等[J].中國社會科學,2016(04):53-70+206. -PDF-
範子英,趙仁傑.法治強化能夠促進汙染治理嗎?——來自環保法庭設立的證據[J].經濟研究,2019,54(03):21-37. -PDF-
李廣眾,賈凡勝.財政層級改革與稅收徵管激勵重構——以財政「省直管縣」改革為自然實驗的研究[J].管理世界,2020,36(08):32-50. -PDF-
梁平漢,鄒偉,胡超.時間就是金錢:退稅無紙化改革、行政負擔與企業出口[J].世界經濟,2020,43(10):52-73. -PDF-
Chen Y , Shi S , Tang Y . Valuing the urban hukou in China: Evidence from a regression discontinuity design for housing prices[J]. Journal of Development Economics, 2019, 141. -PDF-
Dell, M. 「The Persistent Effects of Peru's Mining Mita.」 Econometrica 78, no. 6 (2010): 1863-1903. -PDF-
Ebenstein A , Fan M , Greenstone M , et al. New evidence on the impact of sustained exposure to air pollution on life expectancy from China's Huai River Policy[J]. Proceedings of the National Academy of Sciences of the United States of America, 2017, 114(39). -PDF-
Fu, S. and Gu, Y,. 2017, Highway Toll and Air Pollution: Evidence from Chinese Cities, Journal of EnvironmentalEconomics and Management 83, 32-49-PDF-
He G , Wang S , Zhang B . Watering Down Environmental Regulation in China*[J]. Quarterly Journal of Economics, 2020, 135(4):2135-2185. -PDF-
Persson P , Rossin-Slater M . When Dad Can Stay Home: Fathers' Workplace Flexibility and Maternal Health[J]. Social Science Electronic Publishing. -PDF-
Thistlethwaite, D. L., & Campbell, D. T. (1960).Regression-discontinuity analysis: An alternative to the ex post facto experiment. Journal of Educational Psychology, 51(6), 309–317. -PDF-
5. 相關推文Note:產生如下推文列表的 Stata 命令為: lianxh DID 差分 安裝最新版 lianxh 命令: ssc install lianxh, replace
Stata:平行趨勢不滿足?主成分DID來幫你!- pcdidStata倍分法新趨勢:did2s-兩階段雙重差分模型Stata-DID:不同處理時點不同持久期的倍分法(flexpaneldid)多期DID文獻解讀:含鉛汽油與死亡率和社會成本-L113DIDM:多期多個體倍分法-did_multiplegt考慮溢出效應的倍分法:spillover-robust DID長差分:Long Difference及Acemoglu AER論文推介Big Bad Banks:多期 DID 經典論文介紹倍分法DID詳解 (二):多時點 DID (漸進DID)倍分法DID詳解 (三):多時點 DID (漸進DID) 的進一步分析Abadie新作:簡明IV,DID,RDD教程和綜述
New! Stata 搜索神器:lianxh 和 songbl GIF 動圖介紹搜: 推文、數據分享、期刊論文、重現代碼 …… 👉 安裝: . ssc install lianxh . ssc install songbl 👉 使用: . lianxh DID 倍分法 . songbl all
🍏 關於我們直通車: 👉【百度一下: 連享會】即可直達連享會主頁。亦可進一步添加 「知乎」,「b 站」,「面板數據」,「公開課」 等關鍵詞細化搜索。