Learn R Programming

bunchr (version 1.2.0)

kink_estimator: Analyzing Bunching at a Kink

Description

Given a kinked budget set, this function gets a vector of earnings and analyzes bunching. This function could be run independently, but best used through the bunch function.

Usage

kink_estimator(earnings, zstar, t1, t2, cf_start = NA, cf_end = NA, exclude_before = 2, exclude_after = 2, binw = 10, poly_size = 7, convergence = 0.01, max_iter = 100, correct = TRUE, select = TRUE, draw = TRUE, title = "Bunching Visualization", varname = "Earnings")

Arguments

earnings
Vector of earnings, hopefully a very large one.
zstar
Place of kink (critical earning point).
t1
Marginal tax rate before kink.
t2
Marginal tax rate after kink.
cf_start
Number of bins before the kink bin where counter-factual histogram should start.
cf_end
Number of bins after the kink bin where counter-factual histogram should start.
exclude_before
Number of excluded bins before the kink bin.
exclude_after
Number of excluded bins after the kink bin.
binw
Bin width.
poly_size
Order of polynomial used to calculate counter-factual histogram.
convergence
Minimal rate of change of bunching estimate to stop iterations.
max_iter
Maximum number of iterations for bunching estimates.
correct
Should the counter-factual histogram be corrected to compensate for shifting left because of the notch? See details.
select
Should model selection be used to find counter-factual histogram? See details.
draw
Should a graph be drawn?
title
Title for plot output
varname
Name for running variable, to be desplayed in the plot

Value

kink_estimator returns a list of the following variables:

Details

A histogram is created from the earnings vector, with the kink point zstar as the center of one of the bins.

Correction of the counter-factual is required, as the kink-induced bunching will shift the whole distribution on the right side of the kink to the left. This option follows Chetty et al (2009) in correcting for this.

Model selection works using the step function from the stats package. It runs backwards from the full polynomial model, trying to find the best explanatory model using the Akaike information criterion.

References

Chetty, R., Friedman, J., Olsen, T., Pistaferri, L. (2009) Adjustment Costs, Firm Responses, and Micro vs. Macro Labor Supply Elasticities: Evidence from Danish Tax Records, Quarterly Journal of Economics, 126(2).

See Also

bunch, notch_estimator

Examples

Run this code
ability_vec <- 4000 * rbeta(100000, 2, 5)
earning_vec <- sapply(ability_vec, earning_fun, 0.2, 0, 0.2, 0, 1000)
# bunch_viewer(earning_vec, 1000, 40, 40, 1, 1, binw = 10)
kink_estimator(earning_vec, 1000, 0, 0.2, 40, 40, 1, 1, binw = 10, draw = FALSE)$e

Run the code above in your browser using DataLab