Skip to content

Add state tax-credit program validations (40 baseline levels + 12 repeal reforms) - #295

Merged
MaxGhenis merged 3 commits into
PolicyEngine:mainfrom
DTrim99:state-program-validation
Jul 3, 2026
Merged

Add state tax-credit program validations (40 baseline levels + 12 repeal reforms)#295
MaxGhenis merged 3 commits into
PolicyEngine:mainfrom
DTrim99:state-program-validation

Conversation

@DTrim99

@DTrim99 DTrim99 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Extends reform validation beyond federal benchmarks with out-of-sample state program checks — modeled state EITC/WFC/CTC totals vs official state statistics — so the calibration dashboard can show how well populace reproduces the state programs downstream tools (e.g. the child-poverty dashboard) simulate.

What's added

us/state_program_levels.json — 40 baseline-level backtests across 28 states (26 official actuals, 14 documented approximations flagged benchmark.score_type: "approximation"). Each compares the populace baseline weighted total of a state credit variable to a published program cost. State credit variables are defined_for their state, so the national sum is the state total — no geography filtering needed. Sources are state DOR/FTB/comptroller statistical or tax-expenditure reports (every figure fetched and independently re-verified at the cited page); approximations are things like match_rate × IRS federal EITC in the state (IRS EITC Central TY2024) or ACS counts × statutory amounts, with the method in the source string.

us/state_program_reforms.json — 12 repeal-style reform validations (neutralize the credit variable, score the change in state_income_tax) for the programs with the strongest tax-year actuals: MN CTC+WFC, CA CalEITC + YCTC, NY EITC + ESCC, CO EITC + CTC, CT, NM ×2, MD (refundable+nonrefundable sum), IL.

Harness (backward-compatible): BaselineLevelSpec gains per-spec category and benchmark_score_type (SOI rows keep "IRS SOI actual" / "actual" — tested); new loaders state_program_level_specs / state_program_reform_specs; default_baseline_level_specs() aggregates SOI + state levels and the release tool uses it. load_default_reform_specs includes the state repeals. The calibration-diagnostics dashboard renders the new category with zero changes.

Out-of-sample by construction

State program totals are not calibration targets (the surface calibrates federal EITC by AGI bracket and aggregate state income-tax liability), so every row lands in the dashboard's out-of-sample KPIs.

Pilot (released populace_us_2024.h5)

Program populace vs official
MN CTC + WFC (TY2024) +6.1%
CO EITC (TY2023, 50% match both years) −7.8%
NY EITC (TY2024) −9.7%
CA CalEITC (TY2023) −12.9%
CA YCTC (TY2023) +38.7%
CO CTC (TY2023) +30.4%

The under-6 credits (YCTC, CO CTC) running ~30–40% hot is a genuine dataset finding this validation is designed to surface. EITCs land modestly below officials, consistent with take-up.

Documented exclusions (in the file comments)

VA (take-better-of refundable/nonrefundable — no single published line matches the variable); GA/DC/RI CTCs + PA EITC (not in effect in 2024); CT CTC (no ongoing credit, only the 2022 rebate); ME Dependent Exemption Tax Credit (only the refundable excess is published); UT CTC; WA WFTC repeal row (WA levies no income tax — it is levels-only).

Tests

test_reform_validation.py: +6 tests (loader parsing, per-spec category/score_type rows, SOI-default preservation, aggregator, shipped-config well-formedness). 29/29 pass; ruff format + check clean. Variable names verified against policyengine-us 1.755.5.

Suggested verification before publishing: a staging build, then check /populace/reforms?release=staging:{run_id} on the dashboard shows the "State program" rows.

🤖 Generated with Claude Code

DTrim99 and others added 3 commits July 2, 2026 15:09
…eal reforms)

Extends reform validation beyond federal benchmarks with out-of-sample STATE
program checks, sourced from official state statistics collected and
double-verified from revenue-department reports (Jul 2026):

- us/state_program_levels.json: 40 baseline-level backtests (26 official
  actuals, 14 documented approximations) comparing populace baseline totals of
  state credit variables (EITC/WFC/CTC family across 28 states) to published
  program costs. State credit variables are defined_for their state, so the
  national weighted sum IS the state total - no geography filtering needed.
- us/state_program_reforms.json: 12 neutralize-variable repeal reforms scored
  on state_income_tax against strong tax-year actuals (MN, CA x2, NY x2,
  CO x2, CT, NM x2, MD, IL).
- BaselineLevelSpec gains per-spec category and benchmark score_type
  (approximation vs actual); SOI rows keep their historical defaults.
- New loaders state_program_level_specs / state_program_reform_specs wired
  into load_default_reform_specs and a new default_baseline_level_specs used
  by the release tool. The calibration-diagnostics dashboard renders the new
  category with no changes.

None of these totals are calibration targets, so every row is genuinely
out-of-sample. Documented exclusions: VA (take-better-of structure), GA/DC/RI
CTCs + PA EITC (post-2024 start), CT CTC (no ongoing credit), ME DETC (only
refundable excess published), UT CTC, WA WFTC repeal row (no income tax).

Pilot on the released populace_us_2024.h5: MN CTC+WFC +6.1%, CO EITC -7.8%,
NY EITC -9.7%, CA CalEITC -12.9%, CA YCTC +38.7%, CO CTC +30.4% vs official.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The country-package contract requires every shipped file to be declared;
test_us_package_loads and the spec-only manifest test enforce it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit 2061724 into PolicyEngine:main Jul 3, 2026
4 checks passed
PavelMakarchuk added a commit to PolicyEngine/calibration-diagnostics that referenced this pull request Jul 6, 2026
…ase (#295) (#84)

Appends the state tax-credit program suite (PolicyEngine/microcosm#295:
12 credit-repeal reforms + 40 program baseline levels) and the 9 IRS
SOI-actual backtest levels the release also predates. Scored offline
one simulation at a time on the released H5. Median |error|: State
program 12.9%, State program actual 11.6%, IRS SOI actual 14.2% (income
tax $2.01T vs SOI $2.04T). MD EITC and CA/CO young-child credits show
the imputation gaps this experimental national-only release carries.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Three-way cross-check: per-state pipeline vs these benchmarks vs populace

Comparing three independent estimates of the same quantities: the us-state-eitcs-ctcs Modal pipeline (repeal deltas on per-state calibrated .h5 files), the official outlays in this PR's state_program_levels.json, and the populace pilot repeal runs (national populace file) where available.

Read with care — the tool data is stale. Its CSVs were generated on policyengine-us 1.633.2, so several divergences are known model fixes since then (MN combined-credit handling, DE EITC, NY EITC) rather than dataset issues. @PavelMakarchuk's in-flight rerun will make this comparison much sharper.

Two signals that already look robust:

  • Cross-engine agreement on the young-child overshoot: CA YCTC (+75.5% on per-state files @1.633.2, +38.7% on populace @1.755.5) and CO CTC (+30.4% on populace; per-state bundle not separable — see note) both run hot against official actuals on both datasets, supporting a model/data young-child issue rather than a populace calibration artifact.
  • Tight agreement where the model is simple: IL EITC −1.6%, NJ EITC +1.9%, KS −3.3%, NM EITC −5.2%, MA CFTC +4.1% — the per-state files reproduce official outlays well for plain-match EITCs even on the old pin.

Bundle-vs-program caveats: the tool repeals each state's whole EITC or CTC bundle, so rows noted "bundle also has […]" compare a single program's outlay against a multi-program repeal (CO's CTC bundle includes the much larger Family Affordability Credit — the +1973% is expected, not an error).

Benchmark State Tool bundle Official Tool cost Tool vs official Populace pilot Pilot vs official Type Note
state_az_dependent_credit AZ CTCs (2024) $151.0M $90.2M -40.3% approximation
state_ca_eitc CA EITCs (2024) $941.0M $1,455.0M +54.6% $819.7M -12.9% actual
state_ca_yctc CA CTCs (2024) $413.0M $725.0M +75.5% $572.9M +38.7% actual
state_co_eitc CO EITCs (2024) $356.5M $437.0M +22.6% $328.7M -7.8% actual
state_co_ctc CO CTCs (2024) $89.2M $1,848.4M +1973.2% $116.3M +30.4% actual bundle also has ['co_family_affordability_credit']
state_ct_eitc CT EITCs (2024) $195.1M $222.0M +13.8% actual
state_dc_eitc DC EITCs (2024) $98.4M $88.0M -10.5% approximation
state_de_eitc DE EITCs (2024) $17.5M $0.0M -100.0% approximation
state_hi_eitc HI EITCs (2024) $77.0M $89.1M +15.7% actual
state_ia_eitc IA EITCs (2024) $72.1M $66.0M -8.4% actual
state_id_grocery_credit ID $240.2M approximation not in tool bundles
state_il_eitc IL EITCs (2024) $437.4M $430.2M -1.6% actual
state_il_ctc IL CTCs (2024) $50.0M $53.0M +6.0% approximation
state_in_eitc IN EITCs (2024) $112.5M $98.9M -12.1% approximation
state_ks_eitc KS EITCs (2024) $76.4M $73.8M -3.3% actual
state_la_eitc LA EITCs (2024) $78.7M $33.6M -57.3% actual
state_ma_eitc MA EITCs (2024) $300.0M $405.5M +35.2% approximation
state_ma_cftc MA CTCs (2024) $460.0M $479.0M +4.1% approximation
state_md_eitc MD EITCs (2024) $550.9M $455.6M -17.3% actual
state_md_ctc MD CTCs (2024) $13.8M $50.7M +267.1% actual
state_me_eitc ME EITCs (2024) $38.1M $59.1M +54.9% approximation
state_mi_eitc MI EITCs (2024) $591.9M $432.4M -26.9% approximation
state_mn_cwfc MN CTCs and EITCs (2024) $755.5M $1,335.3M +76.7% $801.3M +6.1% actual
state_mn_wfc MN EITCs (2024) $191.5M $307.2M +60.4% approximation
state_mt_eitc MT EITCs (2024) $15.6M $22.1M +41.6% approximation
state_ne_eitc NE EITCs (2024) $30.2M $34.2M +12.9% actual
state_nj_eitc NJ EITCs (2024) $603.6M $615.4M +1.9% approximation
state_nj_ctc NJ CTCs (2024) $220.6M $335.0M +51.9% approximation
state_nm_eitc NM EITCs (2024) $130.8M $124.0M -5.2% actual
state_nm_ctc NM CTCs (2024) $133.6M $159.2M +19.1% actual
state_ny_eitc NY EITCs (2024) $1,116.3M $831.5M -25.5% $1,008.0M -9.7% actual
state_ny_escc NY CTCs (2024) $693.1M $847.8M +22.3% actual
state_ok_eitc OK EITCs (2024) $40.2M $24.8M -38.5% actual
state_or_eitc OR EITCs (2024) $47.2M $64.8M +37.2% actual
state_or_kids_credit OR CTCs (2024) $34.2M $105.1M +207.4% actual
state_ri_eitc RI EITCs (2024) $26.2M $34.7M +32.5% actual
state_vt_eitc VT EITCs (2024) $24.5M $44.4M +81.0% actual
state_vt_ctc VT CTCs (2024) $25.4M $44.5M +75.1% actual
state_wa_wftc WA EITCs (2024) $205.6M $286.9M +39.5% actual
state_wi_eic WI EITCs (2024) $87.7M $136.8M +56.0% actual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants