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, or the leverage-adjusted cr2 and cr3). 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. As in rdrobust, the cluster-robust estimators need cluster labels and the others are switched to them when labels are given: Nn, Hc0 and Hc1 to Cr1, Hc2 to Cr2 and Hc3 to Cr3; without labels Cr1, Cr2 and Cr3 fall back to Hc1, Hc2 and Hc3.

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).