Skip to main content

Module rd

Module rd 

Source
Expand description

Local polynomial regression discontinuity (RD) estimation: a port of the rdrobust package 2.1.1 (Calonico, Cattaneo and Titiunik, 2014; Calonico, Cattaneo and Farrell, 2020), used by RdFlex.

  • rd_bandwidths: the MSE- or CER-optimal bandwidths of rdbwselect for the point estimate (h) and the bias correction (b).
  • rd_estimate: the local polynomial estimate at the cutoff with its bias correction and the conventional, bias-corrected and robust confidence intervals.

RdOptions holds rdrobust’s options (polynomial orders, kernel, bandwidth selector, variance estimator, mass-point handling, …) with its defaults; RdData the outcome, running variable and optional treatment (fuzzy design), covariates and cluster labels. With clusters the variance is cluster-robust (rdrobust’s cr1). rdbwselect and rdrobust are shortcuts with the default options.

Structs§

RdBandwidths
Bandwidths below (.0) and above (.1) the cutoff.
RdData
Data of an RD design: outcome y, running variable x and cutoff, and optionally the treatment (fuzzy design), covariates and cluster labels.
RdEstimate
Result of rd_estimate: rows are the conventional, bias-corrected and robust (bias-corrected with robust standard error) estimates.
RdOptions
Options of rd_bandwidths and rd_estimate, with rdrobust’s defaults.

Enums§

BwSelect
Bandwidth selector, as rdrobust’s bwselect.
Kernel
Kernel of the local polynomial fits.
MassPoints
Treatment of repeated values of the running variable, as rdrobust’s masspoints.
Vce
Variance estimator, as rdrobust’s vce. With cluster labels, Nn, Hc0 and Hc1 all give the cluster-robust cr1; the leverage-adjusted cluster estimators (rdrobust’s cr2 / cr3, from Hc2 / Hc3) are not available.

Functions§

rd_bandwidths
Bandwidths of rdrobust’s rdbwselect for the RD effect at the cutoff, with the selector and options in opts.
rd_estimate
Local polynomial RD estimate at the cutoff with its bias correction, as rdrobust with the options in opts. bandwidths fixes h and b (with opts.rho, b = h / rho); None selects them with rd_bandwidths. A fuzzy design estimates the ratio of the outcome and treatment jumps; covariates adjust both.
rdbwselect
The MSE-optimal common bandwidths (h, b) of rdrobust’s rdbwselect (default options) for the RD effect at cutoff c; pass the treatment as fuzzy for a fuzzy design.
rdrobust
Local linear RD estimate at cutoff c with a quadratic bias correction and nearest-neighbour standard errors, as rdrobust with its default options. bandwidths gives (h, b) (both sides); None selects them with rdbwselect. Pass the treatment as fuzzy for a fuzzy design (the effect is then the ratio of the outcome and treatment jumps).