Closed MaxGhenis closed 1 month ago
Unfortunately, I've been working on this, but I'm unsure as to the desired approach. In any case where the baseline policy does not have labor elasticities applied, the baseline LSR outcome is an array of 0's, preventing division. However, if dividing against earnings, frankly, I'm not sure if I should be dividing against one of the following, as none is specifically referred to as "earnings," and I'd like to be sure:
Alternatively, is a different value required, necessitating changes to core
?
There will be no divide-by-zero. We want to divide by total baseline earnings (~$10.9T total, positive in all deciles). Earnings = employment_income + self_employment_income
The
_rel
results currently equal change in earnings divided by market income. It should instead be change in earnings divided by baseline earnings.See for instance: https://github.com/PolicyEngine/policyengine-api/blob/312da084ab3cc4aa5eaced1219bde79d913ede99/policyengine_api/endpoints/economy/compare.py#L42