Learn R Programming

rdrobust (version 0.70)

rdplot: Data-driven Regression Discontinuity Plots

Description

rdplot implements several data-driven RD plots, using either evenly-spaced or quantile-spaced partitioning. Two type of RD plots are constructed: (i) RD plots with binned sample means tracing out the underlying regression function (IMSE-optimal selectors), and (ii) RD plots with binned sample means mimicking the underlying variability of the data. For all technical and methodological details see Calonico, Cattaneo and Titiunik (2014d). Calonico, Cattaneo and Titiunik (2014b) provides an introduction to this command. For a review on RD methods see Imbens and Lemieux (2008), Lee and Lemieux (2010), Dinardo and Lee (2011), Calonico, Cattaneo and Titiunik (2014a), and references therein. For local polynomial inference methods see the commands rdrobust and rdbwselect. A companion Stata package is described in Calonico, Cattaneo and Titiunik (2014c).

Usage

rdplot(y, x, data, subset = NULL, c = 0, p = 4, 
          numbinl = NULL, numbinr = NULL, binselect = "esmv", 
          lowerend = NULL, upperend = NULL, scale = 1, scalel = 1, scaler = 1, 
          hide = FALSE, par=NULL, title = NULL, x.label = NULL, y.label = NULL, 
          x.lim = NULL, y.lim = NULL, col.dots = NULL, col.lines = NULL, type.dots = NULL,
          model = FALSE, frame = FALSE)

Arguments

Value

methodmethod used to compute the optimal number of bins.resultsmatrix containing the main estimation results (sample size, polynomial order, number of bins, scales and bin lengths).coefmatrix containing the coefficients of the $p^{th}$ order global polynomial estimated both sides of the cutoff.

References

Calonico, S., Cattaneo, M. D., and R. Titiunik. 2014a. "Robust Nonparametric Confidence Intervals for Regression-Discontinuity Designs." Econometrica, forthcoming. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2014_ECMA.pdf. Calonico, S., Cattaneo, M. D., and R. Titiunik. 2014b. "rdrobust: An R Package for Robust Inference in Regression-Discontinuity Designs." University of Michigan, Department of Economics. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2014_Rpkg.pdf. Calonico, S., Cattaneo, M. D., and R. Titiunik. 2014c. "Robust Data-Driven Inference in the Regression-Discontinuity Design." University of Michigan, Department of Economics. http://www-personal.umich.edu/~cattaneo/papers/Calonico-Cattaneo-Titiunik_2014_Stata.pdf. Calonico, S., Cattaneo, M. D., and R. Titiunik. 2014d. "Optimal Data-Driven Regression Discontinuity Plots." University of Michigan, Department of Economics. http://www-personal.umich.edu/~cattaneo/papers/RD-rdplot.pdf. Dinardo, J., and D. S. Lee. 2011. "Program Evaluation and Research Designs." In Handbook of Labor Economics, ed. O. Ashenfelter and D. Card, vol. 4A, 463-536. Elsevier Science B.V. Imbens, G., and T. Lemieux. 2008. "Regression Discontinuity Designs: A Guide to Practice." Journal of Econometrics 142(2): 615-635. Lee, D. S., and T. Lemieux. 2010. "Regression Discontinuity Designs in Economics." Journal of Economic Literature 48(2): 281-355.

See Also

rdbwselect, rdrobust

Examples

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

Run the code above in your browser using DataLab