Repository navigation
Bind England's PIP at 16–19 and 20–24, and impute UC limited capability for claims without a linked DWP record - #1663
juaristi22 wants to merge 5 commits into
Conversation
María's call of 17 November 2026 ("do the pip age-split and lcwra in a
single pr"), after the Milburn review's benchmarks check
(PolicyEngine/uk-milburn-review-dashboard#1). The review's measures cut
PIP at 18, inside the 16 to 24 band, and on build fcfac709 the split
within it ran 17.6% high at 16 to 19 and 15.9% low at 20 to 24 while the
band itself fitted.
The two published bands bind; the 16 to 24 band is held out as their sum,
as dwp.uc.people_aged_16_to_24 is for its two bound parts. England's
eleven other published bands stay held out as checks on the split within
their broad bands; their restated exclusion carries her call, dated
2026-11-17 and expiring with its family on 2027-02-15.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María's call of 17 November 2026 ("do the pip age-split and lcwra in a
single pr"), after the Milburn review's benchmarks check
(PolicyEngine/uk-milburn-review-dashboard#1). policyengine-uk's proxy
gives LCWRA to every claimant on a disability benefit and to no one
else, while on linked FRS claims DWP's status disagrees with it in both
directions; so the take-up redraw's entrants carried the element only
where someone got PIP, DLA or ESA, and on fcfac709 nine in ten young
people with the element got PIP, against the Resolution Foundation's
110,000 of 176,000.
uc_limited_capability now gives every claim outside the SPI rows that has
no linked record an imputed status: LCWRA at the share of linked claims
with that status in its cell (the youngest claimant's age band, 16 to 24,
25 to 49 or 50 and over, and whether the proxy flags any claimant), at
the stage's household weights, from an identity-keyed uniform; NONE
otherwise. The linked rules then assign the flags, with the claim's first
claimant as the lead. A cell under three source households takes its
proxy group's rate over every age; claims with a claimant's own ESA award
keep the proxy. The receipt adds the cells' rates, printed only where the
LCWRA claims and the rest each rest on three source households or more.
The stage asks the engine for has_own_esa_award too. sources.yaml, its
schema and source_stages.json carry the new parameters in lockstep, the
graph binds uc_take_up (the young ages), frs_take_up (the age source)
and stochastic_assignment into the stage's code identity, and the
release input coverage manifest records source_stages.json's new hash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
María asked that the pull request target main's head. #1519 (#931's geography-first prep) merged at 15:33Z; its 22 commits change the UK build. The one conflict, the release input coverage manifest's source_stages.json hashes, is resolved by regenerating the manifest on the merged tree (tools/build_uk_release_input_coverage_manifest.py): it differs from main's only by that hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/graph_uk_spine_fixture.py on the merged tree: only the uc_limited_capability node's parameters move (the has_own_esa_award predictor, the age bands, seed, salt and imputation rule, and the restated scope and notes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Thanks for this. The cell logic, the disclosure rule and the register change all read cleanly. The stage tests and test_uk_measure_simulation.py pass at b5045212 (77 passed). Two points:
1. Own-ESA claims are in the source rates but not in the targets (medium).
uc_limited_capability.py:451-452puts every linked claim with a claimant intocell_rows, including claims where a claimant has their own ESA award. The imputation at :515-518 then excludes own-ESA claims from the claims that draw.- This matches the rule as written ("the share of linked claims"), so it is a question of population alignment rather than a code slip.
- If own-ESA claims hold LCWRA at a different rate from the rest of their cell, each cell's rate is partly measured on claims that never draw from it. This applies on both the
proxy_flagsand theproxy_does_notside. - A synthetic check at this head shows the mechanism. One 25–49
proxy_flagscell with 3 linked own-ESA LCWRA claims, 3 linked non-ESA NONE claims and 40 unlinked non-ESA flagged claims gives a cell rate of 0.5, and 18 of the 40 take LCWRA, although the non-ESA linked rate is 0. - Could the receipt or the PR description show the cell rates with and without own-ESA linked claims? If the gap is material, excluding them from the cell and pooled rates would align source and target. If they are kept on purpose, a line in the imputation rule saying why would help.
2. The pooled-rate draw is not exercised (low).
test_unlinked_claims_draw_their_cells_linked_rate asserts only the "pooled" source label for the 50+ cells, and no imputed claim falls in a pooled cell. A few unlinked claims aged 50+, checked against the proxy side's all-ages rate, would cover the fallback at :488-489.
Also checked, with no issues found:
- household-weighted rates counted once per claim, with SPI excluded;
- consistent cell assignment between source and targets, at survey-year age;
- the <3 rule counted in distinct source households;
- deterministic, salt-separated identity draws;
- the first-claimant/carer rule matching the linked rules;
- the receipt printing a rate only with ≥3 households on both sides;
- the PIP register: 16–24 held out, 16–19 and 20–24 bound, eleven bands restated to 2026-11-17/2027-02-15, pin 142;
- the code-identity binding.
The engine tests and arms are noted as still to run.
Review drafted with AI assistance and checked against the code at b5045212. uc_limited_capability.py is unchanged at de21892 (main merge and H2 fixture only).
Linked claims in which a claimant has their own ESA award now stay out of uc_limited_capability's cell and pooled rates, as such claims stay out of the draw: a rate measured on them would speak for claims that never draw from it (the review of microcosm#1663, point 1). Beside each cell's rate and each pooled rate, the receipt gives the rate of the own-ESA linked claims it leaves out, under the same three-household rule, so every build shows the gap. The imputation rule, the stage's notes and the changelog fragment say why. sources.yaml and source_stages.json carry the new text, the release input coverage manifest its new hash, and the H2 spine fixture the stage node's new parameters (no other node moves). Two stage tests: own-ESA linked claims staying out of the rates, and a cell under three households drawing at its proxy group's rate over every age (point 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, Vahid. Both points are addressed in 1. Own-ESA claims in the source rates. Agreed: a rate should be measured on the kind of claim that draws from it.
2. The pooled draw. New test,
Checks at
The arms now run from this commit: the control on main |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Thanks, María. Both points are addressed at d850c0a.
- Own-ESA claims and the rates. Linked claims with an own ESA award now go to
own_esa_rows(uc_limited_capability.py:457-465). They are picked out by the sameown_esa[rows].any()test that keeps such claims out of the draw, so the cell and pooled rates are measured only on the kind of claim that draws. The receipt'sown_esa_award_claimsentry, beside each cell and pooled rate, goes through the samemeasured_rate. That means the same three-household rule on both sides applies before anything prints, and no combined rate is printed that could be differenced. The rule text insources.yaml,source_stages.jsonand the module constant says the same. - The pooled draw.
test_a_cell_under_three_households_draws_at_its_groups_rate_over_every_agenow drives the 50+ cell's draws against the pooled 0.4 (four of ten flagged linked claims). The draws fall on both sides of 0.4 and between it and the young cell's 0.5, so the test separates the pooled rate from the cell rates.test_linked_claims_with_their_own_esa_award_stay_out_of_the_ratesdoes the same for point 1, separating 1/3 from 0.4.
CI is green at this head, engine-uk included. Nothing further from me. The arms' per-cell rates, with and without the own-ESA claims, will be useful to see when they land.
Review drafted with AI assistance and checked against the code at d850c0a.
Why
The benchmarks check of the Milburn review dashboard (PolicyEngine/uk-milburn-review-dashboard#1) found two data gaps behind the young people figures on build
fcfac709.María's call of 17 November 2026: "do the pip age-split and lcwra in a single pr".
Changes
PIP age split (
uk/calibration_measure_exclusions.json). This now also lands on its own in Bind England's PIP cases at 16–19 and 20–24 in place of 16–24 #1671 (see Next).dwp.pip.cases_england_aged_16_to_19anddwp.pip.cases_england_aged_20_to_24now bind.dwp.pip.cases_england_aged_16_to_24is held out as their sum, asdwp.uc.people_aged_16_to_24is for its two bound parts.LCWRA for claims without a linked record (
uk_runtime/uc_limited_capability.py).has_own_esa_awardtoo.sources.yaml, its schema andsource_stages.jsoncarry the new parameters in lockstep.uc_take_up(the young ages),frs_take_up(the age source) andstochastic_assignmentinto the stage's code identity.source_stages.json's new hash; nothing else in it moves.Tests and changelog. Six new stage tests, and the first stage test now covers an unlinked claim:
Two changelog fragments.
Testing
f86134f11(UK #931 prep: count floors in true sources, fold geographic clones in the FRS fits, ready the conditioned area draw #1519).d850c0aac).4ce631f5at review date 2026-11-17. The control is mainf86134f11, and the head is this branch'sd850c0aac. Results below.Results
Both arms ran the same recipe, on Chronicle
4ce631f5at review date 2026-11-17. The control is on mainf86134f11, and the head on this branch'sd850c0aac. Figures are for 2025.Health.
PIP split. It works.
LCWRA imputation. It brings the mix close to the Resolution Foundation's, but it raises the level.
Checks.
The rates each cell draws at. These are measured on linked claims without their own ESA award, at the spine's design weights.
Certification. The criteria fixed before the results asked that young LCWRA move toward 176,000. It moves away, so the head was not certified.
Next
Not in this pull request
Disclosure
Every figure here is national and rests on 30 or more survey households. The new receipt prints a cell's rate only where its LCWRA claims and the rest each rest on three source households or more.
🤖 Generated with Claude Code