A local-linear RD estimator trades squared bias, which grows with the
window, against variance, which shrinks with it. IK's selector is the
minimiser of that sum with the six unknown population quantities
replaced by plug-ins, plus a regularisation term that keeps the answer
finite when the two curvatures happen to cancel – without it the
criterion has a pole at m2_plus == m2_minus and the selected
window runs away to the whole support.
Value
List with estimate and h_opt, h_no_reg,
h1, f_hat, sigma2, m3, h2_plus,
h2_minus, m2_plus, m2_minus, r_plus,
r_minus, n_plus, n_minus, n2_plus,
n2_minus, n1_plus, n1_minus, n, ck.
Details
The three steps are the paper's own (sec. 4.2, pp.9-10): a
Silverman-type pilot h1 = 1.84 * S_X * N^(-1/5) giving
f(c) and sigma^2(c); a global cubic with a jump giving
m3 and hence the pilot bandwidths of eq. (4.11), then a local
quadratic on each for the curvatures; and the regularisation terms of
eq. (4.12) fed into eq. (4.7).
Note on eq. (4.8). The density estimator is printed on p.9 as
(N_h1- + N_h1+) / (N * h1), but the paper's own worked example
on p.15 evaluates (836 + 862) / (2 * 6558 * 0.1445) = 0.8962.
The factor two is required – the window has width 2 * h1 –
and the printed eq. (4.8) is missing it. This implementation follows
the worked example, which reproduces the paper's reported numbers;
without the two the density comes out at 1.79 and the reported
h_opt = 0.2649 is not recoverable.
References
Imbens, G. & Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. Review of Economic Studies 79(3):933-959. doi:10.1093/restud/rdr043 . Equations and worked example read from the NBER working paper w14726 version, pp.8-10 and pp.15-16.
