Closed jdebacker closed 10 months ago
@john-p-ryan In this PR I'm trying to move away from the binning of data by income group and rather approximate the earnings distribution and the MTR schedule directly from the raw data. This helps avoid zero weight bins.
The approximation of the population distribution seems to go quite well (although it doesn't exactly match the theoretical moments at all points in the distribution, it is close). But the approximation of the MTR schedule has proven more challenging. Fitting a spline function to the whole distribution often takes several minutes and it's seems tricky to get the smoothing parameter just right - either theirs too much noise or important curvature in the MTR schedule is missed.
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
fc84d50
) 90.24% compared to head (529b07f
) 81.81%. Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds some additional unit test, including one to compare the computational solution to an analytical one.
It also removes the binning of the raw data by income group and rather uses the raw data directly to approximate the income distribution (which should resolve Issue #16).