Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new growfactors.csv file to implement single-target extrapolation of benefits #2041

Merged
merged 9 commits into from
Aug 10, 2018
Merged

Use new growfactors.csv file to implement single-target extrapolation of benefits #2041

merged 9 commits into from
Aug 10, 2018

Conversation

martinholmer
Copy link
Collaborator

@martinholmer martinholmer commented Aug 3, 2018

This pull request changes Tax-Calculator logic to use the new growfactors.csv file generated by taxdata pull request 271. These changes are part of a series of changes in the taxdata and Tax-Calculator repositories that will simplify the benefit extrapolation logic. The reasons for undertaking this simplification have been discussed in taxdata pull request 252.

In this pull request we change the benefit extrapolation logic to be the same as the extrapolation logic for the other_ben, social security, unemployment insurance, and all other dollar-denominated Tax-Calculator input variables. That logic is to assume that in each future year the sample filing units with a zero variable value continue to have a zero value and the sample filing units with a positive variable value continue to have a positive value, which is equal to the prior year's value multiplied by a growth factor (from the growfactor.csv file). This means the unweighted count of filing units that have a positive variable value is unchanged from year to year. However, the sampling weights (from the ???_weights.csv.gz files) change from year to year, so that the weighted count of filing units that have a positive variable value does change from year to year.

This pull request also adds the benefit growfactors to the growdiff.json file and to the growdiff.py code, so that now benefit extrapolation assumptions can be changed by users using a JSON assumption file, which is not something that users could do before this pull request.

@MattHJensen @Amy-Xu @andersonfrailey @hdoupe

@codecov-io
Copy link

codecov-io commented Aug 3, 2018

Codecov Report

Merging #2041 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2041      +/-   ##
==========================================
- Coverage   99.97%   99.97%   -0.01%     
==========================================
  Files          16       16              
  Lines        3588     3555      -33     
==========================================
- Hits         3587     3554      -33     
  Misses          1        1
Impacted Files Coverage Δ
taxcalc/growfactors.py 100% <ø> (ø) ⬆️
taxcalc/taxcalcio.py 100% <ø> (ø) ⬆️
taxcalc/records.py 100% <100%> (ø) ⬆️
taxcalc/growdiff.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a82e2e...d1f474c. Read the comment docs.

@martinholmer martinholmer added ready and removed WIP labels Aug 5, 2018
@martinholmer
Copy link
Collaborator Author

Tax-Calculator pull request #2041 is ready for review as is the related taxdata pull request 271.

@MattHJensen @Amy-Xu @andersonfrailey @hdoupe

@martinholmer
Copy link
Collaborator Author

martinholmer commented Aug 9, 2018

I'm hoping for some reviews of Tax-Calculator pull request #2041.
If people don't have time to review, I plan to meger #2041 in the afternoon of Friday, August 10th.

@MattHJensen @Amy-Xu @andersonfrailey @hdoupe

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 10, 2018

@martinholmer Just to clarify, if a user wants to make changes to the the benefit parameters, then this PR will not require them to change the way they use Tax-Calculator unless they want to supply their own growfactors for the benefits. Is that correct?

@martinholmer
Copy link
Collaborator Author

@hdoupe asked:

Just to clarify, if a user wants to make changes to the benefit parameters, then this PR will not require them to change the way they use Tax-Calculator unless they want to supply their own growfactors for the benefits. Is that correct?

Not sure I understand what you mean by "make changes to the benefit parameters."

But it is true that "this PR will not require them to change the way they use Tax-Calculator unless they want to supply their own growfactors for the benefits." You question points out something that hadn't occurred to me: there was no way for a user to change the benefit extrapolation assumptions before this pull request; now there is a way (revise the benefit growfactors using the growdiff_baseline and/or the growdiff_response elements of an assumptions JSON file).

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 10, 2018

@martinholmer Sorry for not being clear. By "make changes to the benefits parameters", I was referring to updating them via the implement_reform method.

Thanks for clarifying. Everything looks good to me in #2041.

@martinholmer
Copy link
Collaborator Author

@hdoupe said:

By "make changes to the benefits parameters", I was referring to updating them via the implement_reform method [of the Policy class].

Are there any benefit-related policy parameters?
There certainly are benefit-related assumption parameters, and you question made me notice I need to make more code changes to add the them to the GrowDiff class. So, thanks for the review. It was very helpful.

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 10, 2018

Are there any benefit-related policy parameters?

That's what these are, right?
screen shot 2018-08-10 at 11 27 40 am

https://github.com/open-source-economics/Tax-Calculator/blob/0.20.1/taxcalc/current_law_policy.json#L6557-L6819

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 10, 2018

So, thanks for the review. It was very helpful.

Sure, I'm glad I could help.

@martinholmer
Copy link
Collaborator Author

@hdoupe, Yes you are correct that the benefit repeal parameters are policy parameters.
They continue to work just as they did before this pull request.

@hdoupe
Copy link
Collaborator

hdoupe commented Aug 10, 2018

Great, thanks @martinholmer

@martinholmer martinholmer merged commit 8456c9f into PSLmodels:master Aug 10, 2018
@martinholmer martinholmer deleted the new-benefit-blowup branch August 10, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants