Repository navigation
Conversation
…im rates Every working-age legacy means-tested benefit has closed or is closing, but would_claim_uc is drawn without regard to legacy receipt: a legacy reporter that drew it false lost its legacy award and got no Universal Credit. Draw would_claim_uc_at_legacy_closure, which policyengine-uk reads once a legacy benefit the unit reports has closed, at DWP's Move to Universal Credit claim rates by combination of legacy benefits (Stat-Xplore table MtUC Households 3, notices to end of March 2026). Units reporting UC, and units with no legacy benefit, are true (the model default). The draw has its own seeded generator, so the seed=100 sequence behind every other flag is unchanged; SPI-synthetic rows are redrawn after stage 2 rewrites their receipt. would_claim_uc itself is untouched, so 2024-25 legacy receipt is unchanged. Fixes #492. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
21 of 52 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #492
Summary
Every working-age legacy means-tested benefit has closed or is closing, but
would_claim_ucis drawn without regard to legacy receipt. A legacy reporter whose draw came out false lost its legacy award at the closure and got no Universal Credit.This PR draws
would_claim_uc_at_legacy_closure, which PolicyEngine/policyengine-uk#2119 reads once DWP moves a family off its legacy benefits (legacy_benefits_closed). The draw uses DWP's Move to Universal Credit claim rates for the family's combination of legacy benefits.would_claim_ucis untouched, so 2024-25 legacy receipt is unchanged.Option (b), not (a)
The issue offered two routes. Only (b) keeps 2024-25 and 2025-26 legacy receipt intact:
extend_single_year_dataset).~would_claim_uc.Option (a), setting
would_claim_uctrue for legacy reporters, would therefore:Option (b) needs a model input and switch, which #2119 adds. This PR is the data half.
Change
parameters/take_up/uc_managed_migration.yaml: households sent a migration notice, by legacy benefit combination, from Stat-Xplore ("Households invited to Move to Universal Credit", table MtUC Households 3; GB, notices to end of March 2026, retrieved 2026-10-03). The table has all 19 combinations DWP reports and the all-households row. Rate = claimed / (claimed + did not claim); the 538 households still in progress are left out. The headline matches DWP's 12 May 2026 release: 1.82m notices, 87% claimed.utils/takeup.py:legacy_benefit_combinationandassign_uc_claim_at_legacy_closure.create_frs: draws the flag with its own generator (seed 492), right afterwould_claim_uc. Theseed=100sequence behind every other take-up flag is unchanged.require_variablefails the build if policyengine-uk lacks the input.impute_income: stage 2 rewrites the SPI-synthetic rows' benefit receipt, so their flag is redrawn from the rewritten receipt (seed 493).require_variable, as intended.(Every combination is in the YAML.)
Income-related ESA ordering (issue's note)
policyengine-uk has not modelled the income-related ESA end date. That is SI 2025/1148 art 3A, inserted by SI 2026/409, ending remaining awards on 1 July 2026 (NI: SR 2025/176 art 3A from 1 October 2026). PolicyEngine/policyengine-uk#1914 is open with no PR.
How #492 interacts:
legacy_benefits_closed.would_claim_ucis true) is untouched. It is #1914's job.Impact
Two seeded builds were run with production settings (seed 0, one geography clone, shared HTTP cache):
main(b45c373) and this branch (2ac3c22). Both used policyengine-uk #2119 (4313fbd3a), which this branch'srequire_variableguard needs. Aggregates come from #2119's merged head (cf40b021b, policyengine-core 3.32.16), and only aggregates are reported. A placebo,mainrebuilt with calibration seed 1, sizes the reweighting noise.This PR (branch minus
main, same model):would_claim_uc, closure-claim Universal Credit falls from £0.83bn (48.7k units) to £0.78bn (41.8k) in 2025. The re-weighting makes up the rest.main's build apart from the new column, sowould_claim_ucand every other take-up flag are unchanged, SPI-synthetic rows included. The base FRS file differs only by the new column. Household weights and weight-dependent imputations (energy, fuel, property values) differ.Context: what these changes do together.
mainbuild, against policyengine-ukmain325d585e5, they give: Universal Credit +£0.83bn (+48.7k units) in 2025 and +£1.01bn in 2026; Housing Benefit −£0.16bn; Income Support −£0.13bn (2025); income-related ESA −£0.24bn; household net income +£0.26bn (2025) and +£0.56bn (2026); AHC poverty −80k (2025) and −102k (2026). That build's weights were calibrated under #2119. On the released 1.57.4, #2119 alone gives Universal Credit +£0.07bn.Run files are in the session's review folder:
impact/aggregates.pyandcompare_columns.py, with outputss1_*,s2_*ands1_columns*.txt.Invariants
Tested in
policyengine_uk_data/tests/test_uc_managed_migration_takeup.py(Hypothesis plus built-dataset checks):The seeded builds also confirm that
would_claim_ucand every other take-up flag are identical tomainon FRS-original rows.Limitations
Release
This is in the d833 uk-data batch. It is reviewed and approved on gates, not merged; it lands with the batch on Max's go. It needs policyengine-uk#2119 released first. PolicyEngine/policyengine-uk#1910 (working-age Housing Benefit abolition) waits for this PR (d837).
🤖 Generated with Claude Code