We can also modularize the hours worked and earnings effects by creating variables like relative_substitution_effect and relative_income_effect, then multiplying these by baseline hours and earnings, respectively. We're currently duplicating code between the hours and earnings responses.
For example I'd suggest we create new variables
is_primary_earner_in_tax_unit
andearnings_decile
from these: https://github.com/PolicyEngine/policyengine-us/blob/55178d8e923f289b2c52b32187554585a3484e1f/policyengine_us/variables/gov/simulation/labor_supply_response/labor_supply_response.py#L142-L148We can also modularize the hours worked and earnings effects by creating variables like
relative_substitution_effect
andrelative_income_effect
, then multiplying these by baseline hours and earnings, respectively. We're currently duplicating code between the hours and earnings responses.