Skip to contents

The common MSE-optimal bandwidths of Calonico, Cattaneo and Farrell (2020), as rdrobust::rdbwselect(bwselect = "mserd") with its defaults (stdvars = FALSE, masspoints = "adjust", bwrestrict = TRUE): h for the order-p estimate of the deriv-th derivative jump (fuzzy with treatment) and b for its bias correction.

Usage

morie_rd_mserd_bandwidth(
  y,
  x,
  cutoff = 0,
  p = 1,
  deriv = 0,
  q = NULL,
  kernel = "triangular",
  vce = "nn",
  nnmatch = 3,
  treatment = NULL,
  scaleregul = 1
)

Arguments

y

Outcome.

x

Running variable.

cutoff

Cutoff.

p

Polynomial order.

deriv

Derivative (1 for a kink).

q

Order of the bias fit, default p + 1.

kernel

"triangular", "epanechnikov" or "uniform".

vce

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

nnmatch

Nearest neighbours for vce = "nn".

treatment

Treatment received, for fuzzy designs.

scaleregul

Regularisation scale.

Value

list(h, b).

References

Calonico, S., Cattaneo, M. D. and Farrell, M. H. (2020). Optimal bandwidth choice for robust bias-corrected inference in regression discontinuity designs. Econometrics Journal 23, 192-210.

Examples

x <- sin(1.37 * 0:199); y <- 1 + x + (x >= 0) + 0.3 * cos(3.1 * 0:199)
morie_rd_mserd_bandwidth(y, x)
#> $h
#> [1] 0.4271823
#> 
#> $b
#> [1] 0.6385729
#>