Toolbox for Regression Discontinuity Design ('RDD')

Set of functions for Regression Discontinuity Design ('RDD'), for data visualisation, estimation and testing.


rddtools

rddtools is a new R package under development, designed to offer a set of tools to run all the steps required for a Regression Discontinuity Design (RDD) Analysis, from primary data visualisation to discontinuity estimation, sensitivity and placebo testing.

This github website hosts the source code. One of the easiest ways to install the package from github is by using the R package devtools:

if (!require('devtools')) install.packages('devtools')
devtools::install_github( "bquast/rddtools" )

Note however the latest version of rddtools only works with R 3.0, and that you might need to install Rtools if on Windows.

The (preliminary) documentation is available in the help files directly, as well as in the vignettes. The vignettes can be accessed from R.

vignette("rddtools")
  • Simple visualisation of the data using binned-plot: plot()

  • Bandwidth selection:

  • Estimation:

    • RDD parametric estimation: rdd_reg_lm() This includes specifying the polynomial order, including covariates with various specifications as advocated in Imbens and Lemieux 2008.
    • RDD local non-parametric estimation: rdd_reg_np(). Can also include covariates, and allows different types of inference (fully non-parametric, or parametric approximation).
    • RDD generalised estimation: allows to use custom estimating functions to get the RDD coefficient. Could allow for example a probit RDD, or quantile regression.
  • Post-Estimation tools:

    • Various tools, to obtain predictions at given covariate values ( rdd_pred() ), or to convert to other classes, to lm ( as.lm() ), or to the package np ( as.npreg() ).
    • Function to do inference with clustered data: clusterInf() either using a cluster covariance matrix ( vcovCluster() ) or by a degrees of freedom correction (as in Cameron et al. 2008).
  • Regression sensitivity analysis:

    • Plot the sensitivity of the coefficient with respect to the bandwith: plotSensi()
    • Placebo plot using different cutpoints: plotPlacebo()
  • Design sensitivity analysis:

    • McCrary test of manipulation of the forcing variable: wrapper dens_test() to the function DCdensity() from package rdd.
    • Test of equal means of covariates: covarTest_mean()
    • Test of equal density of covariates: covarTest_dens()
  • Datasets

News

RDDtools 0.3.0.9000

  • development taken over by Bastiaan

  • rename package to rddtools (from RDDtools)

  • rename functions to lower case

  • move package from subdir to repo root directory

  • change S3class method to export for roxygen

  • connect method functions with . in stead of white space

  • classify default functions as RDDcoef.default etc.

  • update DESCRIPTION with CRAN guidelines

  • change .onLoad to .onAttach

  • remove old lyx vignette in several places

  • move examples from README.Rmd to Rmd vignettes

  • fix empty package dependency bug

RDDtools 0.22

Updated on 21/5/14

  • RDDdata: change arg z to covar, add new argument z for sharp, currently unused.

  • dens_test: work now on RDDreg, return object htest

  • Multiple changes in help files

  • Correct import, suggests, calls to :::

RDDtools 0.21

Updated on 25/7/13

  • Add new function RDDpred

  • Add new model.matrix.RDDdata, preparing all output, now used by all RDDreg_np, RDDreg_lm, RDDgenre...

  • Add method vcov.RDDreg, as.lm.RDDreg

  • Add enw function vcovCluster2, complement doc, add M Arai,

  • Add data STAR_MHE

  • Many small fixes

RDDtools 0.2

Updated on 16/7/13

  • Add new option to have separate or same covariates

  • Add as.nprg, to convert to a np regression from package np

  • Add RDDcoef, working on multiple models (lm, np, npreg).

  • Many fixes...

RDDtools 0.1

Initial commit on 29/04/2013

  • Initial commit, containing RDDdata, RDDreg_lm, RDDreg_np, plotSensi, plotPlacebo, etc...

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rddtools")

0.4.0 by Bastiaan Quast, 2 years ago


https://github.com/bquast/RDDtools


Report a bug at https://github.com/bquast/RDDtools/issues


Browse source code at https://github.com/cran/rddtools


Authors: Matthieu Stigler [aut], Bastiaan Quast [aut, cre]


Documentation:   PDF Manual  


Task views: Econometrics


GPL (>= 2) license


Imports KernSmooth, ggplot2, rdd, sandwich, lmtest, Formula, locpol, methods

Depends on AER, np

Suggests stats4, car, knitr, testthat


See at CRAN