Skip to content

Conversation

@PavelMakarchuk
Copy link
Collaborator

Summary

This PR re-adds the age heterogeneity feature for labor supply response elasticities that was previously reverted. This implements the multiplier approach for age-based
differences in labor supply responses.

Context

Changes

Parameter Structure:

  • Restores nested directory structure for elasticity parameters
  • Adds age threshold and multiplier parameters for income and substitution elasticities
  • Age threshold: 65 years
  • Multiplier approach allows different elasticities for people above/below threshold

Files Changed (16 total):

  • parameters/gov/simulation/labor_supply_responses/elasticities/income/* - Age-adjusted income elasticity params
  • parameters/gov/simulation/labor_supply_responses/elasticities/substitution/* - Age-adjusted substitution elasticity params
  • variables/gov/simulation/labor_supply_response/*.py - Updated variable formulas
  • Test files updated to reflect new structure

Technical Details

The age heterogeneity uses a multiplier approach where:

  • Base elasticity values are defined
  • Age threshold is set (default: 65)
  • Multiplier is applied for individuals above the threshold
  • This allows different labor supply responses for older vs. younger workers

Testing

✅ System loads successfully
✅ Parameter structure verified
✅ All files restored from original implementation

Purpose

This draft PR allows for:

  1. Further testing of the age heterogeneity feature
  2. Evaluation of its impact on policy simulations
  3. Refinement before final merge decision

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.00%. Comparing base (66a73e5) to head (295d9ee).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...ulation/labor_supply_response/income_elasticity.py 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master    #6830      +/-   ##
===========================================
- Coverage   100.00%   92.00%   -8.00%     
===========================================
  Files            2        2              
  Lines           38       50      +12     
  Branches         3        5       +2     
===========================================
+ Hits            38       46       +8     
- Misses           0        2       +2     
- Partials         0        2       +2     
Flag Coverage Δ
unittests 92.00% <90.90%> (-8.00%) ⬇️

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.

2 participants