Skip to content

Reintroduce age-specific labor supply response multipliers#7979

Draft
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/reintroduce-age-lsr
Draft

Reintroduce age-specific labor supply response multipliers#7979
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/reintroduce-age-lsr

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • reintroduce age heterogeneity for labor supply responses without changing the legacy scalar income elasticity parameter path
  • add age threshold and multiplier parameters for substitution responses and parallel sibling parameters for income responses
  • harden the labor-supply zero-response guard so nonzero primary or secondary substitution elasticities are not skipped

Why this shape

The reverted attempt changed the elasticities.income parameter from a scalar into a nested node and also regressed the secondary-earner substitution path. This version avoids both rollout hazards:

  • gov.simulation.labor_supply_responses.elasticities.income stays scalar and backward-compatible
  • secondary substitution elasticities still resolve and now have direct coverage

Testing

  • pytest -q policyengine_us/tests/core/test_labor_supply_behavioral_response_guard.py policyengine_us/tests/core/test_behavioral_response_measurements.py
  • python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/income_elasticity.yaml policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/substitution_elasticity.yaml policyengine_us/tests/policy/baseline/gov/simulation/labor_supply_response/integration.yaml -c policyengine_us
  • pytest -q policyengine_us/tests/microsimulation/test_behavioral_structural.py policyengine_us/tests/microsimulation/test_lsr_cg_interaction.py (skipped without RUN_HEAVY_TESTS=1)

Closes #6265.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.22%. Comparing base (b70c547) to head (b875aed).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main    #7979      +/-   ##
===========================================
- Coverage   100.00%   97.22%   -2.78%     
===========================================
  Files            1        3       +2     
  Lines           13       72      +59     
  Branches         0        5       +5     
===========================================
+ Hits            13       70      +57     
- Misses           0        1       +1     
- Partials         0        1       +1     
Flag Coverage Δ
unittests 97.22% <100.00%> (-2.78%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add old-age as an axis of heterogeneity of labor supply responses

1 participant