rdplot
implements several data-driven Regression Discontinuity (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, and (ii) RD plots with binned sample means mimicking the underlying variability of the data. For technical and methodological details see Calonico, Cattaneo and Titiunik (2015a).
Companion commands are: rdrobust
for point estimation and inference procedures, and rdbwselect
for data-driven bandwidth selection.
A detailed introduction to this command is given in Calonico, Cattaneo and Titiunik (2015b) and Calonico, Cattaneo, Farrell and Titiunik (2016). A companion Stata
package is described in Calonico, Cattaneo and Titiunik (2014).
For more details, and related Stata and R packages useful for analysis of RD designs, visit rdplot(y, x, subset = NULL, c = 0, p = 4, nbins = NULL, binselect = "esmv", scale = NULL,
kernel = "uni", h = NULL, hide = FALSE, ci = NULL, shade = 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,...)
rdbwselect
, rdrobust
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