GithubHelp home page GithubHelp logo

bunchr's People

Contributors

trilnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bunchr's Issues

Allow for binning where z* is not in the center of a bin

I'm not sure why it was set up this way to begin with. It's possible to change. However, since the calculations are done by binning, a highly asymmetrical placement could give weird results. I wonder if users can be trusted with this. In any case, perhaps I could add the option for users to input their own bins.

Allow for multiple kinks and notches

This came as a feedback several times. Right now only 1 kink or notch are allowed (for notches, a change in MRT is also allowed in the notch). This could have several implications:

  1. In earning_fun.R, a function that takes the "ability" level and returns an earning, more than two tangents to the budgets line could be possibles. Combined with another issue (upward kinks and notches), this calls for a constrained optimization (linear, but not necessarily convex) of the utility. Glancing at what's available, I'm not sure if there is something easy to use. It might be more straight forward to partition the budget set by kink (and notch) points, find the tangent on each one, and then pick the best point. This assumes the solution would be unique, but this is also the case in the function right now (default in case of equality is to bunch at zstar).
  2. Would need to solve the elasticity for multiple kinks and notches. Right now, the kinks are solved by getting the bunching mass and using a simple formula. This might not be appropriate, as potentially several solutions would need to be checked for. Is there even a unique solution? A paper by Bertanha, McCallum, and Seeegart ("Better bunching, nicer notching") seems to have a way to solve this, look it up.
  3. When you have a unique point, you can solve for the average elasticity of labor supply at the point of the notch/kink. Would bunchr return a vector of averages (and CIs if bootstrapping is appplied) or some sort of functional form? Allowing for structure could reduce the dimensionality issue.
  4. Plotting would need to adjust.
  5. bunchApp would need to adjust, or perhaps just keep the simple formulation.

Allow for upward kinks

I've heard this several times. While upward kinks exist in real life (e.g. overtime pay), I don't know about much literature on them. In fact, Kleven (2016) writes that it is possible to calculate an elasticity with them, but researchers are not really trying to because the positive kink should create a hole in the distribution, but it is not observed in real life data. Nevertheless, let's think of how this would work:

  1. Think of a upward, concave kink, i.e. t2<t1.
  2. Think of nice, well behaved, indifference curves between earnings and consumption. They are convex, increasing, and with increasing slope. For a specific type n, indifference curves of different budgets may not intersect.
  3. For an upward, concave kink, there would be a marginal unaffected type, n*, whose curve has two tangents with the kinked budget line, $n*$ and $n*+\Delta n$, where $n* \le z$ and $n*+\Delta n \ge z*$. Note that Then, since curved are nicely behaved (smooth), there will be such an agent (an agent with tangent at z* will intersect with the kinked budget line). Since agents with higher ability have curves with lower slope at any given n, we know that:
    a. All agents with types n s.t. $n* \leq n\leq z*$ will have a new tangent point in the post-kink area, and since their slopes are lower than $n*$'s slope at any given earning, this point will be greater than $n*+\Delta n$. That means, there should be a hole in the actual distribution of earnings between $n*$ and $z*$.
    b. All Agents with types n s.t. $n* \ge z*$ will change their earnings. At first, it seems like some might decrease their total earnings (income effect?), but if we are dealing with the quasi-linear, iso-elastic function we see that: $$\delta z / \delta (1-t) =n * e * (1-t)^{e-1} \ge 0$$ and therefore all their respective earnings increase. In fact, since their slope is lower than n*'s at any earning point, their new tangent point would be at a higher z than $n*+\Delta n$, so the hole extends at least until then.
  4. With the location of the hole, representing the two tangent point of the indifferent type, one could figure out the elasticity of that marginal type. (note: Kleven writes that " the width of the hole can be linked to the compensated earnings elasticity", I don't immediately see how you can do this with just the width, as I don't see any guarantee of symmetry around z*).

Allow for upwards Notches

This was specifically requested. This also could have real life implications which seem more plausible to exist in the data: think of a high bonus after working more than X hours. If people can alter X, nobody would want miss X by an hour. Here, people bunch from the lower side, not the higher, but the process should be very similar. In fact, it might be feasible to do with just flipping the signs on some of the variables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.