Skip to content

Commit

Permalink
Remove <10k AGI taxable targets and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 25, 2024
1 parent eab8938 commit b5121a8
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 73 deletions.
144 changes: 72 additions & 72 deletions docs/validation.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion policyengine_us_data/datasets/cps/enhanced_cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def loss(weights):

start_loss = None

iterator = trange(10_000)
iterator = trange(1_000)
for i in iterator:
optimizer.zero_grad()
l = loss(torch.exp(weights))
Expand Down
14 changes: 14 additions & 0 deletions policyengine_us_data/utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def build_loss_matrix(dataset: type, time_period):
if not row["Taxable only"]:
continue # exclude non "taxable returns" statistics

if row["AGI upper bound"] <= 10_000:
continue

mask = (
(agi >= row["AGI lower bound"])
* (agi < row["AGI upper bound"])
Expand Down Expand Up @@ -180,6 +183,17 @@ def build_loss_matrix(dataset: type, time_period):
).calibration.gov.cbo._children[variable_name]
)

# Treasury EITC

loss_matrix["treasury/eitc"] = sim.calculate(
"eitc", map_to="household"
).values
targets_array.append(
sim.tax_benefit_system.parameters(
time_period
).calibration.gov.treasury.tax_expenditures.eitc
)

# CPS-derived statistics
# Medical expenses, sum of spm thresholds
# Child support expenses
Expand Down

0 comments on commit b5121a8

Please sign in to comment.