rddensity package provides Stata and R implementations of manipulation tests employing local polynomial density estimation methods. This method is useful for falsification of Regression Discontinuity Designs, as well as for testing for self-selection or sorting in other contexts. This implementation provides hypothesis tests and bandwidth selectors for manipulation testing.
Please email: email@example.com
This package was first released in Spring 2017, and had one major upgrade in Summer 2020.
lpdensity; (iii) mass points in running variable adjustments; (iv) bandwidth selection adjustments for too few mass points in and/or overshooting of the support of the running variable; (v) density discontinuity plots with histogram and/or confidence bands; and (vi) binomial testing near cutoff as complementary discontinuity testing following results in
rdlocrandmethods (see references there for details).
To install/update in Python type:
pip install rddensity
To install/update in R type:
lpdensity, to install/update in R type:
To install/update in Stata type:
net install rddensity, from(https://raw.githubusercontent.com/rdpackages/rddensity/master/stata) replace
lpdensity, to install/update in Stata type:
net install lpdensity, from(https://raw.githubusercontent.com/nppackages/lpdensity/master/stata) replace
For source code and related files, visit
For overviews and introductions, see rdpackages website.
Cattaneo, Jansson and Ma (2018): Manipulation Testing based on Density Discontinuity.
Stata Journal 18(1): 234-261.
Cattaneo, Jansson and Ma (2022): lpdensity: Local Polynomial Density Estimation and Inference.
Journal of Statistical Software 101(2): 1-25.