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 | 13526.351 |
Itemizers (#m) | 27.470 | 31.180 | 31.160 |
Itemized Deduction ($b) | 745.352 | 862.703 | 881.997 |
Standard Deduction Filers (#m) | 176.900 | 175.780 | 178.500 |
Standard Deduction ($b) | 3080.762 | 3091.912 | 3231.311 |
Personal Exemption ($b) | 0.000 | 0.000 | 0.000 |
Taxable Income ($b) | 8615.433 | 10049.898 | 10315.173 |
Regular Tax ($b) | 1497.393 | 1762.841 | 1834.718 |
AMT Income ($b) | 10965.716 | 12473.893 | 12804.245 |
AMT Liability ($b) | 0.541 | 1.446 | 0.638 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1497.933 | 1764.287 | 1835.356 |
Refundable Credits ($b) | 655.022 | 827.135 | 98.486 |
Nonrefundable Credits ($b) | 99.198 | 0.005 | 107.732 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.874 | 82.267 | 87.882 |
Ind Income Tax ($b) | 819.588 | 1019.414 | 1717.021 |
Payroll Taxes ($b) | 1154.642 | 1250.313 | 1348.039 |
Combined Liability ($b) | 1974.229 | 2269.727 | 3065.059 |
With Income Tax <= 0 (#m) | 133.130 | 126.020 | 94.510 |
With Combined Tax <= 0 (#m) | 98.170 | 97.730 | 67.880 |
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 | 13526.351 |
Itemizers (#m) | 27.390 | 31.060 | 31.030 |
Itemized Deduction ($b) | 742.838 | 859.367 | 878.421 |
Standard Deduction Filers (#m) | 176.980 | 175.900 | 178.630 |
Standard Deduction ($b) | 3082.124 | 3093.960 | 3233.508 |
Personal Exemption ($b) | 375.177 | 384.158 | 406.780 |
Taxable Income ($b) | 8367.731 | 9785.467 | 10038.734 |
Regular Tax ($b) | 1499.234 | 1766.802 | 1840.999 |
AMT Income ($b) | 10969.767 | 12478.669 | 12809.346 |
AMT Liability ($b) | 0.547 | 1.477 | 0.637 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1499.782 | 1768.279 | 1841.636 |
Refundable Credits ($b) | 658.339 | 827.135 | 102.191 |
Nonrefundable Credits ($b) | 93.536 | 0.002 | 102.059 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.874 | 82.267 | 87.882 |
Ind Income Tax ($b) | 823.781 | 1023.408 | 1725.269 |
Payroll Taxes ($b) | 1154.642 | 1250.313 | 1348.039 |
Combined Liability ($b) | 1978.423 | 2273.721 | 3073.308 |
With Income Tax <= 0 (#m) | 135.240 | 128.230 | 96.990 |
With Combined Tax <= 0 (#m) | 98.930 | 98.610 | 68.610 |
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 | 13491.061 |
Itemizers (#m) | 27.360 | 31.030 | 31.010 |
Itemized Deduction ($b) | 741.569 | 857.627 | 876.846 |
Standard Deduction Filers (#m) | 177.010 | 175.930 | 178.650 |
Standard Deduction ($b) | 3082.683 | 3094.695 | 3234.007 |
Personal Exemption ($b) | 375.177 | 384.158 | 406.780 |
Taxable Income ($b) | 8341.362 | 9752.504 | 10004.141 |
Regular Tax ($b) | 1487.278 | 1752.439 | 1825.763 |
AMT Income ($b) | 10943.764 | 12446.302 | 12775.127 |
AMT Liability ($b) | 0.547 | 1.475 | 0.633 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1487.825 | 1753.914 | 1826.397 |
Refundable Credits ($b) | 658.049 | 827.121 | 101.922 |
Nonrefundable Credits ($b) | 93.768 | 0.002 | 102.309 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 75.394 | 81.712 | 87.313 |
Ind Income Tax ($b) | 811.401 | 1008.502 | 1709.479 |
Payroll Taxes ($b) | 1154.162 | 1249.473 | 1347.161 |
Combined Liability ($b) | 1965.563 | 2257.975 | 3056.640 |
With Income Tax <= 0 (#m) | 135.210 | 128.200 | 96.830 |
With Combined Tax <= 0 (#m) | 98.910 | 98.580 | 68.420 |
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 |