Implements binscatter methods, including partition selection, point estimation, pointwise and uniform inference methods, and graphical procedures.
Project description
BINSREG
The binsreg package provides tools for statistical analysis using the binscatter methods.
binsreg: implements binscatter least squares regression with robust inference and plots, including curve estimation, pointwise confidence intervals and uniform confidence band.binsqreg: implements binscatter quantile regression with robust inference and plots, including curve estimation, pointwise confidence intervals and uniform confidence band.binsglm: implements binscatter generalized linear regression with robust inference and plots, including curve estimation, pointwise confidence intervals and uniform confidence band.binstest: implements binscatter-based hypothesis testing procedures for parametric specifications of and shape restrictions on the unknown function of interest.binspwc: implements hypothesis testing procedures for pairwise group comparison of binscatter estimators.binsregselect: implements data-driven number of bins selectors for binscatter implementation using either quantile-spaced or evenly-spaced binning/partitioning.
All the commands allow for covariate adjustment, smoothness restrictions, and clustering, among other features. See Cattaneo, Crump, Farrell and Feng (2024, 2025, 2026) for references.
Website: https://nppackages.github.io/.
Source code: https://github.com/nppackages/binsreg.
Authors
Matias D. Cattaneo, maintainer (matias.d.cattaneo@gmail.com)
Richard K. Crump (richard.crump@gmail.com)
Max H. Farrell (mhfarrell@gmail.com)
Yingjie Feng (fengyingjiepku@gmail.com)
Ricardo Masini (ricardo.masini@gmail.com)
Installation
To install/update use pip
pip install binsreg
Usage
from binsreg import binsregselect, binsreg, binsqreg, binsglm, binstest, binspwc
- Replication: binsreg illustration, plot illustration, simulated data.
Dependencies
- numpy
- pandas
- scipy
- statsmodels
- plotnine
References
For overviews and introductions, see NP Packages website.
Software and Implementation
- Cattaneo, Crump, Farrell and Feng (2025): Binscatter Regressions.
Stata Journal 25(1): 3-50.
Technical and Methodological
-
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file binsreg-3.0.0.tar.gz.
File metadata
- Download URL: binsreg-3.0.0.tar.gz
- Upload date:
- Size: 91.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d68869f03a8d23069a12023b37272392547ae2cdcdb647b78bae314dc1f8593
|
|
| MD5 |
e1661a800e3c2cc21ec714686c83e983
|
|
| BLAKE2b-256 |
f1bf9117b59de689d9f96da1a1647bdb2eb4d8abf0c474f50468baf4383bd745
|
Provenance
The following attestation bundles were made for binsreg-3.0.0.tar.gz:
Publisher:
publish-python.yml on nppackages/binsreg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binsreg-3.0.0.tar.gz -
Subject digest:
1d68869f03a8d23069a12023b37272392547ae2cdcdb647b78bae314dc1f8593 - Sigstore transparency entry: 1541968781
- Sigstore integration time:
-
Permalink:
nppackages/binsreg@6cd01c053afc5ec837a48d2e46756a6ec43fe3c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nppackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@6cd01c053afc5ec837a48d2e46756a6ec43fe3c1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file binsreg-3.0.0-py3-none-any.whl.
File metadata
- Download URL: binsreg-3.0.0-py3-none-any.whl
- Upload date:
- Size: 88.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad72abab120723dd017aabb6b10d1d67d41a19f358102961ba32cdba5c074154
|
|
| MD5 |
866f51d15ad07b5d7d6612e3c4156339
|
|
| BLAKE2b-256 |
3b602d861c2b6c0f944003eaa3c34c38ff81a3d3e65369e5474a94d00096dbbc
|
Provenance
The following attestation bundles were made for binsreg-3.0.0-py3-none-any.whl:
Publisher:
publish-python.yml on nppackages/binsreg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binsreg-3.0.0-py3-none-any.whl -
Subject digest:
ad72abab120723dd017aabb6b10d1d67d41a19f358102961ba32cdba5c074154 - Sigstore transparency entry: 1541968890
- Sigstore integration time:
-
Permalink:
nppackages/binsreg@6cd01c053afc5ec837a48d2e46756a6ec43fe3c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nppackages
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@6cd01c053afc5ec837a48d2e46756a6ec43fe3c1 -
Trigger Event:
workflow_dispatch
-
Statement type: