The 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.
This work was supported in part by the National Science Foundation through grants SES-1357561, SES-1459931, SES-1459967, SES-1947662, SES-1947805, and SES-2019432.
https://rdpackages.github.io/rddensity
Please email: rdpackages@googlegroups.com
This package was first released in Spring 2017, and had one major upgrade in Summer 2020.
- Summer 2020 new features include: (i) speed improvements; (ii) improved integration with
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 inrdlocrand
methods (see references there for details).
Coming soon.
To install/update in R type:
install.packages('rddensity')
-
Help: R Manual, CRAN repository.
-
Replication: R-script, rdplot illustration, senate data.
To install/update in Stata type:
net install rddensity, from(https://raw.githubusercontent.com/rdpackages/rddensity/master/stata) replace
-
Help: rddensity, rdbwdensity.
-
Replication: do-file, do-file plot, data-senate.
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 (2020): lpdensity: Local Polynomial Density Estimation and Inference.
Working paper.
-
Cattaneo, Jansson and Ma (2020): Simple Local Polynomial Density Estimators.
Journal of the American Statistical Association 115(531): 1449-1455.
Supplemental appendix. -
Cattaneo, Jansson and Ma (2020): Local Regression Distribution Estimators.
Working paper.
Supplemental appendix.