Estimation and Inference for Boundary Discontinuity Designs
Overview
Provides pointwise and uniform estimation and inference methods for boundary discontinuity (BD) designs, a causal inference design that generalizes univariate regression discontinuity (RD) designs to settings with bivariate scores. Implements local polynomial methods for location-based and distance-based analyses, including sharp and fuzzy designs, data-driven bandwidth selection, pointwise confidence intervals, and uniform confidence bands. Methodology is developed in Cattaneo, Titiunik, and Yu (2026) doi:10.48550/arXiv.2505.05670 for location-based methods and Cattaneo, Titiunik, and Yu (2026) doi:10.48550/arXiv.2510.26051 for distance-based methods. For an overview and empirical guidance, see Cattaneo, Titiunik, and Yu (2026) doi:10.48550/arXiv.2511.06474. The companion software article is Cattaneo, Titiunik, and Yu (2025) doi:10.48550/arXiv.2505.07989.
- Adds
fitmethod = c("joint", "separate")tord2d(),rdbw2d(),rd2d.distance(), andrdbw2d.distance(). The new defaultfitmethod = "joint"preserves legacy point estimates while using joint variance corrections, including joint HC1 degrees-of-freedom factors and cluster-robust covariance calculations that account for clusters observed on both treatment sides.fitmethod = "separate"retains the previous side-specific variance calculation. Bandwidth selection keeps the existing plug-in bias estimator and now applies the same joint/separate convention to the selector's variance constants. - Adds
covs.efftord2d(),rdbw2d(),rd2d.distance(), andrdbw2d.distance()for efficiency adjustment using pre-intervention covariates with a common covariate coefficient across treatment sides, including sharp, fuzzy, joint, separate, fixed-bandwidth, and automatic-bandwidth paths.
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
- Adds
covs.dropandcovs.tolsafeguards for rank-deficientcovs.eff. Redundant covariate columns are dropped by default after residualizing on the local polynomial basis, with diagnostics stored inopt. - Adds S3 methods requested for the JSS resubmission:
plot()for estimation and bandwidth-selection objects, pluscoef(),vcov(), andconfint()forrd2d()andrd2d.distance()estimation objects. - Improves exported R argument validation so invalid inputs raise informative errors directly rather than printing a message followed by an empty error.
- Adds fuzzy boundary RD support for both location-based and distance-based methods, including fuzzy main effects, ITT, first-stage, and optional one-sided outputs.
- Adds
params.otherandparams.covcontrols tord2d()for optional companion tables and covariance storage. - Moves the Gaussian simulation count
reppfromrd2d()andrd2d.distance()to the summary methods that use it for uniform confidence bands and LBATE critical values. - Reports pointwise CI columns and optional uniform CB columns separately in
summary.rd2d()andsummary.rd2d.distance(). - Speeds up location-based and distance-based fits by reducing repeated low-order basis, kernel, covariance projection, and masspoint-counting work.
- Moves location-based uniform confidence band, WBATE, and LBATE construction to
summary.rd2d(). - Adds distance-based WBATE and LBATE construction to
summary.rd2d.distance(), including fuzzy main, ITT, and first-stage outputs. - Updates location-based return tables to use lowercase column names such as
estimate.p,std.err.q,t.value, andp.value. - Fixes location-based covariance construction for signed cross-evaluation covariance, clustered finite-sample scaling, and right-sided simulated critical values.
- Fixes distance-based covariance construction to use signed local-polynomial residuals, corrected cluster covariance halves, and side-specific bandwidth plug-in matrices.
- Adds CER-optimal bandwidth selectors
cerrd,certwo,icerrd, andicertwofor location-based and distance-based methods. - Replaces the distance-based
kink/rbcoptions withkink.unknownandkink.position, including adaptive known-kink bandwidths based on boundary point locations. - Uses smooth-boundary robust bias-corrected inference as the distance-based default, and uses the same stabilized Gram-matrix inversion helper as the location-based methods.
- Uses
q = pby default for distance-based unknown-kink specifications to avoid compounding the unknown-kink bandwidth shrinkage with an additional polynomial-order change. - Aligns distance-based return tables with location-based naming conventions, including
main,main.0,main.1,bw,estimate.p,std.err.q,N.Co, andN.Tr. - Updates public notation to use
fuzzyfor treatment receipt/status,tau.itt/tau.itt.qfor reduced-form outcome estimates,tau.fs/tau.fs.qfor first-stage estimates,assignmentfor assignment,clusterfor cluster identifiers, anddistancefor signed distance scores. - Removes user-facing derivative notation from distance-based help files and printed output.
- Adds focused tests for location-based returns, lazy confidence bands, aggregate inference, covariance regularization, clustered covariance consistency, and numerical preservation.
- Adds focused tests for distance-based return names, fuzzy outputs, heteroskedastic and clustered standard errors, covariance diagonals, aggregate inference, and polynomial-order validation.
- Simplifies repository illustration files to
R/rd2d_illustration.RandR/rd2d_plot.R.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 17includes a package overview page
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 90%
- Return-value docs
- 100%
- Help pages citing references
- 29%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 0
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/rdpackages/rd2d on 2026-10-21.
The R CMD check workflow runs on Linux
Dependencies
Code & Tests
People & History
Previously maintained by Ruiqi Rae Yu (0.0.1 to 0.0.3).
Package metadata
- First published
- 2025-05-14
- Total releases
- 6 / 1 yrs
- License
- GPL-3 OSI
- Download size
- 102 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rd2d")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.