IKbandwidth calculates the Imbens-Kalyanaraman optimal bandwidth for local linear regression in Regression discontinuity designs.
IKbandwidth(X, Y, cutpoint =NULL, verbose =FALSE, kernel ="triangular")
Arguments
X: a numerical vector which is the running variable
Y: a numerical vector which is the outcome variable
cutpoint: the cutpoint
verbose: logical flag indicating whether to print more information to the terminal. Default is FALSE.
kernel: string indicating which kernel to use. Options are "triangular" (default and recommended), "rectangular", "epanechnikov", "quartic", "triweight", "tricube", "gaussian", and "cosine".
Imbens, Guido and Karthik Kalyanaraman. (2009) "Optimal Bandwidth Choice for the regression discontinuity estimator," NBER Working Paper Series. 14726. http://www.nber.org/papers/w14726