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
102 stars 175 forks source link

self_employment_income_before_lsr sums to zero #4556

Closed MaxGhenis closed 4 months ago

MaxGhenis commented 4 months ago

this should be self_

https://github.com/PolicyEngine/policyengine-us/blob/9495d9ba126634394e4e3b3c8b474e46fda10ca5/policyengine_us/system.py#L111

MaxGhenis commented 4 months ago

Actually that wasn't the only issue. self_employment_income itself is zero for 2023 on, in both the base and enhanced CPS

self_employment_income is fine in 2022, and employment_income is fine in all years

One difference between employment_income and self_employment income is the latter applies uprating despite being a sum. So that might be taking precedence, uprating zero instead of adding pre-LSR and LSR.

https://github.com/PolicyEngine/policyengine-us/blob/9495d9ba126634394e4e3b3c8b474e46fda10ca5/policyengine_us/variables/input/income.py#L25-L49

Let's test here https://github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/tests/microsimulation/test_microsim.py