diff --git a/changelog.d/980.fixed.md b/changelog.d/980.fixed.md new file mode 100644 index 000000000..ac2423710 --- /dev/null +++ b/changelog.d/980.fixed.md @@ -0,0 +1 @@ +Align Stage 1 Medicaid validation with 2025 Medicaid enrollment targets. diff --git a/policyengine_us_data/storage/README.md b/policyengine_us_data/storage/README.md index c6ec55884..03ea8023a 100644 --- a/policyengine_us_data/storage/README.md +++ b/policyengine_us_data/storage/README.md @@ -36,10 +36,11 @@ • Date: 2024 • Location: https://www.medicaid.gov/resources-for-states/downloads/eligib-oper-and-enrol-snap-december2024.pdf#page=26 -- **medicaid_enrollment_2025.csv** - • Source: Medicaid.gov performance indicator dataset, latest final-report month available in the March 2026 release - • Date: November 2025 final reports - • Location: https://data.medicaid.gov/dataset/State-Medicaid-and-CHIP-Applications-Eligibility-Deter/pi-dataset-march-2026release +- **medicaid_enrollment_2025.csv** + • Source: Medicaid.gov performance indicator dataset, updated December 2025 Applications, Eligibility, and Enrollment Data + • Date: December 2025 final reports, last updated April 24, 2026 + • Location: https://data.medicaid.gov/dataset/6165f45b-ca93-5bb5-9d06-db29c692a360?conditions%5B0%5D%5Boperator%5D=%3D&conditions%5B0%5D%5Bproperty%5D=reporting_period&conditions%5B0%5D%5Bvalue%5D=202512&conditions%5B1%5D%5Boperator%5D=%3D&conditions%5B1%5D%5Bproperty%5D=preliminary_or_updated&conditions%5B1%5D%5Bvalue%5D=U + • Notes: Uses `total_medicaid_enrollment`, not combined Medicaid and CHIP enrollment. - **district_mapping.csv** • Source: created by the script `policyengine_us/storage/calibration_targets/make_district_mapping.py` diff --git a/policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2025.csv b/policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2025.csv index 985ac7f9a..d318533e3 100644 --- a/policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2025.csv +++ b/policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2025.csv @@ -1,52 +1,52 @@ state,enrollment -AK,199460 -AL,752535 -AR,723536 -AZ,1579905 -CA,11554412 -CO,1046707 -CT,882013 -DC,242274 -DE,227234 -FL,3447907 -GA,1698374 -HI,364787 -IA,585282 -ID,293777 -IL,2719408 -IN,1431868 -KS,333620 -KY,1200890 -LA,1274536 -MA,1405793 -MD,1209670 -ME,314237 -MI,2131207 -MN,1158706 -MO,1133140 -MS,509631 -MT,192806 -NC,2527040 -ND,100854 -NE,299026 -NH,159398 -NJ,1514284 -NM,640061 -NV,679632 -NY,5894332 -OH,2508352 -OK,913130 -OR,1124039 -PA,2732233 -RI,263719 -SC,875777 -SD,122031 -TN,1233717 -TX,3776984 -UT,298758 -VA,1503054 -VT,146362 -WA,1722640 -WI,1030040 -WV,451904 -WY,54143 +AK,199113 +AL,750744 +AR,723941 +AZ,1565458 +CA,11498458 +CO,1052954 +CT,881656 +DC,242180 +DE,226467 +FL,3431155 +GA,1692481 +HI,363466 +IA,586048 +ID,294104 +IL,2700951 +IN,1412073 +KS,332430 +KY,1194495 +LA,1265315 +MA,1396994 +MD,1208676 +ME,312572 +MI,2132117 +MN,1154038 +MO,1131455 +MS,509186 +MT,193114 +NC,2535205 +ND,100706 +NE,299325 +NH,158237 +NJ,1507882 +NM,638988 +NV,679311 +NY,5887318 +OH,2486762 +OK,889045 +OR,1123951 +PA,2724282 +RI,264836 +SC,864722 +SD,122091 +TN,1226436 +TX,3764587 +UT,297414 +VA,1495172 +VT,145876 +WA,1726702 +WI,1029554 +WV,450475 +WY,54505 diff --git a/pyproject.toml b/pyproject.toml index 64086b855..5ad72cf12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,7 +115,6 @@ testpaths = [ markers = [ "integration: tests that exercise integration-level behavior or external runtime seams", "slow: tests or validators that require substantial local runtime or built artifacts", - "verify_behavior_skip_temporarily: temporarily skipped while expected behavior is being verified", ] filterwarnings = [ "ignore::SyntaxWarning:IPython.core.interactiveshell", diff --git a/tests/unit/calibration/test_loss_targets.py b/tests/unit/calibration/test_loss_targets.py index eaccd1627..9802ab138 100644 --- a/tests/unit/calibration/test_loss_targets.py +++ b/tests/unit/calibration/test_loss_targets.py @@ -78,7 +78,7 @@ def test_medicaid_targets_roll_forward_to_2025(): assert data_year == 2025 assert len(targets) == 51 - assert int(targets["enrollment"].sum()) == 69_185_225 + assert int(targets["enrollment"].sum()) == 68_925_023 def test_medicaid_targets_roll_forward_to_2026(): @@ -98,7 +98,7 @@ def test_medicaid_national_targets_use_2025_values(): spending, enrollment, data_year = _get_medicaid_national_targets(2025) assert data_year == 2025 - assert enrollment == 69_185_225 + assert enrollment == 68_925_023 assert spending == pytest.approx(1_000_645_800_000.0001) diff --git a/validation/stage_1/conftest.py b/validation/stage_1/conftest.py index 8c118b8d7..2c57c8bb1 100644 --- a/validation/stage_1/conftest.py +++ b/validation/stage_1/conftest.py @@ -28,19 +28,6 @@ collect_ignore_glob.append("test_no_formula_variables_stored.py") -def pytest_collection_modifyitems(config, items): - marker_name = "verify_behavior_skip_temporarily" - for item in items: - marker = item.get_closest_marker(marker_name) - if marker is None: - continue - reason = marker.kwargs.get( - "reason", - "Temporarily skipped while expected validation behavior is verified.", - ) - item.add_marker(pytest.mark.skip(reason=reason)) - - @pytest.fixture(scope="session", autouse=True) def refresh_policy_db_views(): db_path = STORAGE_FOLDER / "calibration" / "policy_data.db" diff --git a/validation/stage_1/test_enhanced_cps.py b/validation/stage_1/test_enhanced_cps.py index bd9f62405..89bdd5700 100644 --- a/validation/stage_1/test_enhanced_cps.py +++ b/validation/stage_1/test_enhanced_cps.py @@ -383,27 +383,23 @@ def test_immigration_status_diversity(): print(f"Immigration status diversity test passed: {citizen_pct:.1f}% citizens") -@pytest.mark.verify_behavior_skip_temporarily( - reason=( - "Investigating whether comparing 2025 medicaid_enrolled against " - "2024 Medicaid enrollment targets is intentional." - ) -) def test_medicaid_calibration(): import pandas as pd from pathlib import Path from policyengine_us import Microsimulation from policyengine_us_data.datasets.cps import EnhancedCPS_2024 - TARGETS_PATH = Path( - "policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2024.csv" + VALIDATION_PERIOD = 2025 + target_file = f"medicaid_enrollment_{VALIDATION_PERIOD}.csv" + TARGETS_PATH = ( + Path("policyengine_us_data/storage/calibration_targets") / target_file ) targets = pd.read_csv(TARGETS_PATH) sim = Microsimulation(dataset=EnhancedCPS_2024) state_code_hh = sim.calculate("state_code", map_to="household").values medicaid_enrolled = sim.calculate( - "medicaid_enrolled", map_to="household", period=2025 + "medicaid_enrolled", map_to="household", period=VALIDATION_PERIOD ) TOLERANCE = 0.45 diff --git a/validation/stage_1/test_sparse_enhanced_cps.py b/validation/stage_1/test_sparse_enhanced_cps.py index 51045bb33..b1cdf5122 100644 --- a/validation/stage_1/test_sparse_enhanced_cps.py +++ b/validation/stage_1/test_sparse_enhanced_cps.py @@ -228,14 +228,16 @@ def test_sparse_aca_calibration(sim): def test_sparse_medicaid_calibration(sim): - TARGETS_PATH = Path( - "policyengine_us_data/storage/calibration_targets/medicaid_enrollment_2024.csv" + VALIDATION_PERIOD = 2025 + target_file = f"medicaid_enrollment_{VALIDATION_PERIOD}.csv" + TARGETS_PATH = ( + Path("policyengine_us_data/storage/calibration_targets") / target_file ) targets = pd.read_csv(TARGETS_PATH) state_code_hh = sim.calculate("state_code", map_to="household").values medicaid_enrolled = sim.calculate( - "medicaid_enrolled", map_to="household", period=2025 + "medicaid_enrolled", map_to="household", period=VALIDATION_PERIOD ) TOLERANCE = 1.0