Cutoff Sensitivity Simulation for Multivariate Regression Discontinuity
mrd_sens_cutoff.Rd
mrd_sens_cutoff
refits the supplied model with varying cutoff(s).
All other aspects of the model, such as the automatically calculated bandwidth, are held constant.
Arguments
- object
An object returned by
mrd_est
ormrd_impute
.- cutoffs
A two-column numeric matrix of paired cutoff values to be used for refitting an
mrd
object. The first column corresponds to cutoffs forx1
and the second column corresponds to cutoffs forx2
.
Value
mrd_sens_cutoff
returns a dataframe containing the estimate est
and standard error se
for each pair of cutoffs (A1
and A2
) and for each model
. A1
contains varying cutoffs
for assignment 1 and A2
contains varying cutoffs for assignment 2.
The model
column contains the approach (either centering, univariate 1, or univariate 2)
for determining the cutoff and the parametric model (linear, quadratic, or cubic) or
non-parametric bandwidth setting (Imbens-Kalyanaraman 2012 optimal, half, or double) used for estimation.
References
Imbens, G., Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. The Review of Economic Studies, 79(3), 933-959. https://academic.oup.com/restud/article/79/3/933/1533189.
Examples
set.seed(12345)
x1 <- runif(10000, -1, 1)
x2 <- rnorm(10000, 10, 2)
cov <- rnorm(10000)
y <- 3 + 2 * x1 + 1 * x2 + 3 * cov + 10 * (x1 >= 0) + 5 * (x2 >= 10) + rnorm(10000)
# front.bw arugment was supplied to speed up the example
# users should choose appropriate values for front.bw
mrd <- mrd_est(y ~ x1 + x2 | cov,
cutpoint = c(0, 10), t.design = c("geq", "geq"), front.bw = c(1,1,1))
#> [1] "Cross validation failed. `front.bw` = 1 is used."
mrd_sens_cutoff(mrd, expand.grid(A1 = seq(-.5, .5, length.out = 3), A2 = 10))
#> est se A1 A2 model
#> 1 6.95960998 0.13786944 -0.5 10 center-linear
#> 2 3.00575623 0.21572023 -0.5 10 center-quadratic
#> 3 -0.21231962 0.26526084 -0.5 10 center-cubic
#> 4 -0.92748089 0.13612196 -0.5 10 center-optimal
#> 5 0.05202040 0.16425282 -0.5 10 center-half
#> 6 1.68721464 0.13136295 -0.5 10 center-double
#> 7 0.02819732 0.13248606 -0.5 10 univ1-linear
#> 8 -3.75824436 0.18275167 -0.5 10 univ1-quadratic
#> 9 -2.24581168 0.22721377 -0.5 10 univ1-cubic
#> 10 -2.51926512 0.13213779 -0.5 10 univ1-optimal
#> 11 -0.13664808 0.13565101 -0.5 10 univ1-half
#> 12 -0.86171375 0.12179717 -0.5 10 univ1-double
#> 13 4.94565650 0.06902187 -0.5 10 univ2-linear
#> 14 5.01238219 0.09432219 -0.5 10 univ2-quadratic
#> 15 5.02286244 0.11800467 -0.5 10 univ2-cubic
#> 16 5.16752668 0.15212404 -0.5 10 univ2-optimal
#> 17 5.19771158 0.21228981 -0.5 10 univ2-half
#> 18 5.06448581 0.10875125 -0.5 10 univ2-double
#> 19 10.60052628 0.09488902 0.0 10 center-linear
#> 20 10.12169850 0.13116766 0.0 10 center-quadratic
#> 21 9.45358658 0.15969335 0.0 10 center-cubic
#> 22 8.93776167 0.11518420 0.0 10 center-optimal
#> 23 8.83105180 0.14414457 0.0 10 center-half
#> 24 9.70813696 0.10270094 0.0 10 center-double
#> 25 10.26123674 0.08827208 0.0 10 univ1-linear
#> 26 10.28952613 0.13232920 0.0 10 univ1-quadratic
#> 27 10.29165640 0.17768094 0.0 10 univ1-cubic
#> 28 10.27343289 0.09980858 0.0 10 univ1-optimal
#> 29 10.28589835 0.14127099 0.0 10 univ1-half
#> 30 10.26505109 0.08955973 0.0 10 univ1-double
#> 31 5.03604632 0.05378180 0.0 10 univ2-linear
#> 32 5.04040739 0.07351176 0.0 10 univ2-quadratic
#> 33 5.05409586 0.09171934 0.0 10 univ2-cubic
#> 34 5.18629410 0.11282390 0.0 10 univ2-optimal
#> 35 5.20391856 0.15646532 0.0 10 univ2-half
#> 36 5.08593127 0.08292775 0.0 10 univ2-double
#> 37 2.44882129 0.16649023 0.5 10 center-linear
#> 38 0.59246616 0.22802807 0.5 10 center-quadratic
#> 39 1.77025324 0.28785194 0.5 10 center-cubic
#> 40 0.85065744 0.21130676 0.5 10 center-optimal
#> 41 1.33412309 0.27947827 0.5 10 center-half
#> 42 1.97035261 0.17624256 0.5 10 center-double
#> 43 -0.18285458 0.13425775 0.5 10 univ1-linear
#> 44 -4.03963789 0.19056163 0.5 10 univ1-quadratic
#> 45 -2.16544269 0.23690859 0.5 10 univ1-cubic
#> 46 -2.71891448 0.13753249 0.5 10 univ1-optimal
#> 47 -0.17873188 0.14350933 0.5 10 univ1-half
#> 48 -1.08744891 0.12386656 0.5 10 univ1-double
#> 49 4.77625325 0.21420147 0.5 10 univ2-linear
#> 50 4.39146766 0.29012020 0.5 10 univ2-quadratic
#> 51 4.37504187 0.36398709 0.5 10 univ2-cubic
#> 52 4.43335515 0.44869162 0.5 10 univ2-optimal
#> 53 4.10596344 0.63708603 0.5 10 univ2-half
#> 54 4.42550363 0.32749730 0.5 10 univ2-double
#> 55 10.60052628 0.09488902 0.0 10 center-linear
#> 56 10.12169850 0.13116766 0.0 10 center-quadratic
#> 57 9.45358658 0.15969335 0.0 10 center-cubic
#> 58 8.93776167 0.11518420 0.0 10 center-optimal
#> 59 8.83105180 0.14414457 0.0 10 center-half
#> 60 9.70813696 0.10270094 0.0 10 center-double
#> 61 10.26123674 0.08827208 0.0 10 univ1-linear
#> 62 10.28952613 0.13232920 0.0 10 univ1-quadratic
#> 63 10.29165640 0.17768094 0.0 10 univ1-cubic
#> 64 10.27343289 0.09980858 0.0 10 univ1-optimal
#> 65 10.28589835 0.14127099 0.0 10 univ1-half
#> 66 10.26505109 0.08955973 0.0 10 univ1-double
#> 67 5.03604632 0.05378180 0.0 10 univ2-linear
#> 68 5.04040739 0.07351176 0.0 10 univ2-quadratic
#> 69 5.05409586 0.09171934 0.0 10 univ2-cubic
#> 70 5.03608806 0.06003164 0.0 10 univ2-optimal
#> 71 5.06505345 0.07681182 0.0 10 univ2-half
#> 72 5.03731119 0.05471451 0.0 10 univ2-double