MyNixOS website logo
Description

Toolbox for Regression Discontinuity Design ('RDD').

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

rddtools

License CRAN Version R build status Total RStudio Cloud Downloads RStudio Cloud Downloads

rddtools is an R package 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.

Installing rddtools

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('remotes')) install.packages('remotes')
remotes::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.

Documentation

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')

rddtools: main features

  • 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

References.

Metadata

Version

1.6.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows