rdms: Point estimation and robust bias-corrected inference for...

View source: R/rdms.R

rdmsR Documentation

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 rdrobust() for details.

derivvec

vector of cutoff-specific order of derivatives. See rdrobust() for details.

pooled_opt

options to be passed to rdrobust() to calculate pooled estimand.

pvec

vector of cutoff-specific polynomial orders. See rdrobust() for details.

qvec

vector of cutoff-specific polynomial orders for bias estimation. See rdrobust() for details.

hmat

matrix of cutoff-specific bandwidths. See rdrobust() for details.

bmat

matrix of cutoff-specific bandwidths for bias estimation. See rdrobust() for details.

rhovec

vector of cutoff-specific values of rho. See rdrobust() for details.

covs_mat

matrix of covariates. See rdplot() for details.

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 rdrobust() for details.

kernelvec

vector of cutoff-specific kernels. See rdrobust() for details.

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 rdrobust() for details.

bwselectvec

vector of cutoff-specific bandwidth selection methods. See rdrobust() for details.

scaleparvec

vector of cutoff-specific scale parameters. See rdrobust() for details.

scaleregulvec

vector of cutoff-specific scale regularization parameters. See rdrobust() for details.

masspointsvec

vector indicating how to handle repeated values at each cutoff. See rdrobust() for details.

bwcheckvec

vector indicating the value of bwcheck at each cutoff. See rdrobust() for details.

bwrestrictvec

vector indicating whether computed bandwidths are restricted to the range or runvar at each cutoff. See rdrobust() for details.

stdvarsvec

vector indicating whether variables are standardized at each cutoff. See rdrobust() for details.

vcevec

vector of cutoff-specific variance-covariance estimation methods. See rdrobust() for details.

nnmatchvec

vector of cutoff-specific nearest neighbors for variance estimation. See rdrobust() for details.

cluster

cluster ID variable. See rdrobust() for details.

ginv.tolvec

vector of cutoff-specific tolerances for generalized inverse calculations. See rdrobust() for details.

sharpbwvec

vector indicating whether fuzzy RD bandwidth selection uses the sharp RD model at each cutoff. See rdrobust() for details.

level

confidence level for confidence intervals. See rdrobust() for details.

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)



rdmulti documentation built on May 18, 2026, 1:07 a.m.