PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
96 stars 168 forks source link

Add intermediate variables for labor supply responses #4542

Open MaxGhenis opened 2 months ago

MaxGhenis commented 2 months ago

For example I'd suggest we create new variables is_primary_earner_in_tax_unit and earnings_decile from these: https://github.com/PolicyEngine/policyengine-us/blob/55178d8e923f289b2c52b32187554585a3484e1f/policyengine_us/variables/gov/simulation/labor_supply_response/labor_supply_response.py#L142-L148

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.