rdmcplot()
RD plots with multiple cutoffs.
rdmcplot(
Y,
X,
C,
nbinsmat = NULL,
binselectvec = NULL,
scalevec = NULL,
supportmat = NULL,
pvec = NULL,
hmat = NULL,
kernelvec = NULL,
weightsvec = NULL,
covs_mat = NULL,
covs_list = NULL,
covs_evalvec = NULL,
covs_dropvec = NULL,
ci = NULL,
col_bins = NULL,
pch_bins = NULL,
col_poly = NULL,
lty_poly = NULL,
col_xline = NULL,
lty_xline = NULL,
nobins = FALSE,
nopoly = FALSE,
noxline = FALSE,
nodraw = FALSE
)
list of cutoffs
number of cutoffs
matrix of X values for control units
matrix of X values for treated units
estimated polynomial for control units
estimated polynomial for treated units
bin average of X values
bin average for Y values
lower end of confidence intervals
upper end of confidence intervals
Cutoffs where rdrobust() encountered problems
outcome variable.
running variable.
cutoff variable.
matrix of cutoff-specific number of bins. See rdplot()
for details.
vector of cutoff-specific bins selection method. See
rdplot()
for details.
vector of cutoff-specific scale factors. See rdplot()
for details.
matrix of cutoff-specific support conditions. See
rdplot()
for details..
vector of cutoff-specific polynomial orders. See rdplot()
for details.
matrix of cutoff-specific bandwidths. See rdplot()
for
details.
vector of cutoff-specific kernels. See rdplot()
for
details.
vector of cutoff-specific weights. See rdplot()
for
details.
matrix of covariates. See rdplot()
for
details.
list of of covariates to be used in each cutoff.
vector indicating the evaluation point for additional
covariates. See rdrobust()
for details.
vector indicating whether collinear covariates should be
dropped at each cutoff. See rdrobust()
for details.
adds confidence intervals of the specified level to the plot. See
rdrobust()
for details.
vector of colors for bins.
vector of characters (pch) type for bins.
vector of colors for polynomial curves.
vector of lty for polynomial curves.
vector of colors for vertical lines.
vector of lty for vertical lines.
omits bins plot.
omits polynomial curve plot.
omits vertical lines indicating the cutoffs.
omits plot.
Matias Cattaneo, Princeton University. cattaneo@princeton.edu
Rocio Titiunik, Princeton University. titiunik@princeton.edu
Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquez@econ.ucsb.edu
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal, forthcoming.
# Toy dataset
X <- runif(1000,0,100)
C <- c(rep(33,500),rep(66,500))
Y <- (1 + X + (X>=C))*(C==33)+(.5 + .5*X + .8*(X>=C))*(C==66) + rnorm(1000)
# rdmcplot with standard syntax
tmp <- rdmcplot(Y,X,C)
Run the code above in your browser using DataLab