rddapp (version 1.1.0)

bw_ik09: Imbens-Kalyanaraman 2009 Optimal Bandwidth Calculation

Description

bw_ik09 calculates the Imbens-Kalyanaraman (2009) optimal bandwidth for local linear regression in regression discontinuity designs. It is based on the IKbandwidth function in the rdd package. This is an internal function and is typically not directly invoked by the user. It can be accessed using the triple colon, as in rddapp:::bw_ik09().

Usage

bw_ik09(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", and "cosine".

Value

The optimal bandwidth.

References

Imbens, G., Kalyanaraman, K. (2009). Optimal bandwidth choice for the regression discontinuity estimator (Working Paper No. 14726). National Bureau of Economic Research. http://www.nber.org/papers/w14726.