Package: binsreg
Type: Package
Title: Binscatter Estimation and Inference
Date: 2026-08-20
Version: 2.2
Authors@R: c(
    person("Matias D.", "Cattaneo", email = "matias.d.cattaneo@gmail.com", role = c("aut", "cre")),
    person("Richard K.", "Crump", email = "richard.crump@gmail.com", role = "aut"),
    person("Max H.", "Farrell", email = "mhfarrell@gmail.com", role = "aut"),
    person("Yingjie", "Feng", email = "fengyingjiepku@gmail.com", role = "aut"))
Author: Matias D. Cattaneo [aut, cre],
  Richard K. Crump [aut],
  Max H. Farrell [aut],
  Yingjie Feng [aut]
Maintainer: Matias D. Cattaneo <matias.d.cattaneo@gmail.com>
Description: 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.
URL: https://nppackages.github.io/,
        https://github.com/nppackages/binsreg
BugReports: https://github.com/nppackages/binsreg/issues
Depends: R (>= 3.1)
License: GPL-3
Encoding: UTF-8
Imports: ggplot2, sandwich, quantreg, splines, matrixStats
Suggests: testthat (>= 3.0.0)
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-08-20 11:43:49 UTC; cattaneo
Repository: CRAN
Date/Publication: 2026-08-21 05:45:05 UTC
Built: R 4.5.2; ; 2026-08-21 06:10:56 UTC; unix
