基本設(shè)定
是驅(qū)動(dòng)變量running variable,可以和結(jié)果變量有關(guān)也可以無(wú)關(guān)。
是斷點(diǎn)(cutoff )
是處理變量,處理變量完全依賴于驅(qū)動(dòng)變量:
斷點(diǎn)回歸在斷點(diǎn)鄰域處,樣本是否被處理令花,仿佛被“上帝之手”給控制,成為一個(gè)準(zhǔn)實(shí)驗(yàn)凉倚。
局部平均處理效應(yīng)(local average treatment effect,LATE)
設(shè)定treat和not treat不同的截距()和斜率
兼都;其中截距
就是
基本假設(shè)
- 斷點(diǎn)假設(shè):斷點(diǎn)處個(gè)體被分配的概率存在跳躍
- 連續(xù)性假設(shè):結(jié)果變量與驅(qū)動(dòng)變量之間的關(guān)系在所有點(diǎn)都連續(xù)的
- 局部隨機(jī)化假設(shè):
- 獨(dú)立性假設(shè):潛在結(jié)果和干預(yù)在斷點(diǎn)處獨(dú)立于驅(qū)動(dòng)變量X
精確斷點(diǎn)回歸
定義
在斷點(diǎn)處,個(gè)體得到處理的概率從0跳躍到1
存在兩個(gè)問(wèn)題
- 如果回歸函數(shù)包含高次項(xiàng)稽寒,會(huì)導(dǎo)致遺漏變量偏差
- 斷點(diǎn)回歸是局部的隨機(jī)實(shí)驗(yàn)
兩個(gè)解決方法
- 加入高次項(xiàng)扮碧。
2.限定的取值范圍 (c-h,c+h);這里的h就是帶寬杏糙。
得到下式:
其中為對(duì)
的估計(jì)量慎王,可以使用穩(wěn)健標(biāo)準(zhǔn)誤克服異方差。
令人頭疼的最優(yōu)帶寬——如何求解
h小宏侍,也許會(huì)精確赖淤,但由于點(diǎn)過(guò)少可能方差會(huì)變大
h大,方差也許會(huì)變小谅河,但包含了過(guò)多離較遠(yuǎn)的點(diǎn)導(dǎo)致偏差變大
現(xiàn)在一般流行使用非參數(shù)的方法求最優(yōu)帶寬
其中咱旱,
核函數(shù)求解
其中是核函數(shù)(如三角核)确丢。后面一部分就是一個(gè)殘差;而前面的中括號(hào)就是權(quán)重吐限。局部線性回歸鲜侥,在小臨域內(nèi)進(jìn)行加權(quán)最小二乘,權(quán)重由核函數(shù)決定诸典,離c約近權(quán)重越大描函。
協(xié)變量的選擇
影響y的其他協(xié)變量,好處在于減少擾動(dòng)項(xiàng)方差狐粱。壞處
- 如果內(nèi)生會(huì)干擾估計(jì)
- 如果協(xié)變量也出現(xiàn)跳躍舀寓,則直接出現(xiàn)偏誤,因此通常需要驗(yàn)證協(xié)變量的條件密度函數(shù)是否在斷點(diǎn)跳躍脑奠。
匯報(bào)包括
(1)三角核與矩形核的局部線性回歸結(jié)果
(2)匯報(bào)不同帶寬的結(jié)果基公,最優(yōu)帶寬幅慌,二分之一帶寬宋欺,兩倍
(3)匯報(bào)協(xié)變量和不包含協(xié)變量的情形
(4)檢驗(yàn)?zāi)P驮O(shè)定檢驗(yàn),檢驗(yàn)分組變量與協(xié)變量的條件密度是否在斷點(diǎn)處連續(xù)
模糊斷點(diǎn)回歸
平均處理效應(yīng)
RDD的一般步驟
(1)圖形分析胰伍,
- Y和X關(guān)系圖齿诞,Y和X有沒(méi)有斷點(diǎn)(rdplot),一般是每個(gè)帶寬之間的結(jié)果變量取一個(gè)平均值骂租。
- 協(xié)變量和X關(guān)系圖祷杈,協(xié)變量和X有沒(méi)有斷點(diǎn)。
- 驅(qū)動(dòng)變量X的分布圖渗饮,看其在驅(qū)動(dòng)變量左右有沒(méi)有明顯的跳躍但汞。
(2)因果效應(yīng)估計(jì)
- 邊界非參數(shù)回歸(比較少用)
- 局部線性回歸
*局部多項(xiàng)式回歸
(3)穩(wěn)健性檢驗(yàn):協(xié)變量連續(xù)性檢驗(yàn)(對(duì)每個(gè)協(xié)變量做一下斷點(diǎn)回歸)、參考變量分布連續(xù)性檢驗(yàn)(McCrary)互站、偽斷點(diǎn)回歸(左右?guī)挼闹虚g)私蕾、帶寬敏感性檢驗(yàn)(換不同的帶寬)
軟件實(shí)現(xiàn)
*斷點(diǎn)圖
rdplot depvar runvar [if] [in] [, c(cutoff) p(pvalue) kernel(kernelfn)]
*最優(yōu)帶寬選擇
rdbwselect depvar runvar [if] [in] [, c(cutoff) p(pvalue) q(qvalue) deriv(dvalue) fuzzy(fuzzyvar [sharpbw]) covs(covars) kernel(kernelfn) weights(weightsvar)
bwselect(bwmethod) scaleregul(scaleregulvalue) vce(vcemethod) all]
/*
c(cutoff) specifies the RD cutoff. The default is c(0).
p(pvalue) specifies the order of the local polynomial used to construct the point estimator. The default is p(1) (local linear regression).
q(qvalue) specifies the order of the local polynomial used to construct the bias correction. The default is q(2) (local quadratic regression).
deriv(dvalue) specifies the order of the derivative of the regression functions to be estimated. The default is deriv(0) (sharp RD, or fuzzy RD if fuzzy() is also
specified). Setting deriv(1) results in estimation of a kink RD design (up to scale) or a fuzzy kink RD if fuzzy() is also specified.
fuzzy(fuzzyvar [sharpbw]) specifies the treatment status variable used to implement fuzzy RD estimation (or fuzzy kink RD if deriv(1) is also specified). The
default is sharp RD design. If the sharpbw option is set, the fuzzy RD estimation is performed using a bandwidth selection procedure for the sharp RD model.
This option is automatically selected if there is perfect compliance at either side of the threshold.
covs(covars) specifies additional covariates to be used for estimation and inference.
kernel(kernelfn) specifies the kernel function used to construct the local polynomial estimators. kernelfn may be triangular, epanechnikov, or uniform. The
default is kernel(triangular).
*/
*斷點(diǎn)回歸估計(jì)
rdrobust depvar runvar [if] [in] [, c(cutoff) p(pvalue) q(qvalue) deriv(dvalue) fuzzy(fuzzyvar [sharpbw]) covs(covars) kernel(kernelfn) weights(weightsvar)
h(hvalueL hvalueR) b(bvalueL bvalueR) rho(rhovalue) scalepar(scaleparvalue) bwselect(bwmethod) scaleregul(scaleregulvalue) vce(vcemethod) level(level)
all]
/*
c(cutoff) specifies the RD cutoff. The default is c(0).
p(pvalue) specifies the order of the local polynomial used to construct the point estimator. The default is p(1) (local linear regression).
q(qvalue) specifies the order of the local polynomial used to construct the bias correction. The default is q(2) (local quadratic regression).
deriv(dvalue) specifies the order of the derivative of the regression functions to be estimated. The default is deriv(0) (sharp RD, or fuzzy RD if fuzzy() is also
specified). Setting deriv(1) results in estimation of a kink RD design (up to scale), or fuzzy kink RD if fuzzy() is also specified.
fuzzy(fuzzyvar [sharpbw]) specifies the treatment status variable used to implement fuzzy RD estimation (or fuzzy kink RD if deriv(1) is also specified). The
default is sharp RD design. If the sharpbw option is set, the fuzzy RD estimation is performed using a bandwidth selection procedure for the sharp RD model.
This option is automatically selected if there is perfect compliance at either side of the threshold.
covs(covars) specifies additional covariates to be used for estimation and inference.
kernel(kernelfn) specifies the kernel function used to construct the local polynomial estimators. kernelfn may be triangular, epanechnikov, or uniform. The
default is kernel(triangular).
weights(weightsvar) specifies the variable used for optional weighting of the estimation procedure. The unit-specific weights multiply the kernel function.
h(hvalueL hvalueR) specifies the main bandwidth, h, to be used on the left and on the right of the cutoff, respectively. If only one value is specified, then this
value is used on both sides. If not specified, the bandwidth(s) h is computed by the companion command rdbwselect.
b(bvalueL bvalueR) specifies the bias bandwidth, b, to be used on the left and on the right of the cutoff, respectively. If only one value is specified, then this
value is used on both sides. If not specified, bandwidth(s) b is computed by the companion command rdbwselect.
rho(rhovalue) specifies the value of rho so that the bias bandwidth, b, equals b=h/rho. The default is rho(1) if h is specified but b is not.
scalepar(scaleparvalue) specifies the scaling factor for the RD parameter of interest. This option is useful when the population parameter of interest involves a
known multiplicative factor (for example, sharp kink RD). The default is scalepar(1) (no scaling).
bwselect(bwmethod) specifies the bandwidth selection procedure to be used. By default, it computes both h and b, unless rho is specified, in which case it
computes only the h and sets b=h/rho. For details on implementation, see Calonico, Cattaneo, and Titiunik (2014b); Calonico, Cattaneo, and Farrell
(forthcoming); and Calonico et al. (2016), and the companion software articles. bwmethod may be one of the following:
*/