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 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.170
2020_REFORM_STATIC__itax_rev($B)= 766.855
2020_REFORM_DYNAMIC_itax_rev($B)= 755.060

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 13156.205 13723.185
Itemizers (#m) 27.730 32.030 31.220
Itemized Deduction ($b) 752.189 880.903 882.969
Standard Deduction Filers (#m) 176.750 175.050 178.440
Standard Deduction ($b) 3075.468 3066.702 3229.758
Personal Exemption ($b) 0.000 0.000 0.000
Taxable Income ($b) 8617.397 10040.159 10505.738
Regular Tax ($b) 1505.274 1760.905 1864.719
AMT Income ($b) 11012.668 12497.322 13059.342
AMT Liability ($b) 0.568 1.811 1.322
AMT Filers (#m) 0.090 0.330 0.250
Tax before Credits ($b) 1505.841 1762.716 1866.041
Refundable Credits ($b) 654.861 827.256 98.250
Nonrefundable Credits ($b) 99.385 0.005 107.651
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.575 13.844 14.446
Ind Income Tax ($b) 764.170 949.299 1674.587
Payroll Taxes ($b) 1217.941 1318.728 1421.579
Combined Liability ($b) 1982.111 2268.028 3096.166
With Income Tax <= 0 (#m) 135.170 127.680 95.970
With Combined Tax <= 0 (#m) 98.150 97.700 67.730
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 13156.205 13723.185
Itemizers (#m) 27.660 31.890 31.110
Itemized Deduction ($b) 749.755 877.489 879.822
Standard Deduction Filers (#m) 176.820 175.180 178.560
Standard Deduction ($b) 3076.756 3068.785 3231.586
Personal Exemption ($b) 375.177 383.210 404.808
Taxable Income ($b) 8369.678 9776.270 10230.157
Regular Tax ($b) 1505.595 1764.964 1871.117
AMT Income ($b) 11014.938 12500.520 13062.305
AMT Liability ($b) 0.585 1.927 1.414
AMT Filers (#m) 0.090 0.350 0.270
Tax before Credits ($b) 1506.180 1766.891 1872.531
Refundable Credits ($b) 658.196 827.256 101.933
Nonrefundable Credits ($b) 93.705 0.002 102.012
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.575 13.844 14.446
Ind Income Tax ($b) 766.855 953.478 1683.031
Payroll Taxes ($b) 1217.941 1318.728 1421.579
Combined Liability ($b) 1984.796 2272.206 3104.610
With Income Tax <= 0 (#m) 137.340 129.960 98.600
With Combined Tax <= 0 (#m) 98.910 98.600 68.450
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.479 13123.042 13686.894
Itemizers (#m) 27.630 31.870 31.080
Itemized Deduction ($b) 748.521 875.970 878.204
Standard Deduction Filers (#m) 176.850 175.200 178.580
Standard Deduction ($b) 3077.317 3069.335 3232.059
Personal Exemption ($b) 375.177 383.210 404.808
Taxable Income ($b) 8344.174 9743.507 10194.449
Regular Tax ($b) 1494.026 1750.669 1855.496
AMT Income ($b) 10990.180 12468.655 13027.447
AMT Liability ($b) 0.583 1.967 1.452
AMT Filers (#m) 0.090 0.350 0.280
Tax before Credits ($b) 1494.609 1752.636 1856.948
Refundable Credits ($b) 657.905 827.233 101.663
Nonrefundable Credits ($b) 93.933 0.002 102.266
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 12.290 13.496 14.083
Ind Income Tax ($b) 755.060 938.897 1667.103
Payroll Taxes ($b) 1217.293 1317.688 1420.460
Combined Liability ($b) 1972.353 2256.585 3087.563
With Income Tax <= 0 (#m) 137.310 129.930 98.420
With Combined Tax <= 0 (#m) 98.880 98.570 68.270
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