| rd_sens_bw | R Documentation |
rd_sens_bw refits the supplied model with varying bandwidths.
All other aspects of the model are held constant.
rd_sens_bw(object, bws)
object |
An object returned by |
bws |
A positive numeric vector of the bandwidths for refitting an |
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").
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.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.