rdmcplot: RD plots with multiple cutoffs.

View source: R/rdmcplot.R

rdmcplotR Documentation

RD plots with multiple cutoffs.

Description

rdmcplot() RD plots with multiple cutoffs.

Usage

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
)

Arguments

Y

outcome variable.

X

running variable.

C

cutoff variable.

nbinsmat

matrix of cutoff-specific number of bins. See rdplot() for details.

binselectvec

vector of cutoff-specific bins selection method. See rdplot() for details.

scalevec

vector of cutoff-specific scale factors. See rdplot() for details.

supportmat

matrix of cutoff-specific support conditions. See rdplot() for details..

pvec

vector of cutoff-specific polynomial orders. See rdplot() for details.

hmat

matrix of cutoff-specific bandwidths. See rdplot() for details.

kernelvec

vector of cutoff-specific kernels. See rdplot() for details.

weightsvec

vector of cutoff-specific weights. See rdplot() for details.

covs_mat

matrix of covariates. See rdplot() for details.

covs_list

list of of covariates to be used in each cutoff.

covs_evalvec

vector indicating the evaluation point for additional covariates. See rdrobust() for details.

covs_dropvec

vector indicating whether collinear covariates should be dropped at each cutoff. See rdrobust() for details.

ci

adds confidence intervals of the specified level to the plot. See rdrobust() for details.

col_bins

vector of colors for bins.

pch_bins

vector of characters (pch) type for bins.

col_poly

vector of colors for polynomial curves.

lty_poly

vector of lty for polynomial curves.

col_xline

vector of colors for vertical lines.

lty_xline

vector of lty for vertical lines.

nobins

omits bins plot.

nopoly

omits polynomial curve plot.

noxline

omits vertical lines indicating the cutoffs.

nodraw

omits plot.

Value

clist

list of cutoffs

cnum

number of cutoffs

X0

matrix of X values for control units

X1

matrix of X values for treated units

Yhat0

estimated polynomial for control units

Yhat1

estimated polynomial for treated units

Xmean

bin average of X values

Ymean

bin average for Y values

CI_l

lower end of confidence intervals

CI_r

upper end of confidence intervals

cfail

Cutoffs where rdrobust() encountered problems

Author(s)

Matias Cattaneo, Princeton University. cattaneo@princeton.edu

Rocio Titiunik, Princeton University. titiunik@princeton.edu

Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquez@econ.ucsb.edu

References

Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal, forthcoming.

Examples

# 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)



rdmulti documentation built on June 22, 2022, 9:07 a.m.