bunchr is an R package for bunching analysis. It also includes bunchApp, an interactive simulator for exploring bunching and elasticity estimation. Bunching is a phenomenon where many individuals self select to a specific point in the range of some variable (e.g. earnings) because of some incentive discontinuity (e.g. marginal tax rate change). In such case, a histogram will show a “bunch” - observable excess mass otherwise unexpected - at that point. In economic literature, it is used to recognize a behavioral response to change in incentives, and estimate structural parameters (e.g. elasticity of earnings w.r.t. marginal tax rate).
The simulator can be accessed online at https://trilnick.shinyapps.io/bunchapp/
It is also available for use within R:
install.packages("bunchr") library(bunchr) bunchApp()
This package has a C++ implementation for calculating chill portions, an important metric in agronomy (see Fishman 1987). It is specially used for bloom prediction in fruit trees. The chill portion calculation is sequential, based on a vector of temperatures. Temperatures need to stay within a certain range for a certain time for a chill portion to “bank”. Therefore, this function cannot be vectorized. This mini package implements a chill calculation procedure in R embedded C++ environment (Rcpp), making chill calculation orders of magnitude faster than a normal R based loop.
At this point, I do not intend to publish this mini package on CRAN. You can download the binary package here or from the GitHub Repository, which also contains the source code. If you have Rtools installed, you can also download and automatically compile it by running the following code: