
Bandwidth Sensitivity Simulation for Multivariate Regression Discontinuity
mrd_sens_bw.Rdmrd_sens_bw refits the supplied model with varying bandwidths. 
All other aspects of the model are held constant.
Usage
mrd_sens_bw(object, approach = c("center", "univ1", "univ2"), bws)Arguments
- object
 An object returned by
mrd_estormrd_impute.- approach
 A string of the approaches to be refitted, choosing from
c("center", "univ1", "univ2").- bws
 A positive numeric vector of the bandwidths for refitting an
mrdobject.
Value
mrd_sens_bw returns a dataframe containing the estimate est
and standard error se
for each supplied bandwidth and for the Imbens-Kalyanaraman (2012) optimal bandwidth, bw, 
  and for each supplied approach, model. Approaches are either user
  specified ("usr") or based on the optimal bandwidth ("origin").
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_bw(mrd, approach = "univ1", bws = seq(0.1, 1, length.out = 3))
#>            bw       est         se        model
#> Usr  0.100000  9.752709 0.34105420    univ1-usr
#> Usr1 0.550000 10.276529 0.13111027    univ1-usr
#> Usr2 1.000000 10.272710 0.09749180    univ1-usr
#> Opt  0.954053 10.273433 0.09980858 univ1-origin