rdbwselect_2014
is a deprecated command implementing three bandwidth selectors for local polynomial Regression Discontinuity (RD) point estimators and inference procedures, as described in Calonico, Cattaneo and Titiunik (2014).
This command is no longer supported or updated, and it is made available only for backward compatibility purposes. Please use rdbwselect
instead.
The latest version of the rdrobust package includes the following commands:
rdrobust
for point estimation and inference procedures.
rdbwselect
for data-driven bandwidth selection.
rdplot
for data-driven RD plots.
For more details, and related Stata and R packages useful for analysis of RD designs, visit https://sites.google.com/site/rdpackages/
rdbwselect_2014(y, x, subset = NULL, c = 0, p = 1, q = 2, deriv = 0,
rho = NULL, kernel = "tri", bwselect = "CCT", scaleregul = 1,
delta = 0.5, cvgrid_min = NULL, cvgrid_max = NULL,
cvgrid_length = NULL, cvplot = FALSE, vce = "nn", matches = 3,
all = FALSE, precalc = TRUE )
is the dependent variable.
is the running variable (a.k.a. score or forcing variable).
an optional vector specifying a subset of observations to be used.
specifies the RD cutoff in x
; default is c = 0
.
specifies the order of the local-polynomial used to construct the point-estimator; default is p = 1
(local linear regression).
specifies the order of the local-polynomial used to construct the bias-correction; default is q = 2
(local quadratic regression).
specifies the order of the derivative of the regression function to be estimated; default is deriv = 0
(Sharp RD, or Fuzzy RD if fuzzy
is also specified). Setting it equal to 1 results in estimation of a Kink RD design (or Fuzzy Kink RD if fuzzy
is also specified).
if specified, sets the pilot bandwidth b
equal to h/rho
, where h
is computed using the method and options chosen below.
is the kernel function used to construct the local-polynomial estimator(s). Options are triangular
(default option), epanechnikov
and uniform
.
selects the bandwidth selection procedure to be used. By default it computes both h
and b
, unless rho
is specified, in which case it only computes h
and sets b
= h/rho
. Options are:
CCT
for bandwidth selector proposed by Calonico, Cattaneo and Titiunik (2014) (default option).
IK
for bandwidth selector proposed by Imbens and Kalyanaraman (2012) (only available for Sharp RD design).
CV
for cross-validation method proposded by Ludwig and Miller (2007) (only available for Sharp RD design).
specifies scaling factor for the regularization terms of CCT
and IK
bandwidth selectors. Setting scaleregul = 0
removes the regularization term from the bandwidth selectors; default is scaleregul = 1
.
sets the quantile that defines the sample used in the cross-validation procedure. This option is used only if bwselect(CV)
is specified; default is delta = 0.5
, that is, the median of the control and treated samples.
sets the minimum value of the bandwidth grid used in the cross-validation procedure. This option is used only if bwselect = "CV"
is specified.
sets the maximum value of the bandwidth grid used in the cross-validation procedure. This option is used only if bwselect = "CV"
is specified.
sets the bin length of the (evenly-spaced) bandwidth grid used in the cross-validation procedure. This option is used only if bwselect = "CV"
is specified.
generates a graph of the CV objective function. This option is used only if bwselect = "CV"
is specified.
specifies the procedure used to compute the variance-covariance matrix estimator. This option is used only if CCT
or IK
bankdwith procedures are employed. Options are:
nn
for nearest-neighbor matches residuals using matches
number of matches. This is the default option (with matches = 3
, see below).
resid
for estimated plug-in residuals using h
bandwidth.
specifies the number of matches in the nearest-neighbor based variance-covariance matrix estimator. This options is used only when nearest-neighbor matches residuals are employed; default is matches = 3
.
if specified, rdbwselect_2014
reports three different procedures:
CCT
for bandwidth selector proposed by Calonico, Cattaneo and Titiunik (2014).
IK
for bandwidth selector proposed by Imbens and Kalyanaraman (2012).
CV
for cross-validation method proposed by Ludwig and Miller (2007).
internal option.
matrix containing the estimated bandwidths for each selected procedure.
bandwidth selection procedure employed.
kernel function used to construct the local-polynomial estimator(s).
order of the local-polynomial used to construct the point-estimator.
order of the local-polynomial used to construct the bias-correction estimator.
Calonico, S., Cattaneo, M. D., and R. Titiunik. 2014. Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs. Econometrica 82(6): 2295-2326, November 2014. .
x<-runif(1000,-1,1)
y<-5+3*x+2*(x>=0)+rnorm(1000)
rdbwselect_2014(y,x)
Run the code above in your browser using DataLab