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)= 756.288
2020_REFORM_STATIC__itax_rev($B)= 760.481
2020_REFORM_DYNAMIC_itax_rev($B)= 748.283
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) | 12.575 | 13.851 | 14.353 |
Ind Income Tax ($b) | 756.288 | 950.998 | 1646.188 |
Payroll Taxes ($b) | 1217.941 | 1318.728 | 1421.579 |
Combined Liability ($b) | 1974.229 | 2269.727 | 3067.767 |
With Income Tax <= 0 (#m) | 135.440 | 127.760 | 96.120 |
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.392 | 878.434 |
Standard Deduction Filers (#m) | 176.980 | 175.890 | 178.630 |
Standard Deduction ($b) | 3082.124 | 3093.937 | 3233.549 |
Personal Exemption ($b) | 375.177 | 382.451 | 403.231 |
Taxable Income ($b) | 8367.731 | 9786.623 | 10058.039 |
Regular Tax ($b) | 1499.234 | 1766.989 | 1844.016 |
AMT Income ($b) | 10969.767 | 12478.640 | 12826.779 |
AMT Liability ($b) | 0.547 | 1.476 | 0.661 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1499.782 | 1768.465 | 1844.677 |
Refundable Credits ($b) | 658.339 | 827.135 | 102.136 |
Nonrefundable Credits ($b) | 93.536 | 0.002 | 102.102 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 12.575 | 13.851 | 14.353 |
Ind Income Tax ($b) | 760.481 | 955.179 | 1654.792 |
Payroll Taxes ($b) | 1217.941 | 1318.728 | 1421.579 |
Combined Liability ($b) | 1978.423 | 2273.907 | 3076.371 |
With Income Tax <= 0 (#m) | 137.590 | 130.020 | 98.740 |
With Combined Tax <= 0 (#m) | 98.930 | 98.610 | 68.590 |
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.541 | 13508.339 |
Itemizers (#m) | 27.360 | 31.030 | 31.010 |
Itemized Deduction ($b) | 741.569 | 857.646 | 876.858 |
Standard Deduction Filers (#m) | 177.010 | 175.930 | 178.650 |
Standard Deduction ($b) | 3082.683 | 3094.676 | 3234.022 |
Personal Exemption ($b) | 375.177 | 382.451 | 403.231 |
Taxable Income ($b) | 8341.362 | 9753.622 | 10023.254 |
Regular Tax ($b) | 1487.278 | 1752.619 | 1828.723 |
AMT Income ($b) | 10943.764 | 12446.237 | 12792.341 |
AMT Liability ($b) | 0.547 | 1.475 | 0.654 |
AMT Filers (#m) | 0.070 | 0.190 | 0.080 |
Tax before Credits ($b) | 1487.825 | 1754.094 | 1829.378 |
Refundable Credits ($b) | 658.049 | 827.122 | 101.868 |
Nonrefundable Credits ($b) | 93.768 | 0.002 | 102.351 |
Reform Surtaxes ($b) | 0.000 | 0.000 | 0.000 |
Other Taxes ($b) | 12.276 | 13.501 | 14.018 |
Ind Income Tax ($b) | 748.283 | 940.471 | 1639.177 |
Payroll Taxes ($b) | 1217.280 | 1317.682 | 1420.462 |
Combined Liability ($b) | 1965.563 | 2258.153 | 3059.639 |
With Income Tax <= 0 (#m) | 137.560 | 130.000 | 98.570 |
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 |