Fix macro-elasticity logic so that GDP change in year t depends on tax change in year t-1 #1579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes the problem identified in the discussion of TaxBrain issue 680. The 680 discussion was very useful because several people contributed important insights: @GoFroggyRun pointed out the only nine rather than ten GDP change values are being saved in the TaxBrain database of past runs; @talumbau pointed out relevant changes in Tax-Calculator in #1314; and @Amy-Xu pointed out that the academic literature (namely the Barro-Redlick paper for which she provided a public link) estimates the change in GDP in year t using the reform-induced change in the average marginal tax rate in year t-1.
This pull request is based on my understanding of the 680 discussion, which is laid out in this comment.
The lag logic introduced in this pull request will cause Tax-Calculator to generate different GDP change estimates.
The newly introduced lag logic also implies a need to revise TaxBrain in several ways:
First, the
run_nth_year_gdp_elast_model
function needs to be called for all ten budget years using a loop something like this:Second, the numerical values for GDP change need to be shown on the Macro-Elasticity results page for all ten years (that is, the NA needs to be removed).
And third, all ten numerical values of GDP change need to be saved in the TaxBrain run database.
@MattHJensen @feenberg @andersonfrailey @hdoupe @brittainhard
P.S. This pull request consists of only a couple of commits beginning with 8ee99a3. All the commits before that one are part of pull request #1577, which is still open waiting for review and discussion.