Skip to contents

Plug-in bandwidth minimising the asymptotic mean squared error of the local linear regression-discontinuity estimator (Imbens and Kalyanaraman 2009, Sec. 4.4). Step 1 forms a pilot Silverman window and estimates the running-variable density and the conditional variance at the cutoff; step 2 fits a global cubic to get the third derivative and from it side-specific pilot windows, then a quadratic on each side for the second derivatives; step 3 combines them with the regularisation terms of their eq. (4.10).

Usage

morie_causrddh(x, y, cutoff = 0)

Arguments

x

Running variable.

y

Outcome.

cutoff

Threshold, default 0.

Value

A list with estimate (the bandwidth) and the full set of intermediate quantities: h1, f_hat, sigma2, n_left_h1, n_right_h1, mean_left_h1, mean_right_h1, m3, h2_left, h2_right, m2_left, m2_right, n2_left, n2_right, n2_left_full, n2_right_full, r_left, r_right, h_unregularized, kernel_constant, n, method.

References

Imbens, G. and Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. Review of Economic Studies, 79(3), 933-959.

Examples

set.seed(3)
x <- runif(500, -1, 1)
y <- 0.5 * (x >= 0) + x + rnorm(500, sd = 0.3)
morie_causrddh(x, y, cutoff = 0)$estimate
#> [1] 0.7299277