The binsreg
package provides Python, R and Stata implementations of binscatter methods, including partition selection, point estimation, pointwise and uniform inference methods, and graphical procedures.
This work was supported in part by the National Science Foundation through grants SES-1947805, SES-2019432, and SES-2241575.
https://nppackages.github.io/binsreg
Please email: binsreg@googlegroups.com
This package was first released in Winter 2019, and had one major upgrade in Summer 2021.
- Summer 2021 new features include: (i) generalized linear models (logit, Probit, etc.) binscatter; (ii) quantile regression binscatter; (iii) new generic specification and shape restriction hypothesis testing function (now including Lp metrics); (iv) multi-group comparison of binscatter estimators; (v) generic point evaluation of covariate-adjusted binscatter; (vi) speed improvements and optimization. A complete list of upgrades is here: UPGRADES
To install/update in Python type:
pip install binsreg
-
Help: PyPI repository.
-
Replication: py-script, plot illustration, data.
To install/update in R type:
install.packages('binsreg')
-
Help: R Manual, CRAN repository.
-
Replication: R-script, plot illustration, data.
To install/update in Stata type:
net install binsreg, from(https://raw.githubusercontent.com/nppackages/binsreg/master/stata) replace
-
Help: binsreg, binslogit, binsprobit, binsqreg, binstest, binspwc, binsregselect.
-
Replication files: do-file, plot illustration, data, speed test.
- Cattaneo, Crump, Farrell and Feng (2025): Binscatter Regressions.
Stata Journal, forthcoming.
-
Cattaneo, Crump, Farrell and Feng (2024): On Binscatter.
American Economic Review 114(5): 1488-1514.
Supplemental Appendix -
Cattaneo, Crump, Farrell and Feng (2024): Nonlinear Binscatter Methods.
Working paper.
Supplemental Appendix