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:[email protected]/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)= 712.667
2020_REFORM_STATIC__itax_rev($B)= 714.208
2020_REFORM_DYNAMIC_itax_rev($B)= 702.853

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) 11338.160 12178.885 12493.166
Itemizers (#m) 27.080 28.040 26.590
Itemized Deduction ($b) 733.405 760.876 728.223
Standard Deduction Filers (#m) 177.400 179.040 183.070
Standard Deduction ($b) 3088.310 3145.577 3324.598
Personal Exemption ($b) 0.000 0.000 0.000
Taxable Income ($b) 8372.949 9125.984 9363.132
Regular Tax ($b) 1457.697 1585.908 1630.635
AMT Income ($b) 10791.932 11610.784 11949.975
AMT Liability ($b) 0.436 0.983 0.990
AMT Filers (#m) 0.080 0.240 0.220
Tax before Credits ($b) 1458.133 1586.891 1631.625
Refundable Credits ($b) 657.660 834.182 105.901
Nonrefundable Credits ($b) 98.801 2.124 103.661
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 10.995 11.777 12.343
Ind Income Tax ($b) 712.667 762.362 1434.405
Payroll Taxes ($b) 1206.565 1268.229 1323.010
Combined Liability ($b) 1919.232 2030.591 2757.416
With Income Tax <= 0 (#m) 135.980 130.830 99.840
With Combined Tax <= 0 (#m) 98.670 100.060 69.580
UBI Benefits ($b) 0.000 0.000 0.000
Total Benefits, Consumption Value ($b) 3617.949 4011.607 4064.249
Total Benefits Cost ($b) 3617.949 4011.607 4064.249

Diagnostic table for reform, excluding behavioral responses:

dtable2
2020 2021 2022
Returns (#m) 204.480 207.080 209.660
AGI ($b) 11338.160 12178.885 12493.166
Itemizers (#m) 27.010 27.960 26.550
Itemized Deduction ($b) 730.891 758.366 726.407
Standard Deduction Filers (#m) 177.470 179.110 183.120
Standard Deduction ($b) 3089.620 3146.904 3325.433
Personal Exemption ($b) 375.177 383.210 394.035
Taxable Income ($b) 8126.319 8866.341 9101.218
Regular Tax ($b) 1456.850 1587.260 1633.318
AMT Income ($b) 10794.282 11613.154 11951.775
AMT Liability ($b) 0.453 1.087 1.083
AMT Filers (#m) 0.080 0.260 0.240
Tax before Credits ($b) 1457.303 1588.346 1634.401
Refundable Credits ($b) 661.001 834.182 109.581
Nonrefundable Credits ($b) 93.088 2.002 97.967
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 10.995 11.777 12.343
Ind Income Tax ($b) 714.208 763.939 1439.195
Payroll Taxes ($b) 1206.565 1268.229 1323.010
Combined Liability ($b) 1920.773 2032.168 2762.206
With Income Tax <= 0 (#m) 138.300 133.050 102.350
With Combined Tax <= 0 (#m) 99.410 100.960 70.270
UBI Benefits ($b) 0.000 0.000 0.000
Total Benefits, Consumption Value ($b) 3617.949 4011.607 4064.249
Total Benefits Cost ($b) 3617.949 4011.607 4064.249

Diagnostic table for reform, including behavioral responses:

dtable3
2020 2021 2022
Returns (#m) 204.480 207.080 209.660
AGI ($b) 11313.505 12149.978 12463.380
Itemizers (#m) 26.980 27.930 26.530
Itemized Deduction ($b) 729.487 756.878 725.086
Standard Deduction Filers (#m) 177.500 179.150 183.140
Standard Deduction ($b) 3090.316 3147.648 3325.834
Personal Exemption ($b) 375.177 383.210 394.035
Taxable Income ($b) 8101.876 8837.586 9071.803
Regular Tax ($b) 1445.701 1574.544 1620.144
AMT Income ($b) 10770.764 11585.466 11923.163
AMT Liability ($b) 0.445 1.143 1.134
AMT Filers (#m) 0.080 0.270 0.240
Tax before Credits ($b) 1446.147 1575.687 1621.278
Refundable Credits ($b) 660.699 834.152 109.300
Nonrefundable Credits ($b) 93.329 2.011 98.203
Reform Surtaxes ($b) 0.000 0.000 0.000
Other Taxes ($b) 10.734 11.486 12.036
Ind Income Tax ($b) 702.853 751.010 1425.811
Payroll Taxes ($b) 1205.934 1267.363 1322.157
Combined Liability ($b) 1908.787 2018.373 2747.968
With Income Tax <= 0 (#m) 138.280 133.020 102.190
With Combined Tax <= 0 (#m) 99.380 100.930 70.080
UBI Benefits ($b) 0.000 0.000 0.000
Total Benefits, Consumption Value ($b) 3617.949 4011.607 4064.249
Total Benefits Cost ($b) 3617.949 4011.607 4064.249