RDestimate
supports both sharp and fuzzy RDD
utilizing the AER package for 2SLS regression
under the fuzzy design. Local linear regressions are performed
to either side of the cutpoint using the ImbensKalyanaraman
optimal bandwidth calculation, IKbandwidth
.
1 2 3 
formula 
the formula of the RDD. This is supplied in the
format of 
data 
an optional data frame 
subset 
an optional vector specifying a subset of observations to be used 
cutpoint 
the cutpoint. If omitted, it is assumed to be 0. 
bw 
a numeric vector specifying the bandwidths at which to estimate the RD. If omitted, the bandwidth is calculated using the ImbensKalyanaraman method, and then estimated with that bandwidth, half that bandwidth, and twice that bandwidth. If only a single value is passed into the function, the RD will similarly be estimated at that bandwidth, half that bandwidth, and twice that bandwidth. 
kernel 
a string specifying the kernel to be used in the local linear fitting.

se.type 
this specifies the robust SE calculation method to use. Options are,
as in 
cluster 
an optional vector specifying clusters within which the errors are assumed
to be correlated. This will result in reporting cluster robust SEs. This option overrides
anything specified in 
verbose 
will provide some additional information printed to the terminal. 
model 
logical. If 
frame 
logical. If 
Covariates are problematic for inclusion in the regression discontinuity design. This package allows their inclusion, but cautions against them insomuch as is possible. When covariates are included in the specification, they are simply included as exogenous regressors. In the sharp design, this means they are simply added into the regression equation, uninteracted with treatment. Likewise for the fuzzy design, in which they are added as regressors in both stages of estimation.
RDestimate
returns an object of class "RD
".
The functions summary
and plot
are used to obtain and print a summary and plot of
the estimated regression discontinuity. The object of class RD
is a list
containing the following components:
type 
a string denoting either 
est 
numeric vector of the estimate of the discontinuity in the outcome under a sharp design, or the Wald estimator in the fuzzy design for each corresponding bandwidth 
se 
numeric vector of the standard error for each corresponding bandwidth 
z 
numeric vector of the z statistic for each corresponding bandwidth 
p 
numeric vector of the p value for each corresponding bandwidth 
ci 
the matrix of the 95 for each corresponding bandwidth 
bw 
numeric vector of each bandwidth used in estimation 
obs 
vector of the number of observations within the corresponding bandwidth 
call 
the matched call 
na.action 
the observations removed from fitting due to missingness 
model 
(if requested) For a sharp design, a list of the 
frame 
(if requested) Returns the model frame used in fitting. 
Drew Dimmery <drewd@nyu.edu>
Lee, David and Thomas Lemieux. (2010) "Regression Discontinuity Designs in Economics," Journal of Economic Literature. 48(2): 281355. http://www.aeaweb.org/articles.php?doi=10.1257/jel.48.2.281
Imbens, Guido and Thomas Lemieux. (2010) "Regression discontinuity designs: A guide to practice," Journal of Econometrics. 142(2): 615635. http://dx.doi.org/10.1016/j.jeconom.2007.05.001
Lee, David and David Card. (2010) "Regression discontinuity inference with specification error," Journal of Econometrics. 142(2): 655674. http://dx.doi.org/10.1016/j.jeconom.2007.05.003
Angrist, Joshua and JornSteffen Pischke. (2009) Mostly Harmless Econometrics. Princeton: Princeton University Press.
summary.RD
, plot.RD
, DCdensity
IKbandwidth
, kernelwts
, vcovHC
,
ivreg
, lm
1 2 3 4 5 6  x<runif(1000,1,1)
cov<rnorm(1000)
y<3+2*x+3*cov+10*(x>=0)+rnorm(1000)
RDestimate(y~x)
# Efficiency gains can be made by including covariates
RDestimate(y~xcov)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.