Incorporating micro-feedback effects


In [1]:
import sys
sys.path.append("../../")
import taxcalc
from taxcalc import *
import pandas as pd
import numpy as np

Start by creating a Calculator for Plan X and a calculator for Plan Y.


In [3]:
# Create a Records object for Plan X and Plan Y
records_x = Records("../../puf.csv")
records_y = Records("../../puf.csv")
# Create a Parameters object for Plan X and Plan Y
params_x = Parameters(start_year=2013)
params_y = Parameters(start_year=2013)
# Create two Calculators
calcX = Calculator(parameters=params_x, records=records_x)
calcY = Calculator(parameters=params_y, records=records_y)


You loaded data for 2008.
Your data have beeen extrapolated to 2013.
You loaded data for 2008.
Your data have beeen extrapolated to 2013.

Increase the top marginal tax rate by 10 percentage points


In [6]:
# Modify the relevant parameter for the Plan-Y Calculator.
calcY.II_rt7 = calcY.II_rt7 + .1
# Demonstrate that Plan X and Plan Y calculators are indeed different. 
print(calcX.II_rt7)
print(calcY.II_rt7)


0.396
0.496

Update taxpayers' income to account for the rate hike with our behavioral effects calculator


In [10]:
# Call the behavioral effects calculator and create a new Plan Y Calculator obect. 
calcY_behavioral = behavior(calcX, calcY)
# Demonstrate that taxpayers' income was affected by the tax change.
print(calcY.e00200.sum())
print(calcY_behavioral.e00200.sum())


41460794504.8
40996640481.9

In [ ]: