Conversation
Sets non_dependant_normally_resides_with on families of non-dependants in households whose rent is shared, from the FRS household relationship grid: a family related to members of exactly one joint occupier's family resides with that family only (LHA Guidance Manual 2.093 example 2); every other family keeps the default, every joint occupier (2.110). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rence Worked examples from the LHA Guidance Manual (2.093 example 2, 2.110) and Hypothesis properties: agreement with a slow reference implementation, scope (only non-dependants of households with a sharer move), row-order invariance, and non-relative and missing codes being interchangeable. Adds hypothesis to the dev extra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
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.
Model side: PolicyEngine/policyengine-uk#2035 (issue PolicyEngine/policyengine-uk#2029).
Stacked on #512 (base
frs-shared-household-rent), which is stacked on #506 and #503.Summary
policyengine-uk#2035 adds a benefit-unit input,
non_dependant_normally_resides_with. It is set on a non-dependant's family in a household whose rent is shared by joint occupiers, and says which of them the family normally resides with. It decides whose non-dependant someone is for:The values are
EVERY_JOINT_OCCUPIER(default),HOUSEHOLD_HEAD_FAMILYandOTHER_JOINT_OCCUPIERS.This PR sets the input from the FRS household relationship grid (R01–R14 on the adult and child records). In a household with at least one sharer (
liable_for_share_of_household_rent, #512), the joint occupiers are the household reference person's family and the sharers. Every other family is a family of non-dependants.HOUSEHOLD_HEAD_FAMILYOTHER_JOINT_OCCUPIERSEVERY_JOINT_OCCUPIER(default)"Anything else" covers:
OTHER_JOINT_OCCUPIERSwould at least drop the HRP's family, but would still add the other sharers, so neither value is right);Why relationships decide it
The FRS gives us the relationships, not the facts of each household. So the rule is a proxy: a family that is related to exactly one joint occupier is taken to live with that joint occupier.
"Related" means any FRS relationship code except 18, "other non-relative". That covers:
Two inclusions go beyond a narrow reading of "relative": foster relations (5, 9, 13), and partner codes across benefit units (1, 2, 20). A young adult who stays on with former foster carers lives in their household. JP turns on the household relationship, not on blood. Neither inclusion changes any family in the 2023-24 or 2024-25 FRS.
The grid, checked against the data
All of these come from the UKDS 2024-25 data dictionary and aggregate counts of the EUL files.
How many families it touches
Counts with fewer than 10 survey households behind them are suppressed.
Every split of those families by value is suppressed.
The input matters little for the 2024-25 data. It is here so the model applies 2.093 where the survey shows it, and for later FRS years.
Impact
Real microsimulations on policyengine-uk#2035's head (68647f9b6), the only model that reads the input:
The two runs have identical households, benefit units and weights.
housing_benefit_LHA_allowed_bedrooms), LHA category, young-individual test (housing_benefit_claimant_has_non_dependant), HB and CTR non-dependant deductionsSo in the 2024-25 data the rule changes HB size criteria and HB and CTR deductions for fewer than 10 survey households, but no household's HB or CTR amount. Families liable for a share of the rent: 157k weighted in 2025-26 and 158k in 2026-27 (97 survey households).
Survey households are counted by a fingerprint of rent and sorted ages. Every SPI-synthetic and capital-gains copy in the enhanced FRS has the fingerprint of an original FRS household, and the 16,288 originals share 8,525 fingerprints, so a fingerprint count is a lower bound on the survey households behind a cell.
The model behind these runs is #2035 at 68647f9b6. Its later commits (Income Support eligibility, adoption placement) don't touch anything that reads this input.
Not changed by this PR
The new column feeds nothing else in the build: no uk-data code reads it, and the build's policyengine-uk (2.93.0, from the lock) has no variable for it. Checked three ways.
frs_2024_25.h5from this branch (db02d65) against Mark the benefit units that share their household's rent #512's own build (a9e3371, 1 Oct, same raw files and environment): every shared column of the person, benefit unit and household tables is identical. The only addition is this column.build_from_single_year_datasetand_pre_encode_enum_columnsbothcontinuepast them).This is why the impact above compares one build with and without the column, rather than two builds. Two builds of the same commit give different weights (#507), so their difference would bury an effect this small.
Invariants (tested)
policyengine_uk_data/tests/test_frs_non_dependant_residence.pyuses synthetic frames only, with no survey data.Worked examples:
Properties (Hypothesis, up to five benefit units, 20 people and four households per example):
OTHER_JOINT_OCCUPIERSonly with exactly one sharer.Three mutations of the function are each caught:
OTHER_JOINT_OCCUPIERSwith several sharers;This PR adds
hypothesisto thedevextra and touv.lock. The lock's own version entry also moves from the stale 1.56.16 to 1.57.4.Run locally at db02d65 (policyengine-uk 2.93.0 environment, Hypothesis 6.168.3):
test_frs_non_dependant_residence.py: 14 passed;test_is_parent_from_frs.py: 1,268 passed;ruff format --check .: clean.CI runs only after this PR's base reaches
main.Merge order
axiom: n/a: data input (the rules are in policyengine-uk#2035; rulespec-uk#406)
🤖 Generated with Claude Code