PolicyEngine / PolicyEngine/microcosm
Populate child care attendance inputs in US datasets to avoid CCDF zeros from missing data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
Problem
Microcosm currently supplies child care expenses but leaves key child-level attendance inputs absent. State CCDF formulas read different combinations of these inputs, so falling back to PolicyEngine-US's zero defaults can produce $0 subsidies for otherwise eligible example households.
Keep the defaults in policyengine-us unchanged. Observed attendance and any documented imputation assumptions should be supplied by the dataset-building layer.
Verified on Microcosm main at a9cc63e737fd4619a304117dc2ec7dcd86d97901 on September 12, 2026:
US_CHILDCARE_OUTPUT_COLUMNScontains onlyspm_unit_pre_subsidy_childcare_expenses.- The engine input contract marks
childcare_attending_days_per_month,childcare_days_per_week, andchildcare_hours_per_dayasdeclared_absent_engine_input, withpolicyengine_default_if_absentfallback. - PolicyEngine-US derives
childcare_hours_per_weekas days/week × hours/day. It does not derive attending days/month from that schedule.
Diagnostic evidence
On PolicyEngine-US 42103db1b7d5be74bd28ebfc8e93adb2c7859079, separate calendar-year 2026 simulations for all 50 states and DC used:
- One parent age 30 and one child age 3.
- Parent employment income $24,000/year and
weekly_hours_worked_before_lsr = 40. spm_unit_pre_subsidy_childcare_expenses = 12000annually.- Child
childcare_provider_type_group = DCC_SACC. meets_ccdf_activity_test = trueat SPM-unit level.- Explicit state; model's first-county-in-state fallback; other eligibility variables calculated normally.
| Attendance inputs supplied to the child | Programs returning $0 |
|---|---|
| None | 30 / 51 |
| 20 attending days/month only | 17 / 51 |
| 5 days/week and 8 hours/day only | 15 / 51 |
| All three | 2 / 51 |
| All three plus appropriate MA/MD provider inputs | 0 / 51 |
These are illustrative household results, not measured population effects or proposed blanket dataset defaults. Twenty days/month and five days/week are alternative fixed diagnostic inputs, not identical annual attendance totals.
Related input gaps surfaced as well:
- MA's state-specific provider defaults to school-age care, giving a zero rate for this preschooler. Setting
ma_ccfa_care_provider_type = CENTER_BASED_CARE_EARLY_EDUCATIONresolves it. - MD's state-specific provider defaults to
NONE. Settingmd_ccs_provider_type = LICENSED_CENTERresolves it. - Omitting
meets_ccdf_activity_testmakes NV return $0 despite the supplied working hours; it was the only state affected in that sensitivity run.
Proposed scope / acceptance criteria
- Identify suitable observed sources for child-level attendance and provider information; document remaining gaps and a defensible imputation method before assigning values.
- Populate days/week, hours/day, and days/month consistently, with documented conversion and rounding conventions. Retain observed values and distinguish missing attendance from actual zero attendance during preparation.
- Do not assign every child a full-time schedule or assume positive expenses alone establish attendance intensity. Zero out-of-pocket expense should not automatically imply no care either.
- Audit the provider and activity inputs required by the supported state programs, including the MA/MD/NV cases above; supply evidence-based values rather than forcing eligibility flags globally.
- Update the build declarations and input coverage checks so attendance is materialized and reaches the simulation/export instead of silently using absent-input defaults.
- Add focused tests for observed-value preservation, imputation provenance, zero-attendance cases, schedule consistency, and representative end-to-end CCDF calculations. Report dataset coverage and distribution diagnostics by child age and state, rather than testing only that outputs become positive.
The separate omission of 28 child care programs from household_state_benefits belongs in PolicyEngine/policyengine-us#9405. Fixing attendance will not resolve that aggregation issue. Diagnostic discussion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/microcosm-build/src/microcosm/build/us_runtime/childcare.py and the US engine contract at packages/microcosm-build/src/microcosm/build/us/engine_abi.lock.json to trace current childcare inputs and coverage checks. Research suitable attendance and provider sources, then document provenance, imputation, conversion, and rounding decisions before changing the build declarations. Done includes materialized inputs, focused preservation/imputation/zero-attendance/schedule tests, representative CCDF checks, and coverage diagnostics by child age and state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100