Giter Site home page Giter Site logo

rddtools's Introduction

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

rddtools's People

Contributors

bquast avatar evanmunro avatar matthieustigler avatar ptesta avatar

Watchers

 avatar

Forkers

shizelong1985

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.