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.

Queries and Requests

Please email:

Major Upgrades

This package was first released in Winter 2019, and had one major upgrade in Summer 2021.

Python Implementation

To install/update in Python type:

pip install binsreg

R Implementation

To install/update in R type:


Stata Implementation

To install/update in Stata type:

net install binsreg, from( replace


For source code and related files, visit binsreg repository.


Software and Implementation

Technical and Methodological