Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDCC repeal produces no impact in microsimulation #4044

Closed
MaxGhenis opened this issue Feb 29, 2024 · 2 comments · Fixed by #4054
Closed

CDCC repeal produces no impact in microsimulation #4044

MaxGhenis opened this issue Feb 29, 2024 · 2 comments · Fixed by #4054
Assignees
Labels
bug Something isn't working

Comments

@MaxGhenis
Copy link
Contributor

Repealing the CDCC by lowering the maximum care expenses to $0 produces no impact, either with base CPS or enhanced CPS.

It works at the household level.

Currently investigating in this notebook. So far that shows that childcare expenses are OK, but in certain sequences adjusted_gross_income sums to zero, resulting in cdcc_rate being zero. So this could be a larger issue.

@nikhilwoodruff any chance this could have to do with PolicyEngine/policyengine-core#165?

@MaxGhenis
Copy link
Contributor Author

TL;DR

This may have resulted from an intersection of uprating, core sequencing, and childcare subsidy issues. We have a fix in #4054 but we need to add testing and improve core to ensure it doesn't affect other variables, and to avoid it recurring.

More detail

@anth-volk @PavelMakarchuk and I isolated this to #3933, which bumped policyengine_us from 0.666.1 to 0.667.0 and primarily added uprating factors to Social Security programs to improve accuracy of our long-term projections.

We found that, after that change, running baseline.calc("cdcc") produces NaN values, but only for 2024, or when run after calculating any other variable for 2024. These notebooks show some of our investigation. I filed PolicyEngine/policyengine-core#170 to ensure results do not depend on the sequence of calc operations.

We traced the NaNs to the social_security_dependents and social_security_survivors variables, which the breaking PR newly uprated. It notably did not affect social_security_retirement or social_security_disability. The distinguishing factor is that retirement and disability are set in cps.py, while the others are not. It appears that empty variables do not get properly uprated to zero and instead go to NaNs; @anth-volk filed PolicyEngine/policyengine-core#169 to address this.

Setting the values to zero in cps.py and removing the uprating factors (probably unnecessary but did it to be safe) fixed that issue, removing NaNs from childcare expenses. However, they were still zero in 2024 (when first invoking other calc commands). We found this resulted from us populating childcare_expenses in cps.py, a SPM-unit variable that had a formula added in #3813 to accommodate childcare subsidies. By instead creating a new leaf-node variable spm_unit_pre_subsidy_childcare_expenses and populating it in cps.py, the CDCC would correctly compute after running other operations. This is increasingly clunky though; we should instead populate a single person-level pre_subsidy_care_expenses variable from cps.py (#2900), then aggregate up from there.

I'm going to merge #4054, update the data release, and check the results. But we need further discussion on deeper reliability issues to ensure this caught all instances of this problem and add CI tests to avoid it recurring. @nikhilwoodruff welcome your thoughts here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment