Skip to contents

The common MSE-optimal bandwidths of rdrobust::rdbwselect(bwselect = "mserd"): h for the order-p estimate of the deriv-th derivative jump (fuzzy with treatment) and, in details, b_mse for its bias correction and the CER-optimal h_cer = h N^(-p/((3+p)(3+2p))).

Usage

morie_rdd_bandwidth_cct(
  x,
  y,
  cutoff = 0,
  kernel = "triangular",
  p = 1,
  deriv = 0,
  treatment = NULL,
  vce = "nn"
)

Arguments

x, y

The running variable and the outcome.

cutoff

The threshold.

kernel

One of "triangular", "epanechnikov", "uniform".

p

Polynomial order for the local fit.

deriv

Derivative of the regression function (1 for a kink).

treatment

Optional treatment received, for fuzzy designs.

vce

"nn" (default) or "hc0"-"hc3".

Value

A named list with bandwidth, method and details carrying h_mse, b_mse and h_cer.

Examples

set.seed(1)
x <- runif(400, -1, 1)
y <- 0.3 * x + 1.0 * (x >= 0) + rnorm(400, sd = 0.3)
bw <- morie_rdd_bandwidth_cct(x, y)
bw$bandwidth
#> [1] 0.3582727