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 (2015a).
Calonico, Cattaneo and Titiunik (2015b) provides an introduction to this command. For a review on RD methods see Imbens and Lemieux (2008), Lee and Lemieux (2010), 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 (2014b).rdplot(y, x, 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,...)
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