Learn R Programming

bunchr: Analyze bunching in a kink or notch setting

Itai Trilnick 2026-01-25

The bunchr package is meant to help analyze bunching in a labor and public economics setting. bunchr allows easy viewing of bunching histograms, creation of counter-factual distributions, and estimation of the elasticity of earnings w.r.t. the net-of-tax rate in kink and notch settings. At the time of writing these lines, I am unaware of any other R package doing so. I hope to keep improving this package so it is useful to many researchers.

To validate the kink analysis, results from bunchr are compared with an existing Stata utility function that was used in a peer reviewed article by Chetty, Friedman, Olsen, and Pistaferry (see vignette). I am happy to get comments and references to other codes for bunching analysis.

Below are a few words about bunching analysis, kinks, and notches. For more information, references, and examples, please see the package vignettes.

In many cases, tax and welfare programs have points where incentives change in such way that people are expected to bunch at one side of point. For example, people are expected to bunch at the point where income tax rates increase, creating a kink in their budget lines. In another case, beneficiaries of Social Security Disability Insurance in the US are not allowed to work and earn above a certain dollar amount, and those who cross that threshold risk losing all their benefits. This creates a notch in their budget lines, and bunching is expected (and seen) at that earning level.

Kinks and notches create opportunities to measure the earning elasticity w.r.t the net-of-tax rate. This parameter is considered sufficient statistic for calculating welfare from changes in tax regimes and welfare programs, and could also be used to devise optimal tax rates.

Copy Link

Version

Install

install.packages('bunchr')

Monthly Downloads

258

Version

1.2.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Itai Trilnick

Last Published

January 26th, 2026

Functions in bunchr (1.2.1)

util_equalizer

Calculating distance between utility at tangency and at notch/kink point
bunch

Bunching Analysis
earning_fun

Finding optimal earning under kinked/notched budget set
bunch_viewer

Visualizing a histogram and potential excluded areas
elas_equalizer

Using elasticity to calculating distance between utility at tangency and at notch point
bunchr

bunchr: A Package for Bunching Analysis
kink_estimator

Analyzing Bunching at a Kink
notch_estimator

Analyzing Bunching at a Notch
util_calc

Calculating quasi-linear iso-elastic utility
bunchApp

Run bunchApp: an Interactive Bunching Simulation