PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Module to update `taxcalc` grow factors #117

Closed jdebacker closed 4 months ago

jdebacker commented 4 months ago

This PR adds a module with utilities to update the growth factors used to extrapolate micro data in the Tax-Calculator model. The functions use output from OG-USA to update the growth factors to reflect macroeconomic outcome consistent with a particular OG-USA simulation.

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 42 lines in your changes missing coverage. Please review.

Project coverage is 45.12%. Comparing base (acb734c) to head (a8c71a6).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/117/graphs/tree.svg?width=650&height=150&src=pr&token=XOLXIKEL86&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #117 +/- ## ========================================== - Coverage 46.51% 45.12% -1.40% ========================================== Files 17 18 +1 Lines 1363 1405 +42 ========================================== Hits 634 634 - Misses 729 771 +42 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/117/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/OG-USA/pull/117/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `45.12% <0.00%> (-1.40%)` | :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. | [Files](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/117?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogusa/growfactor\_update.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/117?src=pr&el=tree&filepath=ogusa%2Fgrowfactor_update.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvZ3Jvd2ZhY3Rvcl91cGRhdGUucHk=) | `0.00% <0.00%> (ø)` | |
rickecon commented 4 months ago

@jdebacker. Is this to be used for one iteration between taxcalc and ogusa? Tell me if my understanding of what this does is correct. The changed function in this PR simply creates OG-USA growth factors that are analogous to those from taxcalc. But below is my understanding of what that would be used for.

Current functionality:

New functionality:

jdebacker commented 4 months ago

@rickecon The utilities in this PR may be used for the purposes you suggest. However, the use case I've had so far is to simply update the growth factors for data used in taxcalc so that the growth factors are consistent with an alternative baselined (i.e., not a current law baseline as existing growth factors based on CBO forecasts assume). These utilities can be used to update those "initial" growth factors to be consistent with an alternative policy baseline by simulating that alternative in OG-USA and using the percentage changes between that simulation and the current law baseline.

rickecon commented 4 months ago

@jdebacker. Is this ready to merge? The code looks good to me, although there are no tests.

jdebacker commented 4 months ago

@rickecon Yes, not like me to have some tests. But I wanted to get this done quick and not sure we'll have many users outside e me (I used the model to create the growfactors_ext.csv file for Tax-Calculator).

Let me see if I can write a few quick tests today. I'll get back to you with ah thumbs up to merge (with or without those tests) later today.