Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- Apply the miscellaneous deduction imputation to the unreimbursed_business_employee_expenses instead of the misc_deduction variable.
2 changes: 1 addition & 1 deletion policyengine_us_data/datasets/cps/extended_cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"interest_deduction",
"tax_exempt_pension_income",
"long_term_capital_gains",
"misc_deduction",
"unreimbursed_business_employee_expenses",
"pre_tax_contributions",
"taxable_ira_distributions",
"self_employment_income",
Expand Down
6 changes: 4 additions & 2 deletions policyengine_us_data/datasets/puf/puf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def preprocess_puf(puf: pd.DataFrame) -> pd.DataFrame:
fraction,
) in MEDICAL_EXPENSE_CATEGORY_BREAKDOWNS.items():
puf[medical_category] = puf.E17500 * fraction
puf["misc_deduction"] = puf.E20400
# Use unreimbursed business employee expenses as a proxy for all miscellaneous expenses
# that can be deducted under the miscellaneous deduction.
puf["unreimbursed_business_employee_expenses"] = puf.E20400
puf["non_qualified_dividend_income"] = puf.E00600 - puf.E00650
puf["partnership_s_corp_income"] = puf.E26270
puf["qualified_dividend_income"] = puf.E00650
Expand Down Expand Up @@ -242,7 +244,7 @@ def preprocess_puf(puf: pd.DataFrame) -> pd.DataFrame:
"interest_deduction",
"long_term_capital_gains",
"long_term_capital_gains_on_collectibles",
"misc_deduction",
"unreimbursed_business_employee_expenses",
"non_qualified_dividend_income",
"non_sch_d_capital_gains",
"partnership_s_corp_income",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def apply(self):
# Calculate tax expenditure
tax_expenditure = (income_tax_r - income_tax_b).sum()
pct_error = abs((tax_expenditure - target) / target)
TOLERANCE = 0.15
TOLERANCE = 0.2

print(
f"{deduction} tax expenditure {tax_expenditure/1e9:.1f}bn differs from target {target/1e9:.1f}bn by {pct_error:.2%}"
Expand Down
Loading