rdrobust
implements local polynomial Regression Discontinuity (RD) point estimators with robust bias-corrected confidence intervals and inference procedures developed in Calonico, Cattaneo and Titiunik (2014a), Calonico, Cattaneo and Farrell (2017), and Calonico, Cattaneo, Farrell and Titiunik (2016). It also computes alternative estimation and inference procedures available in the literature.
Companion commands are: rdbwselect
for data-driven bandwidth selection, 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/
rdrobust(y, x, c = NULL, fuzzy = NULL, deriv = NULL, p = NULL, q = NULL,
h = NULL, b = NULL, rho = NULL, covs = NULL, kernel = "tri",
weights = NULL, bwselect = "mserd", vce = "nn", cluster = NULL,
nnmatch = 3, level = 95, scalepar = 1, scaleregul = 1,
sharpbw = FALSE, all = NULL, subset = NULL)
is the dependent variable.
is the running variable (a.k.a. score or forcing variable).
specifies the RD cutoff in x
; default is c = 0
.
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.
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.
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 main bandwidth used to construct the RD point estimator. If not specified, bandwidth h
is computed by the companion command rdbwselect
. If two bandwidths are specified, the first bandwidth is used for the data below the cutoff and the second bandwidth is used for the data above the cutoff.
specifies the bias bandwidth used to construct the bias-correction estimator. If not specified, bandwidth b
is computed by the companion command rdbwselect
. If two bandwidths are specified, the first bandwidth is used for the data below the cutoff and the second bandwidth is used for the data above the cutoff.
specifies the value of rho
, so that the bias bandwidth b
equals h/rho
. Default is rho = 1
if h
is specified but b
is not.
specifies additional covariates to be used for estimation and inference.
is the kernel function used to construct the local-polynomial estimator(s). Options are triangular
(default option), epanechnikov
and uniform
.
is the variable used for optional weighting of the estimation procedure. The unit-specific weights multiply the kernel function.
specifies 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
.
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
.
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
.
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
sets the confidence level for confidence intervals; default is level = 95
.
specifies scaling factor for RD parameter of interest. This option is useful when the population parameter of interest involves a known multiplicative factor (e.g., sharp kink RD). Default is scalepar = 1
(no scaling).
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
.
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 cutoff.
if specified, rdrobust
reports three different procedures:
(i) conventional RD estimates with conventional standard errors.
(ii) bias-corrected estimates with conventional standard errors.
(iii) bias-corrected estimates with robust standard errors.
an optional vector specifying a subset of observations to be used.
vector with the sample sizes used to the left and to the right of the cutoff.
vector with the effective sample sizes used to the left and to the right of the cutoff.
cutoff value.
order of the polynomial used for estimation of the regression function.
order of the polynomial used for estimation of the bias of the regression function.
matrix containing the bandwidths used.
conventional local-polynomial RD estimate.
bias-corrected local-polynomial RD estimate.
conventional standard error of the local-polynomial RD estimator.
robust standard error of the local-polynomial RD estimator.
estimated bias for the local-polynomial RD estimator below and above the cutoff.
conventional p-order local-polynomial estimates to the left and to the right of the cutoff.
conventional variance-covariance matrix estimated below and above the cutoff.
robust variance-covariance matrix estimated below and above the cutoff.
vector containing conventional and bias-corrected local-polynomial RD estimates.
vector containing conventional and robust standard errors of the local-polynomial RD estimates.
vector containing the p-values associated with conventional, bias-corrected and robust local-polynomial RD estimates.
matrix containing the confidence intervals associated with conventional, bias-corrected and robust local-polynomial RD estimates.
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.
x<-runif(1000,-1,1)
y<-5+3*x+2*(x>=0)+rnorm(1000)
rdrobust(y,x)
Run the code above in your browser using DataLab