Recipe 2: Estimating Behavioral Response to Reform#
This is an advanced recipe that should be followed only after mastering the basic recipe. This recipe shows how to analyze the behavioral responses to a tax reform using the Behavioral-Responses behresp package.
import sys
if 'google.colab' in sys.modules:
!pip install -q condacolab &> /dev/null # dev/null suppresses output
import condacolab
condacolab.install()
import taxcalc as tc
import behresp
# use publicly-available CPS input file
recs = tc.Records.cps_constructor()
# specify baseline Calculator object representing current-law policy
pol = tc.Policy()
calc1 = tc.Calculator(policy=pol, records=recs)
CYR = 2020
# calculate aggregate current-law income tax liabilities for cyr
calc1.advance_to_year(CYR)
calc1.calc_all()
itax_rev1 = calc1.weighted_total('iitax')
# specify Calculator object for static analysis of reform policy
pol.implement_reform(tc.Policy.read_json_reform('github://PSLmodels:Tax-Calculator@master/docs/recipes/_static/reformA.json'))
calc2 = tc.Calculator(policy=pol, records=recs)
# calculate reform income tax liabilities for cyr under static assumptions
calc2.advance_to_year(CYR)
calc2.calc_all()
itax_rev2sa = calc2.weighted_total('iitax')
# specify assumed non-zero response-function substitution elasticity
response_elasticities = {'sub': 0.25}
# specify Calculator object for analysis of reform with behavioral responses
calc2 = tc.Calculator(policy=pol, records=recs)
calc2.advance_to_year(CYR)
_, df2br = behresp.response(calc1, calc2, response_elasticities)
# calculate reform income tax liabilities for CYR with behavioral response
itax_rev2br = (df2br['iitax'] * df2br['s006']).sum()
# print total income tax revenue estimates for CYR
# (estimates in billons of dollars)
print('{}_CURRENT_LAW_P__itax_rev($B)= {:.3f}'.format(CYR, itax_rev1 * 1e-9))
print('{}_REFORM_STATIC__itax_rev($B)= {:.3f}'.format(CYR, itax_rev2sa * 1e-9))
print('{}_REFORM_DYNAMIC_itax_rev($B)= {:.3f}'.format(CYR, itax_rev2br * 1e-9))
2020_CURRENT_LAW_P__itax_rev($B)= 819.588
2020_REFORM_STATIC__itax_rev($B)= 823.781
2020_REFORM_DYNAMIC_itax_rev($B)= 811.401
Create multi-year diagnostic tables for
baseline,
reform excluding behavioral responses, and
reform including behavioral responses
NUM_YEARS = 3 # number of diagnostic table years beginning with CYR
dtable1 = calc1.diagnostic_table(NUM_YEARS)
dtable2 = calc2.diagnostic_table(NUM_YEARS)
dvar_list3 = list()
year_list3 = list()
for year in range(CYR, CYR + NUM_YEARS):
calc1.advance_to_year(year)
calc2.advance_to_year(year)
_, df2br = behresp.response(calc1, calc2, response_elasticities)
dvar_list3.append(df2br)
year_list3.append(year)
dtable3 = tc.create_diagnostic_table(dvar_list3, year_list3)
Diagnostic table for baseline:
dtable1
2020 | 2021 | 2022 | |
---|---|---|---|
Returns (#m) | 204.480 | 207.080 | 209.660 |
AGI ($b) | 11573.238 | 13174.913 | 13543.810 |
Itemizers (#m) | 27.470 | 31.180 | 31.160 |
Itemized Deduction ($b) | 745.352 | 862.703 | 881.914 |
Standard Deduction Filers (#m) | 176.900 | 175.780 | 178.500 |
Standard Deduction ($b) | 3080.762 | 3091.912 | 3231.365 |
Personal Exemption ($b) | 0.000 | 0.000 | 0.000 |
Taxable Income ($b) | 8615.433 | 10049.898 | 10332.188 |
Regular Tax ($b) | 1497.393 | 1762.841 | 1837.363 |
AMT Income ($b) | 10965.716 | 12473.893 | 12821.784 |
AMT Liability ($b) | 0.541 | 1.446 | 0.659 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1497.933 | 1764.287 | 1838.022 |
Refundable Credits ($b) | 655.022 | 827.135 | 98.462 |
Nonrefundable Credits ($b) | 99.198 | 0.005 | 107.726 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.874 | 82.267 | 87.893 |
Ind Income Tax ($b) | 819.588 | 1019.414 | 1719.728 |
Payroll Taxes ($b) | 1154.642 | 1250.313 | 1348.039 |
Combined Liability ($b) | 1974.229 | 2269.727 | 3067.767 |
With Income Tax <= 0 (#m) | 133.130 | 126.020 | 94.490 |
With Combined Tax <= 0 (#m) | 98.170 | 97.730 | 67.860 |
UBI Benefits ($b) | 0.000 | 0.000 | 0.000 |
Total Benefits, Consumption Value ($b) | 3617.042 | 3992.973 | 4069.559 |
Total Benefits Cost ($b) | 3617.042 | 3992.973 | 4069.559 |
Diagnostic table for reform, excluding behavioral responses:
dtable2
2020 | 2021 | 2022 | |
---|---|---|---|
Returns (#m) | 204.480 | 207.080 | 209.660 |
AGI ($b) | 11573.238 | 13174.913 | 13543.810 |
Itemizers (#m) | 27.390 | 31.060 | 31.030 |
Itemized Deduction ($b) | 742.838 | 859.367 | 878.418 |
Standard Deduction Filers (#m) | 176.980 | 175.900 | 178.630 |
Standard Deduction ($b) | 3082.124 | 3093.960 | 3233.538 |
Personal Exemption ($b) | 375.177 | 384.158 | 406.780 |
Taxable Income ($b) | 8367.731 | 9785.468 | 10055.691 |
Regular Tax ($b) | 1499.234 | 1766.802 | 1843.632 |
AMT Income ($b) | 10969.767 | 12478.669 | 12826.810 |
AMT Liability ($b) | 0.547 | 1.477 | 0.658 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1499.782 | 1768.279 | 1844.290 |
Refundable Credits ($b) | 658.339 | 827.135 | 102.168 |
Nonrefundable Credits ($b) | 93.536 | 0.002 | 102.053 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.874 | 82.267 | 87.893 |
Ind Income Tax ($b) | 823.781 | 1023.408 | 1727.962 |
Payroll Taxes ($b) | 1154.642 | 1250.313 | 1348.039 |
Combined Liability ($b) | 1978.423 | 2273.721 | 3076.001 |
With Income Tax <= 0 (#m) | 135.240 | 128.230 | 96.970 |
With Combined Tax <= 0 (#m) | 98.930 | 98.610 | 68.600 |
UBI Benefits ($b) | 0.000 | 0.000 | 0.000 |
Total Benefits, Consumption Value ($b) | 3617.042 | 3992.973 | 4069.559 |
Total Benefits Cost ($b) | 3617.042 | 3992.973 | 4069.559 |
Diagnostic table for reform, including behavioral responses:
dtable3
2020 | 2021 | 2022 | |
---|---|---|---|
Returns (#m) | 204.480 | 207.080 | 209.660 |
AGI ($b) | 11546.617 | 13141.583 | 13508.422 |
Itemizers (#m) | 27.360 | 31.030 | 31.010 |
Itemized Deduction ($b) | 741.569 | 857.627 | 876.849 |
Standard Deduction Filers (#m) | 177.010 | 175.930 | 178.650 |
Standard Deduction ($b) | 3082.683 | 3094.695 | 3234.037 |
Personal Exemption ($b) | 375.177 | 384.158 | 406.780 |
Taxable Income ($b) | 8341.362 | 9752.504 | 10020.994 |
Regular Tax ($b) | 1487.278 | 1752.439 | 1828.367 |
AMT Income ($b) | 10943.764 | 12446.302 | 12792.487 |
AMT Liability ($b) | 0.547 | 1.475 | 0.655 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1487.825 | 1753.914 | 1829.022 |
Refundable Credits ($b) | 658.049 | 827.121 | 101.898 |
Nonrefundable Credits ($b) | 93.768 | 0.002 | 102.303 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.394 | 81.712 | 87.322 |
Ind Income Tax ($b) | 811.401 | 1008.502 | 1712.143 |
Payroll Taxes ($b) | 1154.162 | 1249.473 | 1347.163 |
Combined Liability ($b) | 1965.563 | 2257.975 | 3059.306 |
With Income Tax <= 0 (#m) | 135.210 | 128.200 | 96.810 |
With Combined Tax <= 0 (#m) | 98.910 | 98.580 | 68.400 |
UBI Benefits ($b) | 0.000 | 0.000 | 0.000 |
Total Benefits, Consumption Value ($b) | 3617.042 | 3992.973 | 4069.559 |
Total Benefits Cost ($b) | 3617.042 | 3992.973 | 4069.559 |