Repository navigation
Conversation
FRS CVPAY is the weekly rent a boarder or lodger pays the householder, held on the payer's own adult record; CONVBL says which they are. #503 stops counting it as the payer's property income. This keeps it, as `rent_paid_as_boarder` and `rent_paid_as_lodger` on the payer, so policyengine-uk can work out what the householder receives (the FRS asks the householder nothing about it). The helper `frs_boarder_and_lodger_rent` annualises CVPAY, floors it at zero and classes it as a boarder's where CONVBL is 1 and a lodger's otherwise. Tests cover conservation, exclusive classes, locality, the independence of property income, missing and negative codes and the stacked adult and child index; the create_frs smoke test fixture gains CONVBL and checks the two columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
21 of 52 tasks
Review of #506: - Add rent_paid_as_boarder and rent_paid_as_lodger to uprating_factors.csv and uprating_growth_factors.csv with sublet_income's per capita GDP index (the index policyengine-uk gives both inputs), so materialising the calibration year uprates them like other incomes. Tests check the rows and run uprate_dataset on positive rents. - Parametrise the create_frs smoke test over no payment, a boarder and a lodger, so the parser's column wiring is tested with positive CVPAY. - Say the released data hold the rent only on the payer's record (no householder receipt variable), rather than that the householder is not asked; document the weeks-per-year convention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
Weekly FRS amounts are annualised with 365.25/7 but policyengine-uk's weekly rules divide by 52
#531
Open
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.
Summary
Stacked on #503, which stops counting FRS CVPAY as property income for the boarder or lodger who pays it.
This PR keeps CVPAY on the payer's record as two new person inputs, so that policyengine-uk can work out the rent the householder receives. The released data hold this rent only on the payer's record; there is no separate variable for what the householder receives.
rent_paid_as_boarderrent_paid_as_lodgerfrs_boarder_and_lodger_rent(person)works out each amount from CVPAY. It annualises the weekly amount, floors it at zero, and splits it by CONVBL: a boarder where CONVBL is 1, a lodger otherwise. Nothing else in the dataset changes.What CVPAY and CONVBL are
Sources: the FRS 2024-25 documentation (UK Data Service SN 9563) and the FRS derived-variable specification (UKDS SN 4149 user guide, volume 2).
Invariants and tests
test_frs_boarder_lodger_rent.pychecks these properties on 200 seeded random sets of households. The amounts include zeros, negatives and missing values, and CONVBL includes codes 1, 2, 3, 0, -1 and missing.WEEKS_IN_YEAR× positive CVPAY on every record. The boarder total equals the positive CVPAY of CONVBL 1 records.WEEKS_IN_YEAR× £x.frs_property_incomedoes not change when CVPAY or CONVBL change. The new amounts do not change when ROYYR1 changes.Example tests cover a boarder, a lodger, rent with CONVBL 3, 0, -1 or missing (classed as a lodger's), zero, negative and missing CVPAY, and the repeated index labels that
create_frsproduces by stacking the adult and child tables.The
create_frssmoke test fixture gains CONVBL, which the raw adult table always has. The test runs three times, with no payment, a boarder paying £100 a week and a lodger paying £80 a week, and checks each amount reaches the right column.Uprating. Both columns are added to
uprating_factors.csvanduprating_growth_factors.csvwithsublet_income's rows, the per capita GDP index that policyengine-uk gives both inputs. The build materialises the dataset at the calibration year before calibrating, so without these rows the payments would stay at survey-year prices there. Tests check the rows and runuprate_dataseton positive rents; they fail without the rows.Mutation check. Each mutant fails tests:
Differential check. I built the base FRS 2024-25 at this branch's parent (
0812cd1) and at this branch (87a5f50), then compared every column of every table. Only the two new person columns differ.Together they total £0.807bn a year (weighted, at survey-year prices). That is 43 survey records, 138k people weighted, which matches the raw CVPAY total. The boarder and lodger totals are not reported separately because one class has fewer than 10 records.
Effect on the model
policyengine-uk skips dataset columns it has no variable for (
Simulation.build_from_dataset).rent_paid_as_boarderandrent_paid_as_lodgerare not variables in the locked policyengine-uk 2.93.0, so this PR changes no simulation output until a policyengine-uk release defines them. The companion PR is PolicyEngine/policyengine-uk#2002.Pipeline checks for the two new columns:
uprate_datasetuprates them through their newuprating_factors.csvrows when the build materialises the calibration year, and back again when it saves the base-year file.FRS_ONLY_PERSON_VARIABLES) does not touch them.Measured effects from a full rebuild with the policyengine-uk change will be added here before this leaves draft.
Weeks per year
The helper annualises weekly CVPAY with the repository's
WEEKS_IN_YEAR(365.25 / 7), as for every other weekly FRS amount. policyengine-uk converts annual amounts back to weekly with 52 weeks for its weekly disregards, so a weekly amount reaches them about 0.34% higher. That gap applies to every weekly FRS amount the model tests weekly (earnings, benefits and these payments alike), so it is not special-cased here: #531.Not in this PR
rentof their own.axiom: n/a: data pipeline change (FRS variable mapping), no rule change.
🤖 Generated with Claude Code