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)= 764.231
2020_REFORM_STATIC__itax_rev($B)= 766.915
2020_REFORM_DYNAMIC_itax_rev($B)= 755.118

Create multi-year diagnostic tables for

  1. baseline,

  2. reform excluding behavioral responses, and

  3. 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.730 32.030 31.210
Itemized Deduction ($b) 752.189 880.850 883.139
Standard Deduction Filers (#m) 176.750 175.050 178.450
Standard Deduction ($b) 3075.468 3066.738 3229.828
Personal Exemption ($b) 0.000 0.000 0.000
Taxable Income ($b) 8617.397 10058.553 10330.427
Regular Tax ($b) 1505.334 1764.023 1837.027
AMT Income ($b) 11012.668 12516.075 12879.780
AMT Liability ($b) 0.568 1.854 1.056
AMT Filers (#m) 0.090 0.340 0.220
Tax before Credits ($b) 1505.902 1765.877 1838.083
Refundable Credits ($b) 654.861 827.137 98.469
Nonrefundable Credits ($b) 99.385 0.005 107.717
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.575 13.851 14.353
Ind Income Tax ($b) 764.231 952.587 1646.250
Payroll Taxes ($b) 1217.941 1318.728 1421.579
Combined Liability ($b) 1982.172 2271.315 3067.829
With Income Tax <= 0 (#m) 135.170 127.670 96.120
With Combined Tax <= 0 (#m) 98.150 97.690 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.660 31.890 31.100
Itemized Deduction ($b) 749.755 877.445 879.823
Standard Deduction Filers (#m) 176.820 175.180 178.570
Standard Deduction ($b) 3076.756 3068.813 3231.754
Personal Exemption ($b) 375.177 383.210 404.808
Taxable Income ($b) 8369.678 9794.620 10055.373
Regular Tax ($b) 1505.655 1768.071 1843.540
AMT Income ($b) 11014.938 12519.266 12882.887
AMT Liability ($b) 0.585 1.969 1.141
AMT Filers (#m) 0.090 0.360 0.240
Tax before Credits ($b) 1506.241 1770.040 1844.681
Refundable Credits ($b) 658.196 827.137 102.158
Nonrefundable Credits ($b) 93.705 0.002 102.071
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.575 13.851 14.353
Ind Income Tax ($b) 766.915 956.752 1654.805
Payroll Taxes ($b) 1217.941 1318.728 1421.579
Combined Liability ($b) 1984.856 2275.480 3076.384
With Income Tax <= 0 (#m) 137.340 129.940 98.750
With Combined Tax <= 0 (#m) 98.910 98.580 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) 11547.476 13141.726 13508.145
Itemizers (#m) 27.630 31.870 31.070
Itemized Deduction ($b) 748.521 875.915 878.224
Standard Deduction Filers (#m) 176.850 175.210 178.590
Standard Deduction ($b) 3077.317 3069.365 3232.227
Personal Exemption ($b) 375.177 383.210 404.808
Taxable Income ($b) 8344.171 9761.839 10020.315
Regular Tax ($b) 1494.083 1753.766 1828.155
AMT Income ($b) 10990.177 12487.388 12848.637
AMT Liability ($b) 0.583 2.012 1.172
AMT Filers (#m) 0.090 0.350 0.250
Tax before Credits ($b) 1494.666 1755.778 1829.327
Refundable Credits ($b) 657.905 827.116 101.889
Nonrefundable Credits ($b) 93.933 0.002 102.321
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.290 13.503 14.008
Ind Income Tax ($b) 755.118 942.162 1639.125
Payroll Taxes ($b) 1217.293 1317.690 1420.463
Combined Liability ($b) 1972.410 2259.853 3059.588
With Income Tax <= 0 (#m) 137.310 129.910 98.590
With Combined Tax <= 0 (#m) 98.880 98.550 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