% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rdms.R
\name{rdms}
\alias{rdms}
\title{Point estimation and robust bias-corrected inference for multi-score designs}
\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{
\item{Y}{outcome variable.}

\item{X}{running variable.}

\item{C}{vector of cutoffs.}

\item{X2}{if specified, second running variable.}

\item{zvar}{if X2 is specified, treatment indicator.}

\item{C2}{if specified, second vector of cutoffs.}

\item{rangemat}{matrix of cutoff-specific ranges for the running variable.}

\item{xnorm}{normalized running variable to estimate pooled effect.}

\item{fuzzy}{specifies a fuzzy design. See \code{rdrobust()} for details.}

\item{derivvec}{vector of cutoff-specific order of derivatives. See
\code{rdrobust()} for details.}

\item{pooled_opt}{options to be passed to \code{rdrobust()} to calculate
pooled estimand.}

\item{pvec}{vector of cutoff-specific polynomial orders. See
\code{rdrobust()} for details.}

\item{qvec}{vector of cutoff-specific polynomial orders for bias estimation.
See \code{rdrobust()} for details.}

\item{hmat}{matrix of cutoff-specific bandwidths. See \code{rdrobust()} for
details.}

\item{bmat}{matrix of cutoff-specific bandwidths for bias estimation. See
\code{rdrobust()} for details.}

\item{rhovec}{vector of cutoff-specific values of rho. See \code{rdrobust()}
for details.}

\item{covs_mat}{matrix of covariates. See \code{rdplot()} for details.}

\item{covs_list}{list of of covariates to be used in each cutoff.}

\item{covs_dropvec}{vector indicating whether collinear covariates should be
dropped at each cutoff. See \code{rdrobust()} for details.}

\item{kernelvec}{vector of cutoff-specific kernels. See \code{rdrobust()} for
details.}

\item{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 \code{rdrobust()} for details.}

\item{bwselectvec}{vector of cutoff-specific bandwidth selection methods. See
\code{rdrobust()} for details.}

\item{scaleparvec}{vector of cutoff-specific scale parameters. See
\code{rdrobust()} for details.}

\item{scaleregulvec}{vector of cutoff-specific scale regularization
parameters. See \code{rdrobust()} for details.}

\item{masspointsvec}{vector indicating how to handle repeated values at each
cutoff. See \code{rdrobust()} for details.}

\item{bwcheckvec}{vector indicating the value of bwcheck at each cutoff. See
\code{rdrobust()} for details.}

\item{bwrestrictvec}{vector indicating whether computed bandwidths are
restricted to the range or runvar at each cutoff. See \code{rdrobust()} for
details.}

\item{stdvarsvec}{vector indicating whether variables are standardized at
each cutoff. See \code{rdrobust()} for details.}

\item{vcevec}{vector of cutoff-specific variance-covariance estimation
methods. See \code{rdrobust()} for details.}

\item{nnmatchvec}{vector of cutoff-specific nearest neighbors for variance
estimation. See \code{rdrobust()} for details.}

\item{cluster}{cluster ID variable. See \code{rdrobust()} for details.}

\item{ginv.tolvec}{vector of cutoff-specific tolerances for generalized
inverse calculations. See \code{rdrobust()} for details.}

\item{sharpbwvec}{vector indicating whether fuzzy RD bandwidth selection
uses the sharp RD model at each cutoff. See \code{rdrobust()} for details.}

\item{level}{confidence level for confidence intervals. See \code{rdrobust()}
for details.}

\item{plot}{plots cutoff-specific and pooled estimates.}

\item{conventional}{reports conventional, instead of robust-bias corrected,
p-values and confidence intervals.}

\item{subset}{optional subset of observations to use.}

\item{data}{optional data frame for resolving string variable names.}
}
\value{
\item{B}{vector of bias-corrected coefficients}
\item{V}{variance-covariance matrix of the estimators} \item{Coefs}{vector of
conventional coefficients} \item{Nh}{vector of sample sizes within bandwidth
at each cutoff} \item{CI}{bias corrected confidence intervals}
\item{H}{bandwidth used at each cutoff} \item{Pv}{vector of robust p-values}
}
\description{
\code{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.
}
\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)


}
\references{
Cattaneo, M.D., R. Titiunik and G. Vazquez-Bare. (2020). \href{https://rdpackages.github.io/references/Cattaneo-Titiunik-VazquezBare_2020_Stata.pdf}{Analysis of Regression Discontinuity Designs with Multiple Cutoffs or Multiple Scores}. \emph{Stata Journal}, forthcoming.
}
\author{
Matias D. Cattaneo, Princeton University. \email{matias.d.cattaneo@gmail.com}

Rocio Titiunik, Princeton University. \email{rocio.titiunik@gmail.com}

Gonzalo Vazquez-Bare, UC Santa Barbara. \email{gvazquezbare@gmail.com}
}
