Repository navigation
Conversation
per_capita_cost (CMS NHE Table 17) averages over every Part A and/or B enrollee, including nursing home residents, whom the CPS-based microdata exclude. Add calibration.gov.hhs.medicare.noninstitutionalized_spending_ratio (0.971, from MedPAC's 2022 fee-for-service spending for long-stay nursing home residents vs other beneficiaries and their 1.7% share) and apply it in medicare_gross_cost, medicare_cost, qmb_cost_sharing and, before premiums and after the Part D low-income subsidy, cbo_medicare_benefit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New test_medicare_noninstitutionalized_spending_ratio.py: the stored value is the MedPAC formula, constant and below one from 2013; the documented fee-for-service and Medicare Advantage variants bracket it; the MCBS facility definition (2006-2013 Characteristics and Perceptions tables) gives a larger gap every year; and, across reformed ratios, every consumer matches a reference implementation, stays within [0, gross], does not fall when the ratio rises, and reproduces the unscaled formulas at a ratio of one. Hand-computed YAML expectations and the core consumer tests move to the scaled spending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BLS's CPS design page says institutional group quarters such as nursing homes have never been in the CPS sample; state that, rather than asserting that assisted living residents are sampled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ninstitutional-spending Scale the base's new 2013 and 2014 cbo_medicare_benefit cases and the IRMAA-in-full medicare_cost cases by the noninstitutionalized ratio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cite 83 FR 5525 (sections C.11 and C.12) for counting assisted living and retirement community residents where they live and nursing facility patients at the facility, name the MCBS facility types from its Appendix B, note that the June 2025 figures replace the preliminary October 2024 slide's description, say how CBO's constant 2012 share differs from this constant ratio, and put several cited pages in reference titles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the property tests that built four reformed tax-benefit systems and kept them cached for the rest of the core test process. The YAML tests and the reference implementations in the per-capita, Part D premium and CBO series tests cover the consumers at the stored ratio. Add a differential check that CBO's 2006 figures imply a ratio within 0.01. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
left a comment
There was a problem hiding this comment.
Agent review for Max, written by Claude Code for Max Ghenis.
Reviewed at 1fa242b: the formulas and the 0.971 arithmetic check out, but the nursing home share uses a different basis from the spending it scales, one cross-check uses two different CBO numerators, and the branch needs a rebase on its parent. This review covers this draft's own changes only and takes no position on how #10118 treats Medicaid-paid premiums.
P2
-
noninstitutionalized_spending_ratio.yaml:12-17uses 1.7 percent, MedPAC's share of beneficiaries who were long-stay residents in at least one month of the year (1.2 million in 2023). The ratio scalesper_capita_cost, which divides by person-years (CMS methodology, file page 34), and the CPS leaves out people who live in a nursing home when it samples. MedPAC, June 2025, file page 8 says the point-in-time count is lower: about 840,000 in July 2023. That is 1.29 percent of the 65.2 million enrollees for 2023 in CMS Table 17. At the same relative spending, that share gives 1 / (1 + 0.0129 × (31,200 / 11,300 − 1)) = 0.978, above the 0.966 to 0.976 range in the description. On $18,983 in 2026, the difference from 0.971 is about $130 per enrollee.The direction is not settled. MedPAC gives no spending for the July group, who may cost more per person. And 24 percent of the any-month group died during 2023, so a later survey cannot reach them either. Please state the choice in the YAML and cover this case in the range, or say why it does not apply.
The same mismatch reaches the 0.966 variant at lines 23-26. The 62 percent fee-for-service share comes from July data (file page 13, Figure 5-2 note), and
test_medicare_noninstitutionalized_spending_ratio.py:113-120applies it to the any-month 1.7 percent. -
test_medicare_noninstitutionalized_spending_ratio.py:150-153computes CBO's two 2006 ratios from different numerators. The per-recipient ratio uses $389.1B − $32B = $357.1B. The per-reporter ratio uses $352.4B. Lines 77-83 describe $352.4B as non-LIS benefits after CBO's adjustments, which the description says remove institutionalized recipients' benefits. Neither explains the $4.7B difference. With $352.4B in both, the per-recipient ratio is 352.4 / 389.1 / 0.94 = 0.963, not the asserted 0.976, and the stated range becomes 0.963 to 0.975. The 0.01 tolerance passes either way (0.963 is 0.0075 from 0.971), so it does not catch the difference. cbo.gov refused my requests (HTTP 403), so I could not check which spending base the 2013 report's $32B uses. I did confirm $402.0B and $2.6B in the 2007 Trustees Report, Table II.B1. -
noninstitutionalized_spending_ratio.yaml:22says the ratio "is measured for fee-for-service Parts A and B". The spending figures are fee-for-service, but the 1.7 percent share covers all beneficiaries. The file's own fee-for-service version is 0.966. Say that the stored value combines an all-beneficiary share with fee-for-service spending. -
medicare_cost.yaml:139-147does not test the floor this draft moves. A $30,000 premium gives zero with or without the ratio. A 2025 enrollee withgross_medicare_part_b_premium: 17_200, no Part A premium and no Part D IRMAA separates the two: $17,751 − $17,200 − $180.41 = $370.59 before the draft, and $17,236.22 − $17,200 − $180.41 = −$144.19, so 0, after it. -
The branch is 314 commits behind its base and conflicts in four files there and in seven files on main. It has no checks, because
pr.yamlruns only for pull requests into main. When it is rebased:medicare_cost.yamlunit tests 13 and 15, on both the parent and main, expect unscaled values. Unit test 15 (temporary protected status) becomes $18,983 × 0.971 − $2,434.80 − $237.48 = $15,760.21, from $16,310.72. Unit test 13 (2036) becomes about $32,517.30 gross and $28,884.50 net. It merges into the parent without a conflict, so it would keep its old values.cbo_medicare_benefit.py:8-28conflicts with the parent's rewritten text, and line 27 still cites PDF page 39, where the parent now cites 41.- The parent already has the branch-aware
get_known_periodswrapper (social_security_inputs.py:896) that this head lacks. With Core 3.38.0, 25 test cases error at this head (reported, not rerun here).
P3
- The description's 2009 MCBS cell should be 0.909. Tables 1.1 and 4.1 give (289,843 / 45,053) / (335,081 / 47,371) = 0.909498. The other seven MCBS cells match the test's inputs.
- The description cites evidence and review files on a local disk, which readers cannot open.
This PR builds on #10118, which builds on #10111. Merge commit 993af63 brings in #10118's head (c9dfbc2), so
c9dfbc2bda...HEADshows this PR's own changes.Problem
CMS's National Health Expenditure accounts (Table 17) divide Medicare spending by all Part A or B enrollees, nursing home residents included, and
calibration.gov.hhs.medicare.per_capita_cost(#10107) stores that average. Microcosm builds the microdata from the CPS ASEC, which samples the civilian noninstitutional population and leaves out nursing homes. So pe-us assigns each enrolled survey respondent an average that includes nursing home residents. In 2022, fee-for-service Part A and B spending per long-stay nursing home resident ran almost three times that per other beneficiary ($31,200 against $11,300, MedPAC).CBO values Medicare in household income with a calculation that "excludes costs for institutionalized enrollees" (January 2026). CBO "estimates the number of institutionalized recipients and the benefits going to those recipients and removes those from the administrative totals to make the data compatible with how data are reported in the Current Population Survey" (Working Paper 2018-07, file page 52).
The gap by source and year
Medicare spending per enrollee outside facilities, as a share of spending per enrollee:
CMS last published Medicare payments by residence in the 2013 MCBS tables. The 2015-2020 MCBS Chartbooks don't split Medicare payments by residence, and the public use files leave out facility residents. MedPAC's long-stay share fell from 2.6% of beneficiaries in 2013 to 1.7% in 2022 and 2023, and 2013's share with 2022's relative spending gives 0.956.
Which definition matches the survey
So we use MedPAC's long-stay nursing home definition, which gives 0.971, a 2.9% gap. Fee-for-service composition, Medicare Advantage risk scores and CBO's 2006 figures put the ratio between 0.966 and 0.976. We hold 0.971 from 2013, the first year of
per_capita_cost, because MedPAC publishes relative spending for 2022 only. CBO instead holds the institutional share of non-LIS benefits at its 2012 level from 2013 (Working Paper 2018-07, file page 52).Changes
calibration.gov.hhs.medicare.noninstitutionalized_spending_ratio= 1 / (1 + 0.017 × (31,200 / 11,300 − 1)) = 0.971. Its YAML gives the derivation, the variants and their file pages. Fee-for-service enrollment shares (62% of long-stay residents, 53% of others) give 0.966, and pricing Medicare Advantage at the long-stay risk score ratio (2.12 / 1.01) gives 0.975.medicare_gross_cost= per_capita_cost × ratio.medicare_cost= max(per_capita_cost × ratio − own Part A premium − gross Part B premium − average Part D premium per enrollee − own Part D IRMAA, 0).qmb_cost_sharing= per_capita_cost × ratio / 12 × QMB rate.cbo_medicare_benefit= max((per_capita_cost − Part D LIS per enrollee) × ratio − premium income per enrollee, 0). CBO applies its institutional share to non-LIS benefits and handles the LIS separately (Working Paper 2018-07, file page 52). We keep premium income per enrollee as an average over all enrollees, since MedPAC splits program spending by residence but not premiums.cbo_household_income, and multiplies the reference implementations in three property-test modules by the ratio.Overlap with #10123
#10123 replaces
qmb_cost_sharingwith CMS-64 spending per QMB and deletesqmb/cost_sharing_rate.yaml. If #10123 merges first, take its versions of these files and drop this PR's QMB changes:variables/gov/hhs/medicare/savings_programs/qmb_cost_sharing.pytests/policy/baseline/gov/hhs/medicare/savings_programs/qmb_cost_sharing.yamltests/policy/baseline/gov/hhs/medicare/savings_programs/msp_cost.yamltests/policy/baseline/gov/hhs/medicare/savings_programs/msp_federal_and_state_cost.yamltests/core/test_medicare_per_capita_cost.py::test_qmb_cost_sharing_is_the_qmb_rate_of_monthly_spendingThe new test module reads only the ratio parameter, so #10123's deletion leaves it intact. #10123's description notes that its per-QMB average includes institutionalized QMBs.
Invariants
The tests check each of these:
medicare_gross_costequals per_capita_cost × ratio, andmedicare_costmatches its reference and lies between 0 andmedicare_gross_cost. (Spending − LIS) × ratio − premium income lies strictly between 0 and spending × ratio in every year from 2013 to 2200. A QMB enrollee's monthlyqmb_cost_sharingequals the scaled spending over 12 times the QMB rate.Tests
Local runs on macOS (Python 3.13, policyengine-core 3.34.2), at 1fa242b:
coregroup, which already loads the tax-benefit system. Alone, it runs 12 tests in 29 s (90 s wall including the model import) at 1.1 GB max RSS.Impact
We ran the full 2026 microsimulation on the default dataset (
populace_us_2024.h5@populace-us-2024-spm-20260909) under the hub's heavy-job lock, comparing #10118's head c9dfbc2 with this head 1fa242b. We estimate these changes:medicare_gross_costmedicare_costcbo_medicare_benefitcbo_household_incomemsp_costhealthcare_benefit_valuehousehold_net_income_including_health_benefitshousehold_net_income,household_benefits,income_tax,state_income_taxEvery changed record falls by the amount the ratio implies: $550.51 per enrollee (2.9% of $18,983) in both Medicare cost variables, $543.09 (2.9% of $18,983 less the $255.86 LIS per enrollee) in
cbo_medicare_benefit, and $110.10 a year per QMB enrollee (20% of $550.51).medicare_costfalls by 3.5% because premiums don't scale.healthcare_benefit_valueadds Medicare Savings Program costs but notmedicare_cost, so only the QMB change reaches it andhousehold_net_income_including_health_benefits.Review
~/reviews/medicare-institutional-2026-10/review/review_r1.md.Not addressed
part_d_lis(Model the Medicare Part D low-income subsidy as a CBO means-tested transfer #10127) gives each recipient the Trustees' average subsidy per LIS enrollee, nursing home residents included. CBO removes institutionalized LIS recipients and their benefits, using the Master Beneficiary Summary File (Working Paper 2018-07, file page 52). (comment on #10127)per_capita_costneeds no territory adjustment: NHE Table 17 covers U.S. spending and enrollment only (NHEA methodology, p. 34).Evidence (sources with SHA-256, CBO extracts, Federal Register and BLS copies, notes, impact driver, reviews):
~/reviews/medicare-institutional-2026-10/.axiom: n/a: microsim calibration of the Medicare benefit value to the survey population, not a policy rule.
🤖 Generated with Claude Code