Skip to content

Commit ef0bc21

Browse files
anth-volkMaxGhenis
andauthored
Add selected loss.py targets to unified calibration (#946)
* Add selected loss.py targets to unified calibration * Fix SOI domain target uprating --------- Co-authored-by: Max Ghenis <mghenis@gmail.com>
1 parent b117a6c commit ef0bc21

8 files changed

Lines changed: 909 additions & 3 deletions

File tree

changelog.d/945.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added selected legacy `loss.py` target families to unified calibration target ETL and selection.

policyengine_us_data/calibration/target_config.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,23 @@ include:
4848
# REMOVED: is_pregnant — 100% unachievable across all 51 state geos
4949
- variable: snap
5050
geo_level: state
51+
- variable: household_count
52+
geo_level: state
53+
domain_variable: snap
5154
- variable: tanf
5255
geo_level: state
5356
- variable: adjusted_gross_income
5457
geo_level: state
58+
- variable: rent
59+
geo_level: state
5560
- variable: spm_unit_count
5661
geo_level: state
5762
domain_variable: tanf
5863
- variable: eitc
5964
geo_level: state
65+
- variable: tax_unit_count
66+
geo_level: state
67+
domain_variable: eitc
6068
- variable: refundable_ctc
6169
geo_level: state
6270
- variable: non_refundable_ctc
@@ -107,6 +115,42 @@ include:
107115
- variable: adjusted_gross_income
108116
geo_level: national
109117
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits
118+
- variable: tax_unit_count
119+
geo_level: national
120+
domain_variable: adjusted_gross_income,income_tax_before_credits,irs_employment_income
121+
- variable: irs_employment_income
122+
geo_level: national
123+
domain_variable: adjusted_gross_income,income_tax_before_credits,irs_employment_income
124+
- variable: tax_unit_count
125+
geo_level: national
126+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,irs_employment_income
127+
- variable: irs_employment_income
128+
geo_level: national
129+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,irs_employment_income
130+
- variable: tax_unit_count
131+
geo_level: national
132+
domain_variable: adjusted_gross_income,income_tax_before_credits,pension_income
133+
- variable: pension_income
134+
geo_level: national
135+
domain_variable: adjusted_gross_income,income_tax_before_credits,pension_income
136+
- variable: tax_unit_count
137+
geo_level: national
138+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,pension_income
139+
- variable: pension_income
140+
geo_level: national
141+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,pension_income
142+
- variable: tax_unit_count
143+
geo_level: national
144+
domain_variable: adjusted_gross_income,income_tax_before_credits,social_security
145+
- variable: social_security
146+
geo_level: national
147+
domain_variable: adjusted_gross_income,income_tax_before_credits,social_security
148+
- variable: tax_unit_count
149+
geo_level: national
150+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,social_security
151+
- variable: social_security
152+
geo_level: national
153+
domain_variable: adjusted_gross_income,filing_status,income_tax_before_credits,social_security
110154

111155
# === NATIONAL — wealth target (Federal Reserve SCF, no filer filter) ===
112156
- variable: net_worth
@@ -126,6 +170,9 @@ include:
126170
domain_variable: medicare_enrolled
127171
- variable: medicare_part_b_premium
128172
geo_level: national
173+
- variable: medicare_part_b_premium
174+
geo_level: national
175+
domain_variable: age
129176
- variable: real_estate_taxes
130177
geo_level: national
131178
- variable: rent
@@ -149,6 +196,9 @@ include:
149196
- variable: spm_unit_count
150197
geo_level: national
151198
domain_variable: tanf
199+
- variable: household_count
200+
geo_level: national
201+
domain_variable: spm_unit_energy_subsidy_reported
152202
- variable: tip_income
153203
geo_level: national
154204
- variable: unemployment_compensation
@@ -280,6 +330,12 @@ include:
280330
- variable: unemployment_compensation
281331
geo_level: national
282332
domain_variable: unemployment_compensation
333+
- variable: refundable_american_opportunity_credit
334+
geo_level: national
335+
domain_variable: refundable_american_opportunity_credit
336+
- variable: education_tax_credits
337+
geo_level: national
338+
domain_variable: education_tax_credits
283339

284340
# === NATIONAL — IRS SOI filer count targets (restored: |rel_err| < 10%) ===
285341
- variable: tax_unit_count
@@ -311,6 +367,18 @@ include:
311367
- variable: tax_unit_count
312368
geo_level: national
313369
domain_variable: total_self_employment_income
370+
- variable: tax_unit_count
371+
geo_level: national
372+
domain_variable: refundable_american_opportunity_credit
373+
- variable: tax_unit_count
374+
geo_level: national
375+
domain_variable: education_tax_credits
376+
- variable: tax_unit_count
377+
geo_level: national
378+
domain_variable: real_estate_taxes,tax_unit_itemizes
379+
- variable: tax_unit_count
380+
geo_level: state
381+
domain_variable: real_estate_taxes,tax_unit_itemizes
314382

315383
# === NATIONAL — identity / population count targets from old loss.py ===
316384
- variable: person_count

policyengine_us_data/db/create_field_valid_values.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def populate_field_valid_values(session: Session) -> None:
7070
source_values = [
7171
("source", "Census ACS S0101", "survey"),
7272
("source", "IRS SOI", "administrative"),
73+
("source", "IRS EITC Central", "administrative"),
7374
("source", "CMS Marketplace", "administrative"),
7475
("source", "CMS 2024 OEP state metal status PUF", "administrative"),
7576
("source", "CMS Medicaid", "administrative"),

0 commit comments

Comments
 (0)