Learn R Programming

rdrobust (version 0.98)

rdbwselect: Bandwidth Selection Procedures for Local Polynomial Regression Discontinuity Estimators

Description

rdbwselect implements bandwidth selectors for local polynomial Regression Discontinuity (RD) point estimators and inference procedures developed in Calonico, Cattaneo and Titiunik (2014a), Calonico, Cattaneo and Farrell (2017), and Calonico, Cattaneo, Farrell and Titiunik (2016).

Companion commands are: rdrobust for point estimation and inference procedures, and rdplot for data-driven RD plots (see Calonico, Cattaneo and Titiunik (2015a) for details).

A detailed introduction to this command is given in Calonico, Cattaneo and Titiunik (2015b) and Calonico, Cattaneo, Farrell and Titiunik (2017). A companion Stata package is described in Calonico, Cattaneo and Titiunik (2014b).

For more details, and related Stata and R packages useful for analysis of RD designs, visit https://sites.google.com/site/rdpackages/

Usage

rdbwselect(y, x, c = NULL,  fuzzy = NULL, deriv = NULL, p = NULL, q = NULL, covs = NULL,  
              kernel = "tri", weights = NULL, bwselect = "mserd", 
              vce = "nn",  cluster = NULL, nnmatch = 3, 
              scaleregul = 1, sharpbw = FALSE, all = NULL, subset = NULL)

Arguments

y

is the dependent variable.

x

is the running variable (a.k.a. score or forcing variable).

c

specifies the RD cutoff in x; default is c = 0.

fuzzy

specifies the treatment status variable used to implement fuzzy RD estimation (or Fuzzy Kink RD if deriv=1 is also specified). Default is Sharp RD design and hence this option is not used.

deriv

specifies the order of the derivative of the regression functions to be estimated. Default is deriv=0 (for Sharp RD, or for 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.

p

specifies the order of the local-polynomial used to construct the point-estimator; default is p = 1 (local linear regression).

q

specifies the order of the local-polynomial used to construct the bias-correction; default is q = 2 (local quadratic regression).

covs

specifies additional covariates to be used for estimation and inference.

kernel

is the kernel function used to construct the local-polynomial estimator(s). Options are triangular (default option), epanechnikov and uniform.

weights

is the variable used for optional weighting of the estimation procedure. The unit-specific weights multiply the kernel function.

bwselect

specifies the bandwidth selection procedure to be used. Options are:

mserd one common MSE-optimal bandwidth selector for the RD treatment effect estimator.

msetwo two different MSE-optimal bandwidth selectors (below and above the cutoff) for the RD treatment effect estimator.

msesum one common MSE-optimal bandwidth selector for the sum of regression estimates (as opposed to difference thereof).

msecomb1 for min(mserd,msesum).

msecomb2 for median(msetwo,mserd,msesum), for each side of the cutoff separately.

cerrd one common CER-optimal bandwidth selector for the RD treatment effect estimator.

certwo two different CER-optimal bandwidth selectors (below and above the cutoff) for the RD treatment effect estimator.

cersum one common CER-optimal bandwidth selector for the sum of regression estimates (as opposed to difference thereof).

cercomb1 for min(cerrd,cersum).

cercomb2 for median(certwo,cerrd,cersum), for each side of the cutoff separately.

Note: MSE = Mean Square Error; CER = Coverage Error Rate. Default is bwselect=mserd. For details on implementation see Calonico, Cattaneo and Titiunik (2014a), Calonico, Cattaneo and Farrell (2017), and Calonico, Cattaneo, Farrell and Titiunik (2016), and the companion software articles.

vce

specifies the procedure used to compute the variance-covariance matrix estimator. Options are:

nn for heteroskedasticity-robust nearest neighbor variance estimator with nnmatch the (minimum) number of neighbors to be used.

hc0 for heteroskedasticity-robust plug-in residuals variance estimator without weights.

hc1 for heteroskedasticity-robust plug-in residuals variance estimator with hc1 weights.

hc2 for heteroskedasticity-robust plug-in residuals variance estimator with hc2 weights.

hc3 for heteroskedasticity-robust plug-in residuals variance estimator with hc3 weights.

Default is vce=nn.

cluster

indicates the cluster ID variable used for cluster-robust variance estimation with degrees-of-freedom weights. By default it is combined with vce=nn for cluster-robust nearest neighbor variance estimation. Another option is plug-in residuals combined with vce=hc0.

nnmatch

to be combined with for vce=nn for heteroskedasticity-robust nearest neighbor variance estimator with nnmatch indicating the minimum number of neighbors to be used. Default is nnmatch=3

scaleregul

specifies scaling factor for the regularization term added to the denominator of the bandwidth selectors. Setting scaleregul = 0 removes the regularization term from the bandwidth selectors; default is scaleregul = 1.

sharpbw

option to perform fuzzy RD estimation 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.

all

if specified, rdbwselect reports all available bandwidth selection procedures.

subset

an optional vector specifying a subset of observations to be used.

Value

N

vector with sample sizes to the left and to the righst of the cutoff.

c

cutoff value.

p

order of the local-polynomial used to construct the point-estimator.

q

order of the local-polynomial used to construct the bias-correction estimator.

bws

matrix containing the estimated bandwidths for each selected procedure.

bwselect

bandwidth selection procedure employed.

kernel

kernel function used to construct the local-polynomial estimator(s).

References

Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2017. On the Effect of Bias Estimation on Coverage Accuracy in Nonparametric Inference. Journal of the American Statistical Association, forthcoming.

Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2017. rdrobust: Software for Regression Discontinuity Designs. Stata Journal, forthcoming.

Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2016. Regression Discontinuity Designs using Covariates. Working Paper.

Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014a. Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs. Econometrica 82(6): 2295-2326.

Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014b. Robust Data-Driven Inference in the Regression-Discontinuity Design. Stata Journal 14(4): 909-946.

Calonico, S., M. D. Cattaneo, and R. Titiunik. 2015a. Optimal Data-Driven Regression Discontinuity Plots. Journal of the American Statistical Association 110(512): 1753-1769.

Calonico, S., M. D. Cattaneo, and R. Titiunik. 2015b. rdrobust: An R Package for Robust Nonparametric Inference in Regression-Discontinuity Designs. R Journal 7(1): 38-51.

Cattaneo, M. D., B. Frandsen, and R. Titiunik. 2015. Randomization Inference in the Regression Discontinuity Design: An Application to the Study of Party Advantages in the U.S. Senate. Journal of Causal Inference 3(1): 1-24.

See Also

rdrobust, rdplot

Examples

Run this code
x<-runif(1000,-1,1)
y<-5+3*x+2*(x>=0)+rnorm(1000)
rdbwselect(y,x)

Run the code above in your browser using DataLab