The binsreg package implements estimation, inference and graphical procedures using binscatter methods.
binsreg: least squares binscatter regression with robust inference and plots.binsqreg: quantile binscatter regression with robust inference and plots.binsglm: generalized linear binscatter regression with robust inference and plots (R and Python).binslogit: logit binscatter estimation with robust inference and plots (Stata).binsprobit: probit binscatter estimation with robust inference and plots (Stata).binstest: binscatter-based tests for parametric specifications and shape restrictions.binspwc: binscatter-based pairwise group comparison tests.binsregselect: data-driven selection of the number of bins for binscatter estimation.
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/main/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 25(1): 3-50.
-
Cattaneo, Crump, Farrell and Feng (2024): On Binscatter.
American Economic Review 114(5): 1488-1514.
Supplemental Appendix -
Cattaneo, Crump, Farrell and Feng (2026): Nonlinear Binscatter Methods.
Review of Economics and Statistics, revise and resubmit.
Supplemental Appendix
This work was supported in part by the National Science Foundation through grants SES-1947805, SES-2019432, and SES-2241575.