PSLmodels / InverseOptimalTax

Inverse optimal taxation model
https://pslmodels.github.io/InverseOptimalTax/
1 stars 3 forks source link

adds pareto tails for lognormal and kde #26

Closed john-p-ryan closed 2 weeks ago

john-p-ryan commented 6 months ago

This PR adds several methods for calculating the income distribution with a Pareto tail. These methods include a simultaneous estimate of the cutoff and pareto parameter via maximum likelihood, as well as 2 options for sequentially estimating the upper tail, with the body being estimated by lognormal or kernel density estimation.

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 12.50000% with 35 lines in your changes missing coverage. Please review.

Project coverage is 56.42%. Comparing base (10985c1) to head (634d1af). Report is 10 commits behind head on main.

Files Patch % Lines
iot/inverse_optimal_tax.py 12.50% 35 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #26 +/- ## =========================================== - Coverage 72.81% 56.42% -16.39% =========================================== Files 3 3 Lines 103 140 +37 =========================================== + Hits 75 79 +4 - Misses 28 61 +33 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/InverseOptimalTax/pull/26/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/InverseOptimalTax/pull/26/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `56.42% <12.50%> (-16.39%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

john-p-ryan commented 6 months ago

Added the notebook used to plot the income dists. The issue with very noisy g_z is resolved when the notebook is run in order. However, the discontinuity at the pareto cutoff is more pronounced. Work may be needed to smooth the derivative estimate at the cutoff.

jdebacker commented 3 months ago

@john-p-ryan Please sync this branch to the master, which will help pass the CI tests on GH Actions. Thanks!