rddapp (version 1.3.2)

rd_sens_bw: Bandwidth Sensitivity Simulation for Regression Discontinuity

Description

rd_sens_bw refits the supplied model with varying bandwidths. All other aspects of the model are held constant.

Usage

rd_sens_bw(object, bws)

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").

Arguments

object

An object returned by rd_est or rd_impute.

bws

A positive numeric vector of the bandwidths for refitting an rd object.

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

Run this code
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))

Run the code above in your browser using DataLab