Binscatter Estimation and Inference
Overview
Provides tools for statistical analysis using the binscatter methods developed by Cattaneo, Crump, Farrell and Feng (2024) https://nppackages.github.io/references/Cattaneo-Crump-Farrell-Feng_2024_AER.pdf, Cattaneo, Crump, Farrell and Feng (2025) https://nppackages.github.io/references/Cattaneo-Crump-Farrell-Feng_2025_Stata.pdf and Cattaneo, Crump, Farrell and Feng (2026) https://nppackages.github.io/references/Cattaneo-Crump-Farrell-Feng_2026_RESTAT.pdf. Binscatter provides a flexible way of describing the relationship between two variables based on partitioning/binning of the independent variable of interest. binsreg(), binsqreg() and binsglm() implement binscatter least squares regression, quantile regression and generalized linear regression respectively, with particular focus on constructing binned scatter plots. They also implement robust (pointwise and uniform) inference of regression functions and derivatives thereof. binstest() implements hypothesis testing procedures for parametric functional forms of and nonparametric shape restrictions on the regression function. binspwc() implements hypothesis testing procedures for pairwise group comparison of binscatter estimators. binsregselect() implements data-driven procedures for selecting the number of bins for binscatter estimation. All the commands allow for covariate adjustment, smoothness restrictions and clustering.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- NOTE12 OK, 1 NOTE2026-06-08
- OK13 OK2026-05-20
Show 1 earlier changeHide 1 earlier change
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 19 (12 internal)includes a package overview page
- Examples that run
- 100%6 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 37%
Downloads
Repository
- PRs merged (all time)
- 56%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/nppackages/binsreg on 2026-10-18.
The R CMD check workflow runs on Linux
Dependencies
Code & Tests
People & History
Previously maintained by Yingjie Feng (0.2.0 to 1.1).
Pick two releases to compare their code metrics.
- 2.2Latest
- 2.12026-05-22 · diff ↗
- 2.02026-05-15 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.12024-07-23 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.02023-07-11 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.92023-01-06 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.72021-10-11 · diff ↗
- 0.62021-08-07 · diff ↗ ·
removed 1 export
binsregtestadded 4 exports
binsglm, binspwc, binsqreg, binstest - RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
Show 2 earlier eventsHide 2 earlier events
- 0.2.02019-03-19
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-03-19
- Total releases
- 9 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.1
- Download size
- 106 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("binsreg")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.