
Bandwidth Sensitivity Simulation for Regression Discontinuity
rd_sens_bw.Rdrd_sens_bw refits the supplied model with varying bandwidths.
All other aspects of the model are held constant.
Arguments
- object
An object returned by
rd_estorrd_impute.- bws
A positive numeric vector of the bandwidths for refitting an
rdobject.
Value
rd_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)
x <- runif(1000, -1, 1)
cov <- rnorm(1000)
y <- 3 + 2 * x + 3 * cov + 10 * (x >= 0) + rnorm(1000)
rd <- rd_est(y ~ x | cov, t.design = "geq")
rd_sens_bw(rd, bws = seq(.1, 1, length.out = 5))
#> bw est se model
#> Usr 0.1000000 9.542498 0.3855296 usr
#> Usr1 0.3250000 9.851057 0.2137608 usr
#> Usr2 0.5500000 9.963613 0.1697730 usr
#> Usr3 0.7750000 10.039427 0.1459733 usr
#> Usr4 1.0000000 10.057096 0.1293339 usr
#> Opt 0.8336036 10.046675 0.1413530 origin