斷點(diǎn)回歸由Thistlewaite and Campbell(1960)首次使用,,但直到1990年代末才引起經(jīng)濟(jì)學(xué)家的重視。Thistlethwaite,、Campbell于1960年首次提出使用斷點(diǎn)回歸設(shè)計研究處理效應(yīng),, 在該文中他們的目的是研究獎學(xué)金對于未來學(xué)業(yè)的影響, 學(xué)生是否獲得獎學(xué)金取決于考試的分?jǐn)?shù)。此后30年, 該方法并未引起學(xué)術(shù)界的重視,,直到1990年以后, 斷點(diǎn)回歸設(shè)計開始被應(yīng)用于各種領(lǐng)域,,并且近年來成為因果分析和政策評估領(lǐng)域最重要的研究方法。
Hahn et al(2001)提供了斷點(diǎn)回歸在計量經(jīng)濟(jì)學(xué)理論基礎(chǔ),。目前,,斷點(diǎn)回歸在教育經(jīng)濟(jì)學(xué)、勞動經(jīng)濟(jì)學(xué),、健康經(jīng)濟(jì)學(xué),、政治經(jīng)濟(jì)學(xué)以及區(qū)域經(jīng)濟(jì)學(xué)的應(yīng)用仍方興未艾。參見Imbens and Lemieux(2008),,Van Der Klaauw(2008)以及Lee and Lemieux(2010)的文獻(xiàn)綜述,。
在進(jìn)行斷點(diǎn)回歸(RD)設(shè)計時,一般需要檢驗(yàn)參考變量分布連續(xù)性檢驗(yàn)/檢驗(yàn)內(nèi)生分組
這里檢驗(yàn)內(nèi)生分組,,即主要檢驗(yàn)配置變量,,其實(shí)就是RD中個體是否將自行進(jìn)入斷點(diǎn)兩側(cè),決定是否進(jìn)入實(shí)驗(yàn)的,,并是否存在某種跳躍性的變化,。如果存在內(nèi)生分組,,個體將自行進(jìn)入實(shí)驗(yàn),導(dǎo)致在斷點(diǎn)兩側(cè)的分布不均勻,,這樣分組變量x的密度函數(shù)f(x)在x=c處不連續(xù),,出現(xiàn)左右極限不相等的情況。
McCrary(2008)提出了一種核密度函數(shù)的檢驗(yàn)方法(命令是DCdensity,,介紹見下述操作),,將參考變量劃分成不同的區(qū)間并計算各區(qū)間中的個體數(shù)量,如果個體能夠操縱參考變量,,我們將能觀測到斷點(diǎn)左右個體數(shù)量有較大差別,比如很多個體通過操縱到了斷點(diǎn)的右側(cè),,那么,,在斷點(diǎn)右側(cè)的區(qū)間中個體數(shù)量可能將大大超過斷點(diǎn)左側(cè)區(qū)間中個體的數(shù)量,利用帶寬選擇和曲線擬合方法,, 可以檢驗(yàn)在斷點(diǎn)處c是否存在跳躍 ,。
案例數(shù)據(jù)
Cattaneo, Frandsen和Titiunik構(gòu)建的數(shù)據(jù)集(2015),其中包括1914-2010年期間美國參議院在任優(yōu)勢的衡量,。
該數(shù)據(jù)包含以下兩個變量的1390個觀察值的數(shù)據(jù)框架,。
其包含兩個變量vote和margin,vote表示某次選舉民主黨在州參議院的席位占比,,margin表示上次選舉中獲得相同參議院席位的邊際收益,,其中大于0表示民主黨勝出,反之則為失敗,。
將vote作為被解釋變量,,margin作為解釋變量,即可研究民主黨贏得參議院席位對于在下次選舉中獲得相同席位的影響,。
1,、繪圖
可以直接使用histogram命令來繪制配置變量的連續(xù)性直方圖
use 'E:\stata\data\rdrobust_rdsenate.dta'
. ed
. desc
Contains data from E:\stata\data\rdrobust_rdsenate.dta
Observations: 1,390
Variables: 2 28 Nov 2012 11:45
-------------------------------------------------------------------------------------------------------------------------------------
Variable Storage Display Value
name type format label Variable label
-------------------------------------------------------------------------------------------------------------------------------------
margin float %9.0g Democratic margin of victory at t (previous election for same seat)
vote float %9.0g Democratic vote share at t+2
-------------------------------------------------------------------------------------------------------------------------------------
Sorted by:
. histogram margin , lcolor ( brown ) fcolor ( gs16 ) title ( 'Senate_selection' ) xtitle ( 'margin' )
(bin=31, start=-100, width=6.4516129)
.
用圖形來觀測斷點(diǎn)處頻數(shù)的變化和斷點(diǎn)兩側(cè)的一個變化情況,它的一個優(yōu)點(diǎn)是簡單直觀,,缺點(diǎn)是由于在不同組間距中間的樣本數(shù)量不同,,因此是很難直觀上觀測連續(xù)性相關(guān)的一個屬性。
結(jié)果為:
通過這個代碼我們可以看見分配變量,,也就是在臨界點(diǎn)處連續(xù)性,,臨界值兩側(cè)沒有明顯的波動,說明分配變量的密度函數(shù)的滿足連續(xù)性
2,、麥克拉瑞檢驗(yàn)
McCrary(2008)可以通過非官方命令DCdensity來實(shí)現(xiàn),,其中DC表示Discontinuity,可以來檢驗(yàn)分組變量的密度函數(shù)在斷點(diǎn)處是否連續(xù),。依此判斷,,是否存在內(nèi)生分組問題,。
該命令的下載地址為:https://eml./~jmccrary/DCdensity/
然后將該命令的DCdensity.ado下載安裝或者復(fù)制到C:\ado\plus,Mac系統(tǒng)的需要自己sysdir查詢外部命令安裝路徑,,自行復(fù)制下載,。命令語法格式為:
DCdensity assign_var,breakpoint(#) generate(Xj Yj r0 fhat se_fhat) graphname(filename)
其中,assign_var 為分組變量,,必選項(xiàng)breakpoint(#)用來指定斷點(diǎn)位置,,generate(Xj Yj r0 fhat se_fhat)用來指定輸出變量名,graphname用來命名指定密度函數(shù)圖,。
代碼為:
DCdensity margin , breakpoint ( 0 ) gen ( Xj Yj r0 fhat se_fhat )
結(jié)果為
. DCdensity margin , breakpoint ( 0 ) gen ( Xj Yj r0 fhat se_fhat )
Using default bin size calculation, bin size = 1.84133021
Using default bandwidth calculation, bandwidth = 25.8493835
Discontinuity estimate (log difference in height): -.100745626
(.117145041)
Performing LLR smoothing.
110 iterations will be performed
...........
可以看出斷點(diǎn)兩側(cè)密度函數(shù)估計值的置信區(qū)間有很大部分重疊,,所以斷點(diǎn)兩側(cè)的密度函數(shù)不存在顯著差異,檢驗(yàn)結(jié)果為不存在內(nèi)生分組,,可以繼續(xù)進(jìn)行斷點(diǎn)回歸分析,。
3、 rdcont 命令
rdcont語法格式為:
rdcont running_var [if] [in], [options]
選項(xiàng)含義為:
options Description
--------------------------------------------------------------------------
Options
alpha(real) specifies critical value for calculation of
optimal bandwidth
threshold(real) specifies cutoff value for the test
qobs(real) specifies # of observations closest to cutoff
------------------------------------------------------------------------
具體表示為:alpha(real) 指定計算最優(yōu)帶寬的臨界值 Threshold (real)指定測試的截止值 qobs(real)指定最接近截止點(diǎn)的觀測值
案例代碼為:
clear
set more off
capture log close
//cd '...' //Change to working directory
log using 'rdcont_example.smcl', replace
********************************************************************************
//Bugni & Canay (2019) RDD Continuity test on Lee(2008)
********************************************************************************
use table_two_final.dta, clear //Loading data
capture program drop rdcont //Installing rdcont program
//Approximate Sign-Test | Bugni & Canay
rdcont difdemshare if use==1
return list
log off
使用上述案例數(shù)據(jù)進(jìn)行操作的代碼為:
rdcont margin , threshold ( 0 )
結(jié)果為
rdcont margin , threshold ( 0 )
RDD non-randomized approximate sign test
Running variable: margin
Cutoff c = 0 | Left of c Right of c Number of obs = 1390
-------------------+---------------------- q = 67
Number of obs | 640 750
Eff. number of obs | 30 37
Eff. neighborhood | -1.347 1.329
-------------------+----------------------
p-value | 0.464
斷點(diǎn)回歸在指定測試的臨界值0處的P值為0.464,,不能拒絕原假設(shè),,說明所以斷點(diǎn)兩側(cè)的密度函數(shù)不存在顯著差異,是連續(xù)的,。
4,、rddensity命令
語法格式為:
rddensity var [if] [in] [, c(#) p(#) q(#) kernel(kernelfn)
fitselect(fitmethod) hl(#) hr(#) hscale(#) bwselect(bwmethod)
vce(vcemethod) all ]
操作1、使用默認(rèn)選項(xiàng)進(jìn)行操作Manipulation test using default options:
rddensity margin
use 'E:\stata\data\rdrobust_rdsenate.dta'
. rddensity margin
Computing data-driven bandwidth selectors.
RD Manipulation Test using local polynomial density estimation.
Cutoff c = 0.000 | Left of c Right of c Number of obs = 1390
----------------------+---------------------- Model = unrestricted
Number of obs | 640 750 BW method = comb
Eff. Number of obs | 408 460 Kernel = triangular
Order loc. poly. (p) | 2 2 VCE method = jackknife
Order BC (q) | 3 3
Bandwidths (hl,hr) | estimated estimated
Bandwidth values | 19.841 27.119
Running variable: margin.
---------------------------------------------
Method | T P>|T|
----------------------+----------------------
Robust Bias-Corrected | -0.8753 0.3814
---------------------------------------------
由于上述穩(wěn)健的偏差校正(bias-corrected )統(tǒng)計量 取值為-0.8753 ,,而其對應(yīng)的概率值為0.3814,。因此接受原假設(shè),認(rèn)為斷點(diǎn)兩側(cè)密度函數(shù)滿足連續(xù)性,。不存在內(nèi)生分組問題,。
操作2、Manipulation test using all three method available:
. rddensity margin, all
結(jié)果為
. rddensity margin, all
Computing data-driven bandwidth selectors.
RD Manipulation Test using local polynomial density estimation.
Cutoff c = 0.000 | Left of c Right of c Number of obs = 1390
----------------------+---------------------- Model = unrestricted
Number of obs | 640 750 BW method = comb
Eff. Number of obs | 408 460 Kernel = triangular
Order loc. poly. (p) | 2 2 VCE method = jackknife
Order BC (q) | 3 3
Bandwidths (hl,hr) | estimated estimated
Bandwidth values | 19.841 27.119
Bandwidth scales | 0.500 0.500
Running variable: margin.
---------------------------------------------
Method | T P>|T|
----------------------+----------------------
Conventional | -1.6506 0.0988
Undersmoothed | -0.8944 0.3711
Robust Bias-Corrected | -0.8753 0.3814
---------------------------------------------