Skip to content

Populate education credit inputs#843

Open
MaxGhenis wants to merge 4 commits intomainfrom
codex/fix-aotc-eligibility
Open

Populate education credit inputs#843
MaxGhenis wants to merge 4 commits intomainfrom
codex/fix-aotc-eligibility

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Apr 28, 2026

Summary

  • convert the PUF-imputed tax-unit AOTC signal into lower-level Enhanced CPS AOTC eligibility inputs from PolicyEngine US, rather than setting the composite eligibility variable when the new PE-US inputs are available
  • populate AOTC data assumptions for unavailable facts such as credential pursuit, eligible institution attendance, 1098-T/exception, institution EIN, no first-four-years completion, and no felony drug conviction for tax units with positive imputed AOTC
  • adjust or fill qualified tuition expenses for selected AOTC students by inverting the AOTC amount scale from policyengine-us parameters instead of hardcoding statutory dollar amounts or rates
  • populate factual Lifetime Learning Credit inputs in PUF and Extended CPS for non-AOTC tuition records, while leaving legal/effective-date rules in PE-US
  • add IRS SOI Table 3.3 refundable AOTC and combined nonrefundable education-credit calibration targets to the Enhanced CPS legacy loss matrix
  • use PUF E87530 for LLC-specific expenses where present and keep the release/fallback path compatible with current PE-US builds

Primary Sources

Local Build Result

Built EnhancedCPS_2024 locally against PolicyEngine/policyengine-us#8170. Latest aggregate from the calibrated dataset:

  • Lifetime Learning Credit potential: $1.278B
  • Lifetime Learning Credit: $1.034B over 1.712M weighted positive tax units
  • nonrefundable AOTC: $6.779B
  • refundable AOTC: $5.166B over 5.615M weighted positive tax units
  • full AOTC: $12.915B
  • combined nonrefundable education credits: $7.813B over 7.161M weighted positive tax units

The local calibration log reports:

  • refundable AOTC target: $5.090B, estimate $5.071B, relative error -0.38%; count target 5.822M, estimate 5.544M, relative error -4.76%
  • combined education-credit target: $7.555B, estimate $7.698B, relative error +1.90%; count target 7.211M, estimate 7.066M, relative error -2.02%

Dependency

Tests

  • uv run --no-sync ruff check policyengine_us_data/datasets/puf/puf.py policyengine_us_data/datasets/puf/uprate_puf.py tests/unit/datasets/test_puf_tuition.py tests/unit/datasets/test_uprate_puf.py
  • uv run --no-sync pytest tests/unit/datasets/test_puf_tuition.py tests/unit/datasets/test_uprate_puf.py -q
  • uv run --no-sync pytest tests/unit/calibration/test_loss_targets.py tests/unit/test_etl_irs_soi_overlay.py tests/unit/test_refresh_soi_table_targets.py tests/unit/test_extended_cps.py tests/unit/datasets/test_puf_tuition.py tests/unit/datasets/test_uprate_puf.py -q

Fixes #841

@MaxGhenis MaxGhenis force-pushed the codex/fix-aotc-eligibility branch from 5579a5f to 207037d Compare April 28, 2026 16:01
@MaxGhenis MaxGhenis enabled auto-merge (squash) April 28, 2026 22:43
@MaxGhenis MaxGhenis changed the title Populate AOTC eligibility inputs Populate education credit inputs Apr 29, 2026
@MaxGhenis
Copy link
Copy Markdown
Contributor Author

Local paired build result using this us-data branch with PolicyEngine/policyengine-us#8170:

  • Rebuilt PUF, Extended CPS half, and calibrated EnhancedCPS_2024 locally.
  • Lifetime Learning Credit: $1.034B over 1.712M weighted positive tax units.
  • Nonrefundable AOTC: $6.779B.
  • Refundable AOTC: $5.166B over 5.615M weighted positive tax units.
  • Full AOTC: $12.915B.
  • Combined nonrefundable education credits: $7.813B over 7.161M weighted positive tax units.

Calibration log from the local build:

  • Refundable AOTC target: $5.090B, estimate $5.071B, relative error -0.38%; count target 5.822M, estimate 5.544M, relative error -4.76%.
  • Combined education-credit target: $7.555B, estimate $7.698B, relative error +1.90%; count target 7.211M, estimate 7.066M, relative error -2.02%.

There is no standalone LLC calibration target in this PR because IRS SOI Table 3.3 reports LLC only inside the combined nonrefundable education credit.

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.

AOTC is effectively disabled in Enhanced CPS because eligibility input is never true

1 participant