| Type: | Package |
| Title: | Robust Local Polynomial Methods for RD Designs with Multiple Cutoffs or Multiple Scores |
| Version: | 2.0.0 |
| Date: | 2026-05-15 |
| Description: | The 'rdmulti' package implements estimation, inference, and graphical procedures for regression discontinuity (RD) designs with multiple cutoffs or multiple scores. rdmc() provides point estimation and robust bias-corrected inference for multi-cutoff designs, rdmcplot() provides data-driven RD plots for multi-cutoff designs, and rdms() provides point estimation and robust bias-corrected inference for multi-score designs. See Cattaneo, Titiunik and Vazquez-Bare (2020) https://rdpackages.github.io/references/Cattaneo-Titiunik-VazquezBare_2020_Stata.pdf for further methodological details. |
| Imports: | ggplot2, rdrobust, rlang |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| URL: | https://github.com/rdpackages/rdmulti |
| BugReports: | https://github.com/rdpackages/rdmulti/issues |
| Config/roxygen2/version: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-05-16 21:40:59 UTC; CodexSandboxOffline |
| Author: | Matias D. Cattaneo [aut, cre], Rocio Titiunik [aut], Gonzalo Vazquez-Bare [aut] |
| Maintainer: | Matias D. Cattaneo <matias.d.cattaneo@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-05-17 22:40:07 UTC |
Robust Local Polynomial Methods for RD designs with Multiple Cutoffs or Multiple Scores
Description
The package rdmulti implements estimation, inference, and graphical
procedures for Regression Discontinuity (RD) designs with multiple cutoffs or
multiple scores. rdmc() provides point estimation and robust
bias-corrected inference for multi-cutoff designs, rdmcplot()
provides data-driven RD plots for multi-cutoff designs, and
rdms() provides point estimation and robust bias-corrected
inference for multi-score designs. For more details, and related Stata
and R packages useful for analysis of RD designs, visit
https://rdpackages.github.io/.
Author(s)
Matias D. Cattaneo, Princeton University. matias.d.cattaneo@gmail.com
Rocio Titiunik, Princeton University. rocio.titiunik@gmail.com
Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquezbare@gmail.com
References
Calonico, S., M.D. Cattaneo, M. Farrell and R. Titiunik. (2017). rdrobust: Software for Regression Discontinuity Designs. Stata Journal 17(2): 372-404.
Calonico, S., M.D. Cattaneo, and R. Titiunik. (2014). Robust Data-Driven Inference in the Regression-Discontinuity Design. Stata Journal 14(4): 909-946.
Calonico, S., M.D. Cattaneo, and R. Titiunik. (2015). rdrobust: An R Package for Robust Nonparametric Inference in Regression-Discontinuity Designs. R Journal 7(1): 38-51.
Cattaneo, M.D., L. Keele, R. Titiunik and G. Vazquez-Bare. (2016). Interpreting Regression Discontinuity Designs with Multiple Cutoffs. Journal of Politics 78(4): 1229-1248.
Cattaneo, M.D., L. Keele, R. Titiunik and G. Vazquez-Bare. (2020). Extrapolating Treatment Effects in Multi-Cutoff Regression Discontinuity Designs. Journal of the American Statistical Association 116(536): 1941, 1952.
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal 20(4): 866-891.
Keele, L. and R. Titiunik. (2015). Geographic Boundaries as Regression Discontinuities. Political Analysis 23(1): 127-155
See Also
Useful links:
Point estimation and robust bias-corrected inference for multi-cutoff designs
Description
rdmc() implements point estimation and robust bias-corrected inference
for Regression Discontinuity (RD) designs with multiple cutoffs.
Usage
rdmc(
Y,
X,
C,
fuzzy = NULL,
derivvec = NULL,
pooled_opt = NULL,
verbose = FALSE,
pvec = NULL,
qvec = NULL,
hmat = NULL,
bmat = NULL,
rhovec = NULL,
covs_mat = NULL,
covs_list = NULL,
covs_dropvec = NULL,
kernelvec = NULL,
weightsvec = NULL,
bwselectvec = NULL,
scaleparvec = NULL,
scaleregulvec = NULL,
masspointsvec = NULL,
bwcheckvec = NULL,
bwrestrictvec = NULL,
stdvarsvec = NULL,
vcevec = NULL,
nnmatchvec = NULL,
cluster = NULL,
ginv.tolvec = NULL,
sharpbwvec = NULL,
level = 95,
plot = FALSE,
conventional = FALSE,
subset = NULL,
data = NULL
)
Arguments
Y |
outcome variable. |
X |
running variable. |
C |
cutoff variable. |
fuzzy |
specifies a fuzzy design. See |
derivvec |
vector of cutoff-specific order of derivatives. See
|
pooled_opt |
options to be passed to |
verbose |
displays the output from |
pvec |
vector of cutoff-specific polynomial orders. See
|
qvec |
vector of cutoff-specific polynomial orders for bias estimation.
See |
hmat |
matrix of cutoff-specific bandwidths. See |
bmat |
matrix of cutoff-specific bandwidths for bias estimation. See
|
rhovec |
vector of cutoff-specific values of rho. See |
covs_mat |
matrix of covariates. See |
covs_list |
list of covariates to be used in each cutoff. |
covs_dropvec |
vector indicating whether collinear covariates should be
dropped at each cutoff. See |
kernelvec |
vector of cutoff-specific kernels. See |
weightsvec |
vector of length equal to the number of cutoffs indicating
the names of the variables to be used as weights in each cutoff. See |
bwselectvec |
vector of cutoff-specific bandwidth selection methods. See
|
scaleparvec |
vector of cutoff-specific scale parameters. See
|
scaleregulvec |
vector of cutoff-specific scale regularization
parameters. See |
masspointsvec |
vector indicating how to handle repeated values at each
cutoff. See |
bwcheckvec |
vector indicating the value of bwcheck at each cutoff. See
|
bwrestrictvec |
vector indicating whether computed bandwidths are
restricted to the range or runvar at each cutoff. See |
stdvarsvec |
vector indicating whether variables are standardized at
each cutoff. See |
vcevec |
vector of cutoff-specific variance-covariance estimation
methods. See |
nnmatchvec |
vector of cutoff-specific nearest neighbors for variance
estimation. See |
cluster |
cluster ID variable. See |
ginv.tolvec |
vector of cutoff-specific tolerances for generalized
inverse calculations. See |
sharpbwvec |
vector indicating whether fuzzy RD bandwidth selection
uses the sharp RD model at each cutoff. See |
level |
confidence level for confidence intervals. See |
plot |
plots cutoff-specific estimates and weights. |
conventional |
reports conventional, instead of robust-bias corrected, p-values and confidence intervals. |
subset |
optional subset of observations to use. |
data |
optional data frame for resolving string variable names. |
Value
tau |
pooled estimate |
se.rb |
robust bias corrected standard error for pooled estimate |
pv.rb |
robust bias corrected p-value for pooled estimate |
ci.rb.l |
left limit of robust bias corrected CI for pooled estimate |
ci.rb.r |
right limit of robust bias corrected CI for pooled estimate |
hl |
bandwidth to the left of the cutoff for pooled estimate |
hr |
bandwidth to the right of the cutofffor pooled estimate |
Nhl |
sample size within bandwidth to the left of the cutoff for pooled estimate |
Nhr |
sample size within bandwidth to the right of the cutoff for pooled estimate |
B |
vector of bias-corrected estimates |
V |
vector of robust variances of the estimates |
Coefs |
vector of conventional estimates |
W |
vector of weights for each cutoff-specific estimate |
Nh |
vector of sample sizes within bandwidth |
CI |
robust bias-corrected confidence intervals |
H |
matrix of bandwidths |
Pv |
vector of robust p-values |
rdrobust.results |
results from rdrobust for pooled estimate |
cfail |
Cutoffs where rdrobust() encountered problems |
Author(s)
Matias D. Cattaneo, Princeton University. matias.d.cattaneo@gmail.com
Rocio Titiunik, Princeton University. rocio.titiunik@gmail.com
Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquezbare@gmail.com
References
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal, forthcoming.
Examples
# Toy dataset
X <- runif(1000,0,100)
C <- c(rep(33,500),rep(66,500))
Y <- (1 + X + (X>=C))*(C==33)+(.5 + .5*X + .8*(X>=C))*(C==66) + rnorm(1000)
# rdmc with standard syntax
tmp <- rdmc(Y,X,C)
Data-driven RD plots for multi-cutoff designs
Description
rdmcplot() implements data-driven Regression Discontinuity (RD) plots
for designs with multiple cutoffs.
Usage
rdmcplot(
Y,
X,
C,
nbinsmat = NULL,
binselectvec = NULL,
scalevec = NULL,
supportmat = NULL,
pvec = NULL,
hmat = NULL,
kernelvec = NULL,
weightsvec = NULL,
covs_mat = NULL,
covs_list = NULL,
covs_evalvec = NULL,
covs_dropvec = NULL,
ginv.tolvec = NULL,
masspointsvec = NULL,
ci = NULL,
shade = FALSE,
col_bins = NULL,
pch_bins = NULL,
col_poly = NULL,
lty_poly = NULL,
col_xline = NULL,
lty_xline = NULL,
nobins = FALSE,
nopoly = FALSE,
noxline = FALSE,
nodraw = FALSE,
subset = NULL,
data = NULL
)
Arguments
Y |
outcome variable. |
X |
running variable. |
C |
cutoff variable. |
nbinsmat |
matrix of cutoff-specific number of bins. See |
binselectvec |
vector of cutoff-specific bins selection method. See
|
scalevec |
vector of cutoff-specific scale factors. See |
supportmat |
matrix of cutoff-specific support conditions. See
|
pvec |
vector of cutoff-specific polynomial orders. See |
hmat |
matrix of cutoff-specific bandwidths. See |
kernelvec |
vector of cutoff-specific kernels. See |
weightsvec |
vector of cutoff-specific weights. See |
covs_mat |
matrix of covariates. See |
covs_list |
list of of covariates to be used in each cutoff. |
covs_evalvec |
vector indicating the evaluation point for additional
covariates. See |
covs_dropvec |
vector indicating whether collinear covariates should be
dropped at each cutoff. See |
ginv.tolvec |
vector of cutoff-specific tolerances for generalized
inverse calculations. See |
masspointsvec |
vector indicating how to handle repeated values at each
cutoff. See |
ci |
adds confidence intervals of the specified level to the plot. See
|
shade |
passes the shaded confidence interval option to |
col_bins |
vector of colors for bins. |
pch_bins |
vector of characters (pch) type for bins. |
col_poly |
vector of colors for polynomial curves. |
lty_poly |
vector of lty for polynomial curves. |
col_xline |
vector of colors for vertical lines. |
lty_xline |
vector of lty for vertical lines. |
nobins |
omits bins plot. |
nopoly |
omits polynomial curve plot. |
noxline |
omits vertical lines indicating the cutoffs. |
nodraw |
omits plot. |
subset |
optional subset of observations to use. |
data |
optional data frame for resolving string variable names. |
Value
clist |
list of cutoffs |
cnum |
number of cutoffs |
X0 |
matrix of X values for control units |
X1 |
matrix of X values for treated units |
Yhat0 |
estimated polynomial for control units |
Yhat1 |
estimated polynomial for treated units |
Xmean |
bin average of X values |
Ymean |
bin average for Y values |
CI_l |
lower end of confidence intervals |
CI_r |
upper end of confidence intervals |
cfail |
Cutoffs where rdrobust() encountered problems |
Author(s)
Matias D. Cattaneo, Princeton University. matias.d.cattaneo@gmail.com
Rocio Titiunik, Princeton University. rocio.titiunik@gmail.com
Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquezbare@gmail.com
References
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal, forthcoming.
Examples
# Toy dataset
X <- runif(1000,0,100)
C <- c(rep(33,500),rep(66,500))
Y <- (1 + X + (X>=C))*(C==33)+(.5 + .5*X + .8*(X>=C))*(C==66) + rnorm(1000)
# rdmcplot with standard syntax
tmp <- rdmcplot(Y,X,C)
Point estimation and robust bias-corrected inference for multi-score designs
Description
rdms() implements point estimation and robust bias-corrected inference
for Regression Discontinuity (RD) designs with multiple scores, including
cumulative-cutoff designs and designs with two running variables.
Usage
rdms(
Y,
X,
C,
X2 = NULL,
zvar = NULL,
C2 = NULL,
rangemat = NULL,
xnorm = NULL,
fuzzy = NULL,
derivvec = NULL,
pooled_opt = NULL,
pvec = NULL,
qvec = NULL,
hmat = NULL,
bmat = NULL,
rhovec = NULL,
covs_mat = NULL,
covs_list = NULL,
covs_dropvec = NULL,
kernelvec = NULL,
weightsvec = NULL,
bwselectvec = NULL,
scaleparvec = NULL,
scaleregulvec = NULL,
masspointsvec = NULL,
bwcheckvec = NULL,
bwrestrictvec = NULL,
stdvarsvec = NULL,
vcevec = NULL,
nnmatchvec = NULL,
cluster = NULL,
ginv.tolvec = NULL,
sharpbwvec = NULL,
level = 95,
plot = FALSE,
conventional = FALSE,
subset = NULL,
data = NULL
)
Arguments
Y |
outcome variable. |
X |
running variable. |
C |
vector of cutoffs. |
X2 |
if specified, second running variable. |
zvar |
if X2 is specified, treatment indicator. |
C2 |
if specified, second vector of cutoffs. |
rangemat |
matrix of cutoff-specific ranges for the running variable. |
xnorm |
normalized running variable to estimate pooled effect. |
fuzzy |
specifies a fuzzy design. See |
derivvec |
vector of cutoff-specific order of derivatives. See
|
pooled_opt |
options to be passed to |
pvec |
vector of cutoff-specific polynomial orders. See
|
qvec |
vector of cutoff-specific polynomial orders for bias estimation.
See |
hmat |
matrix of cutoff-specific bandwidths. See |
bmat |
matrix of cutoff-specific bandwidths for bias estimation. See
|
rhovec |
vector of cutoff-specific values of rho. See |
covs_mat |
matrix of covariates. See |
covs_list |
list of of covariates to be used in each cutoff. |
covs_dropvec |
vector indicating whether collinear covariates should be
dropped at each cutoff. See |
kernelvec |
vector of cutoff-specific kernels. See |
weightsvec |
vector of length equal to the number of cutoffs indicating
the names of the variables to be used as weights in each cutoff. See |
bwselectvec |
vector of cutoff-specific bandwidth selection methods. See
|
scaleparvec |
vector of cutoff-specific scale parameters. See
|
scaleregulvec |
vector of cutoff-specific scale regularization
parameters. See |
masspointsvec |
vector indicating how to handle repeated values at each
cutoff. See |
bwcheckvec |
vector indicating the value of bwcheck at each cutoff. See
|
bwrestrictvec |
vector indicating whether computed bandwidths are
restricted to the range or runvar at each cutoff. See |
stdvarsvec |
vector indicating whether variables are standardized at
each cutoff. See |
vcevec |
vector of cutoff-specific variance-covariance estimation
methods. See |
nnmatchvec |
vector of cutoff-specific nearest neighbors for variance
estimation. See |
cluster |
cluster ID variable. See |
ginv.tolvec |
vector of cutoff-specific tolerances for generalized
inverse calculations. See |
sharpbwvec |
vector indicating whether fuzzy RD bandwidth selection
uses the sharp RD model at each cutoff. See |
level |
confidence level for confidence intervals. See |
plot |
plots cutoff-specific and pooled estimates. |
conventional |
reports conventional, instead of robust-bias corrected, p-values and confidence intervals. |
subset |
optional subset of observations to use. |
data |
optional data frame for resolving string variable names. |
Value
B |
vector of bias-corrected coefficients |
V |
variance-covariance matrix of the estimators |
Coefs |
vector of conventional coefficients |
Nh |
vector of sample sizes within bandwidth at each cutoff |
CI |
bias corrected confidence intervals |
H |
bandwidth used at each cutoff |
Pv |
vector of robust p-values |
Author(s)
Matias D. Cattaneo, Princeton University. matias.d.cattaneo@gmail.com
Rocio Titiunik, Princeton University. rocio.titiunik@gmail.com
Gonzalo Vazquez-Bare, UC Santa Barbara. gvazquezbare@gmail.com
References
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores. Stata Journal, forthcoming.
Examples
# Toy dataset: cumulative cutoffs
X <- runif(1000,0,100)
C <- c(33,66)
Y <- (1+X)*(X<C[1])+(0.8+0.8*X)*(X>=C[1]&X<C[2])+(1.2+1.2*X)*(X>=C[2]) + rnorm(1000)
# rmds: basic syntax
tmp <- rdms(Y,X,C)