diff --git a/changelog.d/2069.fixed.md b/changelog.d/2069.fixed.md new file mode 100644 index 0000000000..745d5fbff9 --- /dev/null +++ b/changelog.d/2069.fixed.md @@ -0,0 +1 @@ +- Give children and couples who cannot share a bedroom because of disability their own bedrooms in the LHA size criteria (UC Regs 2013 Sch 4 para 12(6), (6A), (8), (9)(c)-(d); HB Regs 2006 and HB (SPC) Regs 2006 reg 13D(3)(za), (zb), (ba)), with the new input `cannot_reasonably_share_bedroom_due_to_disability`. A child under 16 on the DLA care component at the middle or highest rate who cannot reasonably share is left out of the children's pairing and has a room of their own, so a room is added only where the child would otherwise share. A couple one of whom cannot share (on attendance allowance, armed forces independence payment, DLA care at the middle or highest rate or PIP daily living; attendance allowance only at the higher rate before 27 January 2025) has a bedroom each: for Universal Credit the renter's couple when both members are claimants, since a member who claims as a single person (UC Regs 2013 reg 3(3)), including a claimant over pension age on the SI 2014/1230 reg 60A route, has no joint renter (Sch 4 para 1(2)); for Housing Benefit any couple of occupiers. Housing Benefit allows these bedrooms only where the dwelling has them (`num_bedrooms`; assumed where not reported). In force from 4 December 2013 (children) and 1 April 2017 (couples). diff --git a/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/benefits.yaml b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/benefits.yaml new file mode 100644 index 0000000000..e3238513b3 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/benefits.yaml @@ -0,0 +1,14 @@ +description: Disability benefits a child must receive to be a child who cannot share a bedroom in the LHA size criteria. The law also lists the care component of child disability payment at the middle or highest rate (Scotland), which the model has no variable for. +values: + 2013-12-04: + - dla_sc_middle_plus +metadata: + unit: list + label: LHA child who cannot share qualifying benefits + reference: + - title: Universal Credit Regulations 2013 Sch 4 para 12(6)(a) + href: https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12 + - title: Housing Benefit Regulations 2006 reg 2(1), "child who cannot share a bedroom" + href: https://www.legislation.gov.uk/uksi/2006/213/regulation/2 + - title: Housing Benefit (State Pension Credit) Regulations 2006 reg 2(1), "child who cannot share a bedroom" + href: https://www.legislation.gov.uk/uksi/2006/214/regulation/2 diff --git a/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/in_effect.yaml b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/in_effect.yaml new file mode 100644 index 0000000000..55b3650c3c --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/child/in_effect.yaml @@ -0,0 +1,10 @@ +description: Whether a child who cannot share a bedroom because of disability has a bedroom of their own in the LHA size criteria. +values: + 2011-04-01: false + 2013-12-04: true +metadata: + unit: bool + label: LHA bedroom for a child who cannot share in effect + reference: + - title: Housing Benefit and Universal Credit (Size Criteria) (Miscellaneous Amendments) Regulations 2013 (SI 2013/2828) regs 2(4), 3(3) and 4(3) + href: https://www.legislation.gov.uk/uksi/2013/2828/made diff --git a/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/benefits.yaml b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/benefits.yaml new file mode 100644 index 0000000000..b14a739956 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/benefits.yaml @@ -0,0 +1,26 @@ +description: Disability benefits a member of a couple must receive to be a member of a couple who cannot share a bedroom in the LHA size criteria. Attendance allowance counted only at the higher rate until 27 January 2025. The law also lists the Scottish devolved equivalents (child disability payment, adult disability payment, Scottish adult disability living allowance, pension age disability payment), which the model has no variables for. +values: + 2017-04-01: + - receives_higher_rate_attendance_allowance + - armed_forces_independence_payment + - dla_sc_middle_plus + - pip_dl + 2025-01-27: + - attendance_allowance + - armed_forces_independence_payment + - dla_sc_middle_plus + - pip_dl +metadata: + unit: list + label: LHA member of a couple who cannot share qualifying benefits + reference: + - title: Universal Credit Regulations 2013 Sch 4 para 12(6A)(a) + href: https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12 + - title: Universal Credit Regulations 2013 reg 2, "attendance allowance" (includes armed forces independence payment) + href: https://www.legislation.gov.uk/uksi/2013/376/regulation/2 + - title: Housing Benefit Regulations 2006 reg 2(1), "member of a couple who cannot share a bedroom" + href: https://www.legislation.gov.uk/uksi/2006/213/regulation/2 + - title: Housing Benefit (State Pension Credit) Regulations 2006 reg 2(1), "member of a couple who cannot share a bedroom" + href: https://www.legislation.gov.uk/uksi/2006/214/regulation/2 + - title: Social Security (Miscellaneous Amendments) Regulations 2025 (SI 2025/3) regs 3-5 (attendance allowance at any rate from 27 January 2025) + href: https://www.legislation.gov.uk/uksi/2025/3/made diff --git a/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/in_effect.yaml b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/in_effect.yaml new file mode 100644 index 0000000000..0e654a8864 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/LHA/cannot_share_bedroom/couple_member/in_effect.yaml @@ -0,0 +1,10 @@ +description: Whether a couple one of whom cannot share a bedroom with the other because of disability has a bedroom each in the LHA size criteria. +values: + 2011-04-01: false + 2017-04-01: true +metadata: + unit: bool + label: LHA bedroom for a member of a couple who cannot share in effect + reference: + - title: Housing Benefit and Universal Credit (Size Criteria) (Miscellaneous Amendments) Regulations 2017 (SI 2017/213) regs 4, 5 and 6 + href: https://www.legislation.gov.uk/uksi/2017/213/made diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_cannot_share_bedroom.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_cannot_share_bedroom.yaml new file mode 100644 index 0000000000..b09f15ed23 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_cannot_share_bedroom.yaml @@ -0,0 +1,1089 @@ +# Bedrooms for children and couples who cannot share a bedroom because of +# disability in the LHA size criteria. +# +# Universal Credit (UC Regs 2013 Sch 4 para 12): the disabled child condition +# (12(6)) is met where the renter, or another member of their extended +# benefit unit, is responsible for a child who would otherwise be expected to +# share a bedroom, receives the DLA (or CDP) care component at the middle or +# highest rate, and is not reasonably able to share a room with another child +# because of their disability. The renter then has as many additional +# bedrooms as are necessary for each such child to have their own (12(8)). +# The disabled person condition (12(6A)) is met where the renter would +# otherwise share a bedroom with a joint renter, receives a qualifying +# disability benefit and cannot reasonably share with the joint renter; it +# gives one additional bedroom (12(9)(d)). From 4 December 2013 (children) +# and 1 April 2017 (couples); attendance allowance counted only at the +# higher rate until 27 January 2025 (SI 2025/3). +# +# A member of a couple who claims as a single person (UC Regs 2013 reg 3(3)) +# has no joint renter, since joint renters are joint claimants (Sch 4 para +# 1(2)), and so does not meet the disabled person condition. +# +# Housing Benefit (HB Regs 2006 and HB (SPC) Regs 2006 reg 13D(3)): the +# categories are, in order, (za) a member of a couple who cannot share a +# bedroom, (zb) a member of a couple who can share a bedroom (the partner of +# one who cannot), (a) a couple, (b) a person who is not a child, (ba) a child +# who cannot share a bedroom, (c) two children of the same sex, (d) two +# children under 10, (e) a child; "but the claimant is only entitled to a +# bedroom in respect of a child who cannot share a bedroom or a member of a +# couple who cannot share a bedroom if there is a bedroom in the dwelling +# occupied as the home that is additional to those to which the claimant +# would be entitled if the child or the member of the couple were able to +# share a bedroom" (as amended by SI 2017/213 regs 4(4) and 5(3)). +# Definitions in reg 2(1). The model reads the dwelling's bedrooms from +# num_bedrooms and assumes the bedroom exists where that is not reported (0). +# +# Examples from the DWP Advice for Decision Making chapter F3 (F3135-F3138) +# and HB circular A21/2013 Annex 2. The cannot-share judgement is the input +# cannot_reasonably_share_bedroom_due_to_disability. + +- name: ADM F3135 example 1, two disabled sisters who would share each have a room + period: 2026 + input: + people: + joanne: + age: 40 + is_household_head: true + kevin: + age: 42 + daughter_10: + age: 10 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + daughter_8: + age: 8 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + son_13: + age: 13 + is_male: true + benunits: + family: + members: [joanne, kevin, daughter_10, daughter_8, son_13] + households: + home: + members: [joanne, kevin, daughter_10, daughter_8, son_13] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_child_who_cannot_share_bedroom: [false, false, true, true, false] + # The couple, the son and the two girls who would otherwise share: the + # girls each have their own room, one additional bedroom (para 12(8)). + LHA_cannot_share_bedrooms: 1 + LHA_additional_bedrooms: 1 + LHA_allowed_bedrooms: 4 + LHA_category: E + # HB reg 13D(3)(ba): each girl is a child who cannot share. + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 4 + +- name: ADM F3135 example 2, a disabled boy who need not share gets no extra room + period: 2026 + input: + people: + ankush: + age: 40 + is_household_head: true + rita: + age: 38 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + son_11: + age: 11 + is_male: true + benunits: + family: + members: [ankush, rita, son_7, son_9, son_11] + households: + home: + members: [ankush, rita, son_7, son_9, son_11] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # The 7- and 11-year-olds share and the 9-year-old has his own room, as + # he would anyway: 3 bedrooms, none additional. + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 3 + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: ADM F3135 example 3, a child the decision maker finds able to share gets no room + period: 2026 + input: + people: + carol: + age: 35 + is_household_head: true + jason: + age: 36 + daughter_5: + age: 5 + is_male: false + daughter_7: + age: 7 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: false + benunits: + family: + members: [carol, jason, daughter_5, daughter_7] + households: + home: + members: [carol, jason, daughter_5, daughter_7] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_child_who_cannot_share_bedroom: [false, false, false, false] + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: ADM F3136, a couple able to share a bedroom gets no extra room + period: 2026 + input: + people: + david: + age: 60 + is_household_head: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: false + kathy: + age: 58 + benunits: + couple: + members: [david, kathy] + households: + home: + members: [david, kathy] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + LHA_allowed_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 1 + +- name: A member of a couple who cannot share with the other has a second bedroom + period: 2026 + input: + people: + claimant: + age: 60 + is_household_head: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 58 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_member_of_couple_who_cannot_share_bedroom: [true, false] + # UC para 12(6A) and (9)(d): one additional bedroom. + LHA_cannot_share_bedrooms: 1 + LHA_allowed_bedrooms: 2 + LHA_category: C + # HB reg 13D(3)(za) and (zb): one bedroom for each member. + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 2 + housing_benefit_LHA_category: C + +- name: Both members of a couple unable to share have one additional bedroom between them + period: 2026 + input: + people: + tony: + age: 50 + is_household_head: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + mike: + age: 52 + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + couple: + members: [tony, mike] + households: + home: + members: [tony, mike] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # UC para 12(9)(d): one bedroom if one or both joint renters satisfy the + # condition. HB (za): one bedroom each. + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: A member of a couple who claims as a single person has no Universal Credit bedroom for not sharing + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + # The roles are supplied: entered without them, a member 20 or more + # years younger than the claimant is presumed to be their child. + is_claimant_or_partner: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 17 + is_claimant_or_partner: true + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 20_000 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # The partner is under 18 with no reg 8 circumstance, so cannot be a + # joint claimant, and the claimant claims as a single person (UC Regs + # 2013 reg 3(3)(a)). + meets_uc_minimum_age_condition: [true, false] + uc_is_ineligible_partner: [false, true] + uc_member_of_couple_claims_as_single_person: true + is_member_of_couple_who_cannot_share_bedroom: [true, false] + # UC Sch 4 para 12(6A) needs a joint renter to share with, and joint + # renters are joint claimants (para 1(2)). The claimant has none, so + # one bedroom (para 10(1)(a)) and the one-bedroom rate. + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 1 + LHA_category: B + # HB has no single claim: reg 13D(3)(za) and (zb) give a bedroom each. + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: The same couple claiming jointly because the partner is a carer have the second bedroom + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + is_claimant_or_partner: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 17 + is_claimant_or_partner: true + care_hours: 35 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 20_000 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # Caring 35 hours a week, the partner meets the minimum age of 16 (UC + # Regs 2013 reg 8(1)(c)), so the couple are joint claimants and joint + # renters. + meets_uc_minimum_age_condition: [true, true] + uc_is_ineligible_partner: [false, false] + uc_member_of_couple_claims_as_single_person: false + is_member_of_couple_who_cannot_share_bedroom: [true, false] + # UC Sch 4 para 12(6A) and (9)(d): one additional bedroom. + LHA_cannot_share_bedrooms: 1 + LHA_allowed_bedrooms: 2 + LHA_category: C + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: A single claim supplied as an input also removes the Universal Credit bedroom for not sharing + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 38 + benunits: + couple: + members: [claimant, partner] + # Supplied on the benefit unit. The model derives a single claim + # only from the partner's age (reg 3(3)(a)), and this partner meets + # the minimum age, so the input alone makes the claim single. + uc_member_of_couple_claims_as_single_person: true + households: + home: + members: [claimant, partner] + rent: 20_000 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_member_of_couple_who_cannot_share_bedroom: [true, false] + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 1 + LHA_category: B + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: ADM F3138, the disabled person and overnight care conditions each give a bedroom + period: 2026 + input: + people: + claimant: + age: 50 + is_household_head: true + dla_sc_middle_plus: true + has_non_resident_overnight_carer: true + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 52 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # UC para 12(9)(a) and (d). + LHA_additional_bedrooms: 2 + LHA_allowed_bedrooms: 3 + # HB reg 13D(3)(za)-(zb) and (3A)(a). + housing_benefit_LHA_additional_bedrooms: 1 + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A21/2013 Annex 2 example 1, a disabled only child needs no extra room + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + child: + age: 6 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, child] + households: + home: + members: [claimant, partner, child] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 3 + output: + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: A21/2013 Annex 2 example 2, two disabled daughters each have a room + period: 2026 + input: + people: + claimant: + age: 45 + is_household_head: true + partner: + age: 45 + daughter_11: + age: 11 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + daughter_13: + age: 13 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, daughter_11, daughter_13] + households: + home: + members: [claimant, partner, daughter_11, daughter_13] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 3 + output: + LHA_allowed_bedrooms: 3 + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A21/2013 Annex 2 example 3, the non-disabled brothers share + period: 2026 + input: + people: + claimant: + age: 45 + is_household_head: true + partner: + age: 45 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + son_15: + age: 15 + is_male: true + benunits: + family: + members: [claimant, partner, son_7, son_9, son_15] + households: + home: + members: [claimant, partner, son_7, son_9, son_15] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 4 + output: + # The couple, the disabled son, and the sons aged 7 and 15 together. + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 3 + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A21/2013 Annex 2 example 4, no Housing Benefit room beyond the dwelling's bedrooms + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_7, son_9] + households: + home: + members: [claimant, partner, son_7, son_9] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 2 + output: + # HB: the boys would share if able to, so the claimant would be entitled + # to 2 bedrooms, and the dwelling has no third (reg 13D(3), closing + # words): the two-bedroom rate. + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 2 + housing_benefit_LHA_category: C + # UC has no such condition. + LHA_cannot_share_bedrooms: 1 + LHA_allowed_bedrooms: 3 + LHA_category: D + +- name: The same family in a three-bedroom dwelling has the Housing Benefit room + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_7, son_9] + households: + home: + members: [claimant, partner, son_7, son_9] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 3 + output: + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A21/2013 Annex 2 example 5, five bedrooms in the criteria but the four-bedroom rate + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + son_12: + age: 12 + is_male: true + daughter_9: + age: 9 + is_male: false + daughter_3: + age: 3 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + daughter_4: + age: 4 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_12, daughter_9, daughter_3, daughter_4] + households: + home: + members: [claimant, partner, son_12, daughter_9, daughter_3, daughter_4] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 5 + output: + # Able to share: the couple, the son, and the three girls in two rooms + # (4). Otherwise: the couple, the son, the 9-year-old, and each disabled + # daughter (5). + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 5 + housing_benefit_LHA_category: E + LHA_allowed_bedrooms: 5 + LHA_category: E + +- name: A21/2013 Annex 2 example 6, a disabled boy who would share with his brother + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + son_12: + age: 12 + is_male: true + son_10: + age: 10 + is_male: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_12, son_10] + households: + home: + members: [claimant, partner, son_12, son_10] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 4 + output: + housing_benefit_LHA_allowed_bedrooms: 3 + housing_benefit_LHA_category: D + LHA_allowed_bedrooms: 3 + +- name: Two disabled girls who could each be alone but not both have a room each + period: 2026 + input: + people: + renter: + age: 40 + is_household_head: true + daughter_12: + age: 12 + is_male: false + daughter_8: + age: 8 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + daughter_6: + age: 6 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [renter, daughter_12, daughter_8, daughter_6] + households: + home: + members: [renter, daughter_12, daughter_8, daughter_6] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # Without the condition the girls need 2 rooms, and either disabled girl + # could be the one alone. With it, no disabled girl shares: 3 rooms + # (UC para 12(8), each such child has their own bedroom; HB reg + # 13D(3)(ba) for each). + LHA_cannot_share_bedrooms: 1 + LHA_allowed_bedrooms: 4 + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 4 + +- name: A non-dependant's disabled child who would share with the renter's child + period: 2026 + input: + people: + renter: + age: 48 + is_household_head: true + is_male: false + daughter_9: + age: 9 + is_male: false + older_daughter: + age: 26 + is_male: false + granddaughter: + age: 8 + is_male: false + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + renter_family: + members: [renter, daughter_9] + daughter_family: + members: [older_daughter, granddaughter] + households: + home: + members: [renter, daughter_9, older_daughter, granddaughter] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # The granddaughter is in the renter's extended benefit unit and her + # mother is responsible for her (UC para 12(6), "another member of their + # extended benefit unit"); in HB she is an occupier (13D(3)(ba)). The + # girls would share; instead each has a room. The daughter's own claim + # counts only her own child, who would not share. + LHA_cannot_share_bedrooms: [1, 0] + LHA_allowed_bedrooms: [4, 2] + housing_benefit_LHA_cannot_share_bedrooms: [1, 0] + housing_benefit_LHA_allowed_bedrooms: [4, 2] + +- name: A disabled foster child gives only the foster parent's bedroom + period: 2026 + input: + people: + renter: + age: 45 + is_household_head: true + daughter_8: + age: 8 + is_male: false + foster_child: + age: 7 + is_male: false + is_looked_after_by_local_authority: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [renter, daughter_8, foster_child] + households: + home: + members: [renter, daughter_8, foster_child] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # No one is responsible for a looked-after child (UC reg 4(6)(a)) and + # she does not occupy the dwelling (HB reg 21(3)), so she is in neither + # size criteria; the renter has the foster parent's bedroom. + is_child_who_cannot_share_bedroom: [false, false, true] + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 3 + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A disabled child placed for adoption counts in Universal Credit only + period: 2026 + input: + people: + adopter: + age: 45 + is_household_head: true + son_8: + age: 8 + is_male: true + placed_child: + age: 6 + is_male: true + is_placed_for_adoption: true + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [adopter, son_8, placed_child] + households: + home: + members: [adopter, son_8, placed_child] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # UC: the adopter is responsible for the child (reg 4A(1)(c)); the boys + # would share, so the disabled child condition adds a room, and the + # foster parent condition another (para 12(4)(b)). + LHA_cannot_share_bedrooms: 1 + LHA_allowed_bedrooms: 4 + # HB: a child placed for adoption does not occupy the dwelling (reg + # 21(3)); the adopter is a qualifying parent or carer. + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A non-dependant couple who cannot share have two Housing Benefit bedrooms + period: 2026 + input: + people: + renter: + age: 62 + is_household_head: true + son: + age: 34 + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + son_partner: + age: 33 + benunits: + renter_family: + members: [renter] + son_family: + members: [son, son_partner] + households: + home: + members: [renter, son, son_partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # HB reg 13D(3)(za)-(zb): any couple of occupiers, not only the + # claimant's, has a bedroom each where a member cannot share. + housing_benefit_LHA_cannot_share_bedrooms: [1, 1] + housing_benefit_LHA_allowed_bedrooms: [3, 2] + # UC: each non-dependant already has a bedroom (para 10(1)(c); ADM F3112 + # note 1), and the disabled person condition is the renter's (12(6A)); + # the son's own claim gets it as a renter. + LHA_cannot_share_bedrooms: [0, 1] + LHA_allowed_bedrooms: [3, 2] + +- name: A non-dependant couple who both cannot share still have two Housing Benefit bedrooms + period: 2026 + input: + people: + renter: + age: 62 + is_household_head: true + son: + age: 34 + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + son_partner: + age: 33 + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + renter_family: + members: [renter] + son_family: + members: [son, son_partner] + households: + home: + members: [renter, son, son_partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # Reg 13D(3)(za) for each member: one bedroom each, so one more for the + # couple, not two. + housing_benefit_LHA_cannot_share_bedrooms: [1, 1] + housing_benefit_LHA_allowed_bedrooms: [3, 2] + +- name: Housing Benefit room for a disabled child needs one beyond the overnight carer's + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + partner: + age: 40 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: true + has_non_resident_overnight_carer: true + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_7, son_9] + households: + home: + members: [claimant, partner, son_7, son_9] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + num_bedrooms: 3 + output: + # Able to share: the couple, the boys, and the overnight carer (3). The + # dwelling has no fourth bedroom. + housing_benefit_LHA_additional_bedrooms: 1 + housing_benefit_LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_allowed_bedrooms: 3 + LHA_allowed_bedrooms: 4 + +- name: Lower-rate attendance allowance qualified a couple member only from 27 January 2025 + period: 2024 + input: + people: + claimant: + age: 70 + is_household_head: true + aa_category: LOWER + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 68 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # UC para 12(6A)(a)(ii) and HB reg 2(1) read "attendance allowance at the + # higher rate" until SI 2025/3. + is_member_of_couple_who_cannot_share_bedroom: [false, false] + LHA_allowed_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 1 + +- name: Lower-rate attendance allowance qualifies a couple member from 2026 + period: 2026 + input: + people: + claimant: + age: 70 + is_household_head: true + aa_category: LOWER + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 68 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_member_of_couple_who_cannot_share_bedroom: [true, false] + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: Higher-rate attendance allowance qualified a couple member before 2025 + period: 2024 + input: + people: + claimant: + age: 70 + is_household_head: true + aa_category: HIGHER + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 68 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_member_of_couple_who_cannot_share_bedroom: [true, false] + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: No couple bedroom before 1 April 2017 + period: 2016 + input: + people: + claimant: + age: 60 + is_household_head: true + pip_dl: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 58 + benunits: + couple: + members: [claimant, partner] + households: + home: + members: [claimant, partner] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_member_of_couple_who_cannot_share_bedroom: [false, false] + LHA_cannot_share_bedrooms: 0 + housing_benefit_LHA_cannot_share_bedrooms: 0 + +- name: The cannot-share judgement needs a qualifying disability benefit + period: 2026 + input: + people: + claimant: + age: 40 + is_household_head: true + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 40 + son_7: + age: 7 + is_male: true + son_9: + age: 9 + is_male: true + dla_sc_middle_plus: false + cannot_reasonably_share_bedroom_due_to_disability: true + benunits: + family: + members: [claimant, partner, son_7, son_9] + households: + home: + members: [claimant, partner, son_7, son_9] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + is_child_who_cannot_share_bedroom: [false, false, false, false] + is_member_of_couple_who_cannot_share_bedroom: [false, false, false, false] + LHA_allowed_bedrooms: 2 + housing_benefit_LHA_allowed_bedrooms: 2 + +- name: A person aged 16 or over is not a child who cannot share + period: 2026 + input: + people: + renter: + age: 45 + is_household_head: true + son_16: + age: 16 + is_male: true + current_education: UPPER_SECONDARY + dla_sc_middle_plus: true + cannot_reasonably_share_bedroom_due_to_disability: true + son_8: + age: 8 + is_male: true + benunits: + family: + members: [renter, son_16, son_8] + households: + home: + members: [renter, son_16, son_8] + rent: 10_400 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # The 16-year-old has his own bedroom as a qualifying young person (UC + # para 10(1)(b)) or a person who is not a child (HB 13D(3)(b)). + is_child_who_cannot_share_bedroom: [false, false, false] + LHA_allowed_bedrooms: 3 + housing_benefit_LHA_allowed_bedrooms: 3 + +- name: A claimant over pension age who claims alone on the reg 60A route has no Universal Credit bedroom for not sharing + period: 2026 + input: + people: + claimant: + age: 70 + is_household_head: true + is_claimant_or_partner: true + attendance_allowance: 5_000 + cannot_reasonably_share_bedroom_due_to_disability: true + partner: + age: 17 + is_claimant_or_partner: true + working_tax_credit_reported: 1_000 + benunits: + couple: + members: [claimant, partner] + claims_uc_at_legacy_closure: true + households: + home: + members: [claimant, partner] + rent: 20_000 + tenure_type: RENT_PRIVATELY + brma: MAIDSTONE + output: + # The couple's Working Tax Credit opens the SI 2014/1230 reg 60A route + # for the claimant aged 70. The partner is under 18 with no reg 8 + # circumstance, so cannot be a joint claimant, and the claimant claims + # as a single person (UC Regs 2013 reg 3(3)(a)). The single-claim flag + # stays false because the claimant has reached the qualifying age for + # State Pension Credit; the claimant count still marks the claim. + is_uc_single_or_joint_claimant: [true, false] + is_uc_eligible: true + uc_member_of_couple_claims_as_single_person: false + is_member_of_couple_who_cannot_share_bedroom: [true, false] + # UC Sch 4 para 12(6A) needs a joint renter, and joint renters are + # joint claimants (para 1(2)). One claimant, so one bedroom (para + # 10(1)(a)) and the one-bedroom rate. + LHA_cannot_share_bedrooms: 0 + LHA_allowed_bedrooms: 1 + LHA_category: B + # HB has no single claim: reg 13D(3)(za) and (zb) of the HB (State + # Pension Credit) Regs 2006 give a bedroom each. + housing_benefit_LHA_cannot_share_bedrooms: 1 + housing_benefit_LHA_allowed_bedrooms: 2 diff --git a/policyengine_uk/tests/test_lha_bedroom_young_people_properties.py b/policyengine_uk/tests/test_lha_bedroom_young_people_properties.py index d60dd9e63b..7cca9f6d97 100644 --- a/policyengine_uk/tests/test_lha_bedroom_young_people_properties.py +++ b/policyengine_uk/tests/test_lha_bedroom_young_people_properties.py @@ -3,8 +3,9 @@ bedrooms of benefit-unit members aged 16 or over who are not the claimant or partner, the children of other families in the household, foster and adoption placements, the additional bedrooms for foster parents and -overnight care, and the housing cost contributions of in-unit -non-dependants. +overnight care, the bedrooms for children and couples who cannot share a +bedroom because of disability, and the housing cost contributions of +in-unit non-dependants. Invariants, for any generated population of households: @@ -95,7 +96,18 @@ - one additional bedroom if anyone so counted, or a child placed with the family, has overnight care, and one if the family fosters, has a child placed for adoption, or has an approved foster parent between - placements. + placements; + - children who cannot share a bedroom because of disability, among the + children so counted: the brute force forbids them any room-mate, and + the difference from the unrestricted pairing is additional (UC para + 12(6), (8); HB reg 13D(3)(ba)); + - couples one of whom cannot share: one more bedroom for the family's + own couple (UC para 12(6A), (9)(d); HB 13D(3)(za)-(zb)) and, under HB, + for each couple of a non-dependant's, boarder's or lodger's family + counted by a family liable for the rent; + - under HB, the bedrooms for people who cannot share count only so far + as the dwelling's reported bedrooms exceed the count if everyone could + share (reg 13D(3), closing words); unreported (0) means no limit. 6. In-unit non-dependants: every member of a benefit unit aged 16 or over who is neither the claimant nor partner nor a Universal Credit qualifying young person nor the household head (the householder in @@ -136,6 +148,25 @@ Their bedroom then moves between those two claims, and no other claim changes. Someone younger can be a qualifying young person, and their family's Child Benefit and child element then depend on them. +10. A child who cannot share: flagging one more child under 16 as unable to + share (with a qualifying benefit) raises any family's bedrooms by + nothing or one under each scheme, and changes only the families whose + size criteria count that child: under UC their own family unless they + are a foster child, and the claim counting the household's + non-dependants if they are a non-dependant's child and not a foster + child; under HB their own family if they are not placed with it, and + each family liable for the rent if they are a non-dependant's, + boarder's or lodger's child, placed or not. +11. The dwelling's bedrooms: with them reported, every family's Housing + Benefit bedrooms lie between the count if everyone could share and the + count with them unreported, and exceed the dwelling's bedrooms only + where the count if everyone could share already does. +12. Couples: flagging one or both members of another family's couple as + unable to share gives the couple's own claim exactly one more bedroom + under each scheme, and each family liable for the rent exactly one + more Housing Benefit bedroom (none under UC) if the couple are + occupiers it counts (a non-dependant's, boarder's or lodger's family); + no other family changes. """ import numpy as np @@ -156,9 +187,23 @@ EDUCATION = ["NOT_IN_EDUCATION", "UPPER_SECONDARY", "UPPER_SECONDARY", "TERTIARY"] KINDS = ["own", "own", "own", "foster", "adopted"] OVERNIGHT = st.sampled_from([False, False, False, True]) - -# (age, is_male, kind, has overnight care) -child = st.tuples(st.integers(0, 15), st.booleans(), st.sampled_from(KINDS), OVERNIGHT) +CANNOT_SHARE = st.sampled_from([False, False, False, True]) +# Each household's bedrooms: unreported (0) or 1 to 6, as in the FRS. Four +# entries cover the largest generated population. +DWELLING_BEDROOMS = st.lists( + st.sampled_from([0, 0, 1, 2, 3, 4, 5, 6]), min_size=4, max_size=4 +) +UNREPORTED = [0, 0, 0, 0] + +# (age, is_male, kind, has overnight care, cannot share a bedroom). Examples +# may leave out the last element, which then counts as false. +child = st.tuples( + st.integers(0, 15), + st.booleans(), + st.sampled_from(KINDS), + OVERNIGHT, + CANNOT_SHARE, +) @st.composite @@ -170,6 +215,9 @@ def family(draw, role): ), children=draw(st.lists(child, min_size=0, max_size=4)), between_placements=draw(st.sampled_from([False, False, False, True])), + # How many adults, from the first, cannot share a bedroom with a + # partner because of disability (this matters only for two adults). + couple_cannot_share=draw(st.sampled_from([0, 0, 0, 1, 2])), ) @@ -231,12 +279,16 @@ def child_scenario(draw, kinds): draw(st.booleans()), draw(st.sampled_from(kinds)), False, + False, ) return population, (h, f), added -def child_inputs(age, male, kind, overnight): +def child_inputs(age, male, kind, overnight, cannot_share=False): inputs = {"age": age, "is_male": male, "is_household_head": False} + if cannot_share: + inputs["dla_sc_middle_plus"] = True + inputs["cannot_reasonably_share_bedroom_due_to_disability"] = True if kind == "foster": inputs["is_looked_after_by_local_authority"] = True if kind == "adopted": @@ -247,11 +299,21 @@ def child_inputs(age, male, kind, overnight): return inputs -def build(population, added=None, supply_roles=True, added_child=None): +def build( + population, + added=None, + supply_roles=True, + added_child=None, + num_bedrooms=None, + flagged_child=None, +): """One situation for the population, optionally with a person aged 16 to 19 added to family ``added[0]`` = (household, family) with attributes ``added[1]``, or a child ``added_child[1]`` = (age, is_male, kind, - overnight) added to family ``added_child[0]``. + overnight, cannot share) added to family ``added_child[0]``. + ``num_bedrooms`` lists each household's bedrooms (unreported if None). + ``flagged_child`` = (household, family, index) marks that child as unable + to share a bedroom. Returns the situation and, per benefit unit, its (household, family). An added person with ``is_household_head`` heads the household in place @@ -275,7 +337,13 @@ def build(population, added=None, supply_roles=True, added_child=None): ids.append(pid) if fam["between_placements"]: people[ids[0]]["is_approved_foster_parent_without_placement"] = True + for pid in ids[: fam.get("couple_cannot_share", 0)]: + people[pid]["pip_dl"] = 5_000 + people[pid]["cannot_reasonably_share_bedroom_due_to_disability"] = True children = list(fam["children"]) + if flagged_child is not None and flagged_child[:2] == (h, f): + i = flagged_child[2] + children[i] = tuple(children[i][:4]) + (True,) if added_child is not None and added_child[0] == (h, f): children.append(added_child[1]) for i, spec in enumerate(children): @@ -308,6 +376,8 @@ def build(population, added=None, supply_roles=True, added_child=None): "tenure_type": "RENT_PRIVATELY", "brma": "MAIDSTONE", } + if num_bedrooms is not None: + homes[f"h{h}"]["num_bedrooms"] = num_bedrooms[h] situation = {"people": people, "benunits": benunits, "households": homes} return situation, keys @@ -346,9 +416,13 @@ def own_claims(sim): def fewest_rooms_for_children(children): """Brute force: the fewest rooms holding the children two to a room, - where a pair must be of the same sex or both under 10.""" + where a pair must be of the same sex or both under 10, and a child who + cannot share because of disability (a third element that is true) shares + with no one.""" def can_share(a, b): + if (len(a) > 2 and a[2]) or (len(b) > 2 and b[2]): + return False return a[1] == b[1] or (a[0] < 10 and b[0] < 10) def best(remaining): @@ -368,10 +442,31 @@ def fosters(fam): """Whether the family meets the foster parent condition (UC) or has a qualifying parent or carer (HB) through its children or adults.""" return fam["between_placements"] or any( - kind in ("foster", "adopted") for _, _, kind, _ in fam["children"] + c[2] in ("foster", "adopted") for c in fam["children"] ) +def cannot_share(c): + """Whether a generated child cannot share a bedroom.""" + return len(c) > 4 and c[4] + + +def pairable(children): + """(age, is_male) of each child, for the pairing without the condition.""" + return [c[:2] for c in children] + + +def with_flags(children): + """(age, is_male, cannot share) of each child.""" + return [(c[0], c[1], cannot_share(c)) for c in children] + + +def couple_cannot_share(fam): + """The family is a couple one of whom cannot share a bedroom with the + other (UC Sch 4 para 12(6A); HB reg 2(1)).""" + return len(fam["adults"]) == 2 and fam.get("couple_cannot_share", 0) > 0 + + def in_qualifying_education(p, age_limit_for_entry=19): """Full-time non-advanced education (any education short of tertiary), entered before 19.""" @@ -704,7 +799,7 @@ def test_a_placed_child_adds_the_carers_bedroom(case): @PROPERTY_SETTINGS -@given(scenario()) +@given(scenario(), DWELLING_BEDROOMS) # A non-dependant's foster child who requires overnight care: the renter's # Housing Benefit overnight room (reg 13D(3A)(a)(iii); reg 21(3)). @example( @@ -722,7 +817,8 @@ def test_a_placed_child_adds_the_carers_bedroom(case): ], (0, 0), dict(LOOKED_AFTER_QYP, is_looked_after_by_local_authority=False), - ) + ), + UNREPORTED, ) # A looked-after 16-year-old not in education placed with a lone renter: a # young person until the 31 August after their 16th birthday (Child Benefit @@ -734,17 +830,68 @@ def test_a_placed_child_adds_the_carers_bedroom(case): [[lone("head", 40)]], (0, 0), dict(LOOKED_AFTER_QYP, age=16, current_education="NOT_IN_EDUCATION"), - ) + ), + UNREPORTED, ) -def test_bedrooms_match_a_reference_count_of_the_size_criteria(case): +# Girls aged 12, 8 and 6, the two youngest unable to share: either could be +# alone in a two-room allocation, but not both, so the family has a third +# bedroom for them under each scheme (UC para 12(8); HB reg 13D(3)(ba)). The +# dwelling has five bedrooms, one more than the parent, the added young +# person and two rooms for the girls, so HB allows it. +@example( + ( + [ + [ + dict( + lone("head", 40), + children=[ + (12, False, "own", False, False), + (8, False, "own", False, True), + (6, False, "own", False, True), + ], + ) + ] + ], + (0, 0), + dict(LOOKED_AFTER_QYP, is_looked_after_by_local_authority=False), + ), + [5, 0, 0, 0], +) +# A non-dependant couple one of whom cannot share, in a home of three +# bedrooms: the head's HB claim counts the couple as occupiers and would give +# them a bedroom each, but the dwelling has no bedroom beyond the three the +# head's claim has if they could share (the head's, the added young person's +# and the couple's), so it allows none (reg 13D(3), closing words). The +# couple's own claim has one more bedroom under each scheme. +@example( + ( + [ + [ + lone("head", 50), + dict( + lone("non_dependant", 30), + adults=[(30, False), (29, False)], + couple_cannot_share=1, + ), + ] + ], + (0, 0), + dict(LOOKED_AFTER_QYP, is_looked_after_by_local_authority=False), + ), + [3, 0, 0, 0], +) +def test_bedrooms_match_a_reference_count_of_the_size_criteria(case, num_bedrooms): population, target, person = case - situation, keys = build(population, (target, person)) + situation, keys = build(population, (target, person), num_bedrooms=num_bedrooms) sim, uc, hb = bedrooms(situation) counted, liable = claim_roles(sim) uc_additional = np.asarray(sim.calculate("LHA_additional_bedrooms", YEAR)) hb_additional = np.asarray( sim.calculate("housing_benefit_LHA_additional_bedrooms", YEAR) ) + hb_cannot_share = np.asarray( + sim.calculate("housing_benefit_LHA_cannot_share_bedrooms", YEAR) + ) added = flags(person) own_claim = own_claims(sim) names = list(situation["people"]) @@ -772,6 +919,9 @@ def test_bedrooms_match_a_reference_count_of_the_size_criteria(case): hb_overnight = True uc_foster = fosters(fam) or (is_target and added["fostered"]) hb_carer = fosters(fam) or (is_target and added["placed"]) + # Couples who cannot share: UC only the renter's own (para 12(6A)); + # HB every occupier couple (reg 13D(3)(za)-(zb)). + uc_couples = hb_couples = int(couple_cannot_share(fam)) for g, other in enumerate(families): if g == f: continue @@ -809,20 +959,34 @@ def test_bedrooms_match_a_reference_count_of_the_size_criteria(case): c[3] for c in other["children"] ) hb_overnight |= joins and added["overnight"] - expected_uc_additional = int(uc_overnight) + int(uc_foster) + hb_couples += int(couple_cannot_share(other)) + # Children who cannot share: the fewest rooms in which none of them + # shares, beyond the rooms the children would otherwise need (UC + # para 12(6) and (8); HB reg 13D(3)(ba)). + uc_child_rooms = fewest_rooms_for_children(pairable(uc_children)) + uc_disabled_child_rooms = ( + fewest_rooms_for_children(with_flags(uc_children)) - uc_child_rooms + ) + hb_child_rooms = fewest_rooms_for_children(pairable(hb_children)) + hb_disabled_child_rooms = ( + fewest_rooms_for_children(with_flags(hb_children)) - hb_child_rooms + ) + expected_uc_additional = ( + int(uc_overnight) + int(uc_foster) + uc_disabled_child_rooms + uc_couples + ) expected_hb_additional = int(hb_overnight) + int(hb_carer) assert uc_additional[b] == expected_uc_additional assert hb_additional[b] == expected_hb_additional - assert uc[b] == ( - uc_rooms - + fewest_rooms_for_children([c[:2] for c in uc_children]) - + expected_uc_additional - ) - assert hb[b] == ( - hb_rooms - + fewest_rooms_for_children([c[:2] for c in hb_children]) - + expected_hb_additional - ) + assert uc[b] == uc_rooms + uc_child_rooms + expected_uc_additional + # HB: the bedrooms if everyone could share, plus those for people who + # cannot share, so far as the dwelling has bedrooms beyond the first + # (reg 13D(3), closing words). + able_to_share = hb_rooms + hb_child_rooms + expected_hb_additional + extra = hb_disabled_child_rooms + hb_couples + if num_bedrooms[h] > 0: + extra = min(extra, max(num_bedrooms[h] - able_to_share, 0)) + assert hb_cannot_share[b] == extra + assert hb[b] == able_to_share + extra def in_unit_non_dependants(sim): @@ -1167,3 +1331,133 @@ def test_moving_a_non_claiming_adult_out_of_the_benefit_unit_changes_no_claim(ca a = calc_in(variable)[keep] b = calc_out(variable)[:n][keep] assert np.allclose(a, b), variable + + +@st.composite +def flagged_child_scenario(draw): + """A population and one of its children under 16 to flag as unable to + share a bedroom (with a qualifying benefit).""" + population = draw(st.lists(household(), min_size=1, max_size=4)) + children = [ + (h, f, i) + for h, families in enumerate(population) + for f, fam in enumerate(families) + for i in range(len(fam["children"])) + ] + if not children: + population[0][0]["children"].append((5, True, "own", False, False)) + children = [(0, 0, len(population[0][0]["children"]) - 1)] + return population, draw(st.sampled_from(children)) + + +@PROPERTY_SETTINGS +@given(flagged_child_scenario()) +def test_a_child_who_cannot_share_adds_at_most_one_bedroom(case): + population, flagged = case + before, keys = build(population) + after, _ = build(population, flagged_child=flagged) + sim_before, uc_before, hb_before = bedrooms(before) + sim, uc_after, hb_after = bedrooms(after) + counted, liable = claim_roles(sim) + # Flagging a child changes neither who counts the non-dependants nor who + # is liable for the rent. + counted_before, liable_before = claim_roles(sim_before) + assert np.array_equal(counted, counted_before) + assert np.array_equal(liable, liable_before) + # 10. One more child who cannot share raises any family's bedrooms by + # nothing or one under each scheme, with the dwelling's bedrooms + # unreported: each such child takes a room, but the others then need at + # most one fewer. + for change in (uc_after - uc_before, hb_after - hb_before): + assert np.all((change == 0) | (change == 1)) + # Only families whose size criteria count the child change. + h, f, i = flagged + kind = population[h][f]["children"][i][2] + role = population[h][f]["role"] + for b, key in enumerate(keys): + same_household = key[0] == h + uc_counts = kind != "foster" and ( + key == (h, f) or (same_household and counted[b] and role == "non_dependant") + ) + hb_counts = (key == (h, f) and kind == "own") or ( + same_household and liable[b] and role in OCCUPIER_ROLES + ) + if not uc_counts: + assert uc_after[b] == uc_before[b] + if not hb_counts: + assert hb_after[b] == hb_before[b] + + +@PROPERTY_SETTINGS +@given(scenario(), DWELLING_BEDROOMS) +def test_housing_benefit_rooms_never_exceed_the_dwelling_beyond_the_base( + case, num_bedrooms +): + population, target, person = case + unreported, keys = build(population, (target, person)) + reported, _ = build(population, (target, person), num_bedrooms=num_bedrooms) + sim, _, hb_free = bedrooms(unreported) + able = hb_free - np.asarray( + sim.calculate("housing_benefit_LHA_cannot_share_bedrooms", YEAR) + ) + _, _, hb = bedrooms(reported) + # 11. The dwelling's bedrooms only ever withhold the bedrooms for people + # who cannot share: the HB count lies between the count if everyone + # could share and the count with the dwelling unreported, and exceeds + # the dwelling's bedrooms only where the count if everyone could share + # already does. + beds = np.array([num_bedrooms[h] for h, _ in keys]) + assert np.all(able <= hb) and np.all(hb <= hb_free) + reported_beds = beds > 0 + assert np.all(hb[reported_beds] <= np.maximum(able, beds)[reported_beds]) + + +@st.composite +def couple_scenario(draw): + """A population with a couple from another family (a sharer's, + boarder's, lodger's or non-dependant's) in one household, and how many + of the couple's members to flag as unable to share a bedroom.""" + population = draw(st.lists(household(), min_size=1, max_size=3)) + h = draw(st.integers(0, len(population) - 1)) + couple = draw(st.sampled_from(ROLES).flatmap(family)) + couple["adults"] = draw( + st.lists(st.tuples(st.integers(20, 85), OVERNIGHT), min_size=2, max_size=2) + ) + couple["couple_cannot_share"] = 0 + population[h] = population[h] + [couple] + return population, (h, len(population[h]) - 1), draw(st.sampled_from([1, 2])) + + +@PROPERTY_SETTINGS +@given(couple_scenario()) +def test_a_couple_who_cannot_share_adds_one_bedroom_however_many_qualify(case): + population, (h, f), members = case + before, keys = build(population) + population[h][f]["couple_cannot_share"] = members + after, _ = build(population) + sim_before, uc_before, hb_before = bedrooms(before) + sim, uc_after, hb_after = bedrooms(after) + counted, liable = claim_roles(sim) + # Flagging the couple changes neither who counts the non-dependants nor + # who is liable for the rent. + counted_before, liable_before = claim_roles(sim_before) + assert np.array_equal(counted, counted_before) + assert np.array_equal(liable, liable_before) + # 12. Flagging one or both members of a couple from another family, with + # a qualifying benefit, gives the couple's own claim one more bedroom + # under each scheme (UC para 12(6A), (9)(d); HB reg 13D(3)(za)-(zb)), + # and each family liable for the rent one more HB bedroom if the couple + # are occupiers it counts (a non-dependant's, boarder's or lodger's + # family, 13D(12)), but no more UC bedroom (the disabled person + # condition is the renter's own). No other family changes. The + # dwelling's bedrooms are unreported. + role = population[h][f]["role"] + expected_uc = np.zeros(len(keys)) + expected_hb = np.zeros(len(keys)) + own = keys.index((h, f)) + expected_uc[own] = expected_hb[own] = 1 + if role in OCCUPIER_ROLES: + same_household = np.array([k[0] == h for k in keys]) + expected_hb[same_household & liable] += 1 + assert np.array_equal(uc_after - uc_before, expected_uc) + assert np.array_equal(hb_after - hb_before, expected_hb) diff --git a/policyengine_uk/variables/gov/dwp/LHA_additional_bedrooms.py b/policyengine_uk/variables/gov/dwp/LHA_additional_bedrooms.py index 7adfe4cc1d..5c695882b0 100644 --- a/policyengine_uk/variables/gov/dwp/LHA_additional_bedrooms.py +++ b/policyengine_uk/variables/gov/dwp/LHA_additional_bedrooms.py @@ -20,9 +20,8 @@ class LHA_additional_bedrooms(Variable): "uc_non_dependants_counted), as the size criteria count them (see " "other_family_non_dependants in LHA_allowed_bedrooms). " "Before 1 April 2017 only the renter could meet the overnight care " - "condition. " - "The disabled child and disabled person conditions, for children or " - "couples who cannot share a bedroom, are not modelled." + "condition. Plus the bedrooms for children and couples who cannot " + "share a bedroom because of disability (see LHA_cannot_share_bedrooms)." ) definition_period = YEAR reference = ( @@ -63,4 +62,7 @@ def formula(benunit, period, parameters): # Para 12(9)(a)-(b): one bedroom for each condition met. overnight_room = benunit.any(own) | (others > 0) foster_room = benunit("lha_renter_meets_foster_parent_condition", period) - return 1.0 * overnight_room + 1.0 * foster_room + # Para 12(8) and (9)(c)-(d): the disabled child and disabled person + # conditions. + cannot_share = benunit("LHA_cannot_share_bedrooms", period) + return 1.0 * overnight_room + 1.0 * foster_room + cannot_share diff --git a/policyengine_uk/variables/gov/dwp/LHA_allowed_bedrooms.py b/policyengine_uk/variables/gov/dwp/LHA_allowed_bedrooms.py index e0cd535c2f..8b9250991b 100644 --- a/policyengine_uk/variables/gov/dwp/LHA_allowed_bedrooms.py +++ b/policyengine_uk/variables/gov/dwp/LHA_allowed_bedrooms.py @@ -22,7 +22,12 @@ def child_bedrooms(boys_under_10, boys_10_to_15, girls_under_10, girls_10_to_15) def bedrooms_for_children( - benunit, period, own_child=None, other_child=None, counts_other_children=None + benunit, + period, + own_child=None, + other_child=None, + counts_other_children=None, + cannot_share=None, ): """Bedrooms for the children under 16 in the family's size criteria. @@ -33,6 +38,11 @@ def bedrooms_for_children( family's own children. ``counts_other_children`` marks the families that count them (by default, every family). The children are allotted to the fewest bedrooms with child_bedrooms. + + ``cannot_share`` marks children who have a bedroom of their own because + of disability. Each counted child so marked has their own room and the + other children are paired as usual: the fewest rooms in which no marked + child shares. """ person = benunit.members age = person("age", period) @@ -42,6 +52,8 @@ def bedrooms_for_children( if own_child is None: own_child = under_16 own_child = own_child & under_16 + if cannot_share is None: + cannot_share = np.zeros_like(under_16) def count(group): own = benunit.sum(own_child & group) @@ -52,11 +64,12 @@ def count(group): return own + others return own + where(counts_other_children, others, 0) - return child_bedrooms( - count(under_10 & male), - count(~under_10 & under_16 & male), - count(under_10 & ~male), - count(~under_10 & under_16 & ~male), + sharing = ~cannot_share + return count(cannot_share) + child_bedrooms( + count(sharing & under_10 & male), + count(sharing & ~under_10 & under_16 & male), + count(sharing & under_10 & ~male), + count(sharing & ~under_10 & under_16 & ~male), ) @@ -114,6 +127,27 @@ def other_family_non_dependants(benunit, period): return (other_family & ~no_one_responsible) | passed_on +def universal_credit_child_bedrooms(benunit, period, cannot_share=None): + """The children's bedrooms in the Universal Credit size criteria (UC Regs + 2013 Sch 4 para 10(1)(d)-(f) and (2)): the children the renter is + responsible for (regs 4 and 4A) and, in the claim that counts the + household's non-dependants (uc_non_dependants_counted), the + non-dependants' children (see other_family_non_dependants), allotted to + the fewest bedrooms. ``cannot_share`` marks children who have a bedroom of + their own (see bedrooms_for_children).""" + person = benunit.members + return bedrooms_for_children( + benunit, + period, + own_child=person( + "is_child_or_qualifying_young_person_for_universal_credit", period + ), + other_child=other_family_non_dependants(benunit, period), + counts_other_children=benunit("uc_non_dependants_counted", period), + cannot_share=cannot_share, + ) + + class LHA_allowed_bedrooms(Variable): value_type = float entity = BenUnit @@ -130,7 +164,9 @@ class LHA_allowed_bedrooms(Variable): "family that makes no Universal Credit claim of its own (in the claim " "that counts the household's non-dependants, which also bears their " "contribution), the children's bedrooms, and the additional bedrooms " - "for overnight care and foster parents (see LHA_additional_bedrooms). " + "for overnight care, foster parents, and children and couples who " + "cannot share a bedroom because of disability (see " + "LHA_additional_bedrooms). " "The formula treats the household head as liable for the rent, so a " "head who does not claim is not a non-dependant (para 9(2)(d)); a " "head who is a qualifying young person the renter is responsible for " @@ -230,13 +266,7 @@ def formula(benunit, period, parameters): # renter's own and their non-dependants', allotted to the fewest # bedrooms (para 10(2)). A foster child under 16 is in no one's # extended benefit unit (paras 9(1)(b), 9(2)(c) and (g); reg 4(6)(a)). - children = bedrooms_for_children( - benunit, - period, - own_child=responsible, - other_child=non_dependant, - counts_other_children=counted, - ) + children = universal_credit_child_bedrooms(benunit, period) # Para 10(3)(b) and para 12: additional bedrooms. additional = benunit("LHA_additional_bedrooms", period) return 1 + family_rooms + non_dependants + children + additional diff --git a/policyengine_uk/variables/gov/dwp/LHA_cannot_share_bedrooms.py b/policyengine_uk/variables/gov/dwp/LHA_cannot_share_bedrooms.py new file mode 100644 index 0000000000..a08f4ddde9 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/LHA_cannot_share_bedrooms.py @@ -0,0 +1,88 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dwp.LHA_allowed_bedrooms import ( + universal_credit_child_bedrooms, +) + + +class LHA_cannot_share_bedrooms(Variable): + value_type = float + entity = BenUnit + label = "Universal Credit bedrooms for children and couples who cannot share" + documentation = ( + "Additional bedrooms in the Universal Credit size criteria under the " + "disabled child and disabled person conditions. Disabled child " + "condition: each child in the renter's extended benefit unit who " + "cannot share a bedroom because of disability (see " + "is_child_who_cannot_share_bedroom) has a bedroom of their own and " + "the other children share as usual; the additional bedrooms are as " + "many as that takes beyond the rooms the children would otherwise " + "need, so none where such a child would not otherwise share. Where " + "several such children could each have a room alone but not all at " + "once, the model gives them all their own rooms. That is its reading " + "of para 12(8) ('each such child has their own bedroom'), as of HB " + "reg 13D(3)(ba); the DWP guidance's examples do not settle the case. " + "Disabled person " + "condition: one bedroom if the renter or a joint renter cannot share " + "a bedroom with the other because of disability (see " + "is_member_of_couple_who_cannot_share_bedroom). The condition needs " + "a joint renter to share with (para 12(6A)), and joint renters are " + "joint claimants (para 1(2)). So the bedroom needs two Universal " + "Credit claimants (is_uc_single_or_joint_claimant) and no single " + "claim (uc_member_of_couple_claims_as_single_person, which can also " + "be supplied). A member of a couple who claims as a single person " + "(UC Regs 2013 reg 3(3)) has no joint claimant, so no joint renter, " + "and gets no such bedroom. That includes a claimant over the " + "qualifying age for State Pension Credit on the SI 2014/1230 reg 60A " + "route, whom the single-claim flag does not mark. Housing Benefit " + "has no such claim and still gives " + "the couple a bedroom each (see " + "housing_benefit_LHA_cannot_share_bedrooms). Unlike Housing " + "Benefit, Universal Credit does not require the home to have the " + "extra bedroom." + ) + definition_period = YEAR + reference = ( + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12", + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/10", + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/1", + "https://www.legislation.gov.uk/uksi/2013/376/regulation/3", + ) + + def formula(benunit, period, parameters): + person = benunit.members + # UC Regs 2013 Sch 4 para 12(6) and (8): as many additional bedrooms + # as are necessary for each child in the extended benefit unit who + # would otherwise be expected to share, and is not reasonably able + # to, to have their own bedroom. The children are those the size + # criteria count (universal_credit_child_bedrooms). + cannot_share = person("is_child_who_cannot_share_bedroom", period) + disabled_child_rooms = universal_credit_child_bedrooms( + benunit, period, cannot_share + ) - universal_credit_child_bedrooms(benunit, period) + # Para 12(6A) and (9)(d): one additional bedroom if the renter or a + # joint renter satisfies the disabled person condition. The renter + # must otherwise be expected to share a bedroom "with a joint + # renter", and para 1(2) defines joint renters as joint claimants + # to whom reg 26(2) applies. A member of a couple who claims as a + # single person (reg 3(3)) has no joint claimant, so no joint renter + # and no such bedroom. Two tests mark that claim. The claimant count + # covers every single claim the model derives, including a claimant + # over the State Pension Credit age on the SI 2014/1230 reg 60A + # route, whom uc_member_of_couple_claims_as_single_person leaves + # false. The flag covers a single claim supplied as an input. The + # mask is applied here rather than in + # is_member_of_couple_who_cannot_share_bedroom, which Housing + # Benefit also reads: Housing Benefit has no single claim. + couple_member_cannot_share = benunit.any( + person("is_member_of_couple_who_cannot_share_bedroom", period) + ) + claims_as_single_person = benunit( + "uc_member_of_couple_claims_as_single_person", period + ) + joint_claimants = ( + benunit.sum(person("is_uc_single_or_joint_claimant", period)) == 2 + ) + disabled_person_room = ( + couple_member_cannot_share & ~claims_as_single_person & joint_claimants + ) + return disabled_child_rooms + 1.0 * disabled_person_room diff --git a/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_additional_bedrooms.py b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_additional_bedrooms.py index 6d0b7bce5e..8a9f91d479 100644 --- a/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_additional_bedrooms.py +++ b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_additional_bedrooms.py @@ -21,7 +21,9 @@ class housing_benefit_LHA_additional_bedrooms(Variable): "the dwelling for " "the carer or the foster child; the model does not observe the " "dwelling's bedrooms and assumes there is one. Children and couples " - "who cannot share a bedroom because of disability are not modelled." + "who cannot share a bedroom because of disability have their own " + "bedrooms in the main size criteria (see " + "housing_benefit_LHA_cannot_share_bedrooms)." ) definition_period = YEAR reference = ( diff --git a/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_allowed_bedrooms.py b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_allowed_bedrooms.py index baa3b8e976..5d62816cf3 100644 --- a/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_allowed_bedrooms.py +++ b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_allowed_bedrooms.py @@ -4,6 +4,92 @@ ) +def housing_benefit_occupiers_total(benunit, period): + """A function that totals a person-level quantity over the occupiers in + the claim's Housing Benefit size criteria (HB Regs 2006 reg 13D(3), with + "occupiers" as defined in 13D(12)): the family's own members and, for a + family liable for the household's rent (the household head's or a + sharer's), the members of the household's families not liable for it + (non-dependants and people paying the householder), with their + children.""" + person = benunit.members + liable_family = person.benunit.any(person("is_liable_for_household_rent", period)) + # Members of families not liable for the household's rent: + # non-dependants and people paying the householder. + other = ~liable_family + is_liable_claim = benunit.any(person("is_liable_for_household_rent", period)) + # HB Regs 2006 reg 21(3): a child or young person placed with the + # claimant or partner as a foster child or for adoption does not occupy + # the claimant's dwelling. Every limb names a placement "with the + # claimant or his partner", so a child placed with a non-dependant, + # boarder or lodger is one of the persons who occupy the claimant's + # dwelling as their home (13D(12)) and counts in the claimant's size + # criteria, while the carer's own claim leaves them out. + placed = person("is_child_or_young_person_placed_with_family", period) + + def occupiers_total(values): + own = benunit.sum(values & ~placed) + others = benunit.max(person.household.sum(values & other)) + return own + where(is_liable_claim, others, 0) + + return occupiers_total + + +def housing_benefit_child_bedrooms(benunit, period, cannot_share=None): + """The bedrooms for the occupiers' children under 16 in the Housing + Benefit size criteria (HB Regs 2006 reg 13D(3)(c)-(e)): the claimant's own + and other families', pairing children across all the occupiers. + ``cannot_share`` marks children who cannot share a bedroom; each counted + child so marked has a room of their own (13D(3)(ba)) and the others are + paired as usual.""" + person = benunit.members + occupiers_total = housing_benefit_occupiers_total(benunit, period) + age = person("age", period) + under_16 = age < 16 + male = person("is_male", period) + under_10 = age < 10 + if cannot_share is None: + cannot_share = np.zeros_like(under_16) + sharing = ~cannot_share + return occupiers_total(cannot_share & under_16) + child_bedrooms( + occupiers_total(sharing & under_10 & male), + occupiers_total(sharing & ~under_10 & under_16 & male), + occupiers_total(sharing & under_10 & ~male), + occupiers_total(sharing & ~under_10 & under_16 & ~male), + ) + + +def housing_benefit_bedrooms_if_able_to_share(benunit, period): + """The bedrooms in the Housing Benefit size criteria if every occupier + could share: housing_benefit_LHA_allowed_bedrooms without the bedrooms + for children and couples who cannot share a bedroom + (housing_benefit_LHA_cannot_share_bedrooms), but with the additional + bedrooms of 13D(3A) and (3B).""" + # HB Regs 2006 reg 13D(3) with "occupiers" as defined in 13D(12). + person = benunit.members + age = person("age", period) + claimant_or_partner = person("is_claimant_or_partner", period) + occupiers_total = housing_benefit_occupiers_total(benunit, period) + # 13D(3)(zb), (a): one bedroom for each couple or single claimant. A + # family counts as a couple only where both members are present and it + # is a couple (is_couple), so the halves always pair. + couple = (person.benunit.sum(claimant_or_partner) == 2) & person.benunit( + "is_couple", period + ) + adult_units = ( + occupiers_total(claimant_or_partner) + - occupiers_total(claimant_or_partner & couple) / 2 + ) + # 13D(3)(b): any other person who is not a child. + other_adults = occupiers_total((age >= 16) & ~claimant_or_partner) + # 13D(3)(c)-(e): the occupiers' children, the claimant's own and other + # families', share rooms with each other. + rooms_for_children = housing_benefit_child_bedrooms(benunit, period) + # 13D(3A) and (3B): additional bedrooms. + additional = benunit("housing_benefit_LHA_additional_bedrooms", period) + return max_(adult_units, 1) + other_adults + rooms_for_children + additional + + class housing_benefit_LHA_allowed_bedrooms(Variable): value_type = float entity = BenUnit @@ -26,7 +112,9 @@ class housing_benefit_LHA_allowed_bedrooms(Variable): "dwelling, so the claimant's own claim leaves them out; a child " "placed with a non-dependant, boarder or lodger occupies the " "claimant's dwelling and counts in the claimant's size criteria. " - "Couples and children who cannot share a bedroom are not modelled." + "Children and couples who cannot share a bedroom because of " + "disability have bedrooms of their own, so far as the dwelling has " + "them (see housing_benefit_LHA_cannot_share_bedrooms)." ) definition_period = YEAR reference = ( @@ -39,55 +127,8 @@ class housing_benefit_LHA_allowed_bedrooms(Variable): ) def formula(benunit, period, parameters): - # HB Regs 2006 reg 13D(3) with "occupiers" as defined in 13D(12). - person = benunit.members - age = person("age", period) - claimant_or_partner = person("is_claimant_or_partner", period) - liable_family = person.benunit.any( - person("is_liable_for_household_rent", period) - ) - # Members of families not liable for the household's rent: - # non-dependants and people paying the householder. - other = ~liable_family - is_liable_claim = benunit.any(person("is_liable_for_household_rent", period)) - # HB Regs 2006 reg 21(3): a child or young person placed with the - # claimant or partner as a foster child or for adoption does not - # occupy the claimant's dwelling. Every limb names a placement "with - # the claimant or his partner", so a child placed with a - # non-dependant, boarder or lodger is one of the persons who occupy - # the claimant's dwelling as their home (13D(12)) and counts in the - # claimant's size criteria, while the carer's own claim leaves them - # out. - placed = person("is_child_or_young_person_placed_with_family", period) - - def occupiers_total(values): - own = benunit.sum(values & ~placed) - others = benunit.max(person.household.sum(values & other)) - return own + where(is_liable_claim, others, 0) - - # 13D(3)(zb), (a): one bedroom for each couple or single claimant. A - # family counts as a couple only where both members are present and - # it is a couple (is_couple), so the halves always pair. - couple = (person.benunit.sum(claimant_or_partner) == 2) & person.benunit( - "is_couple", period - ) - adult_units = ( - occupiers_total(claimant_or_partner) - - occupiers_total(claimant_or_partner & couple) / 2 - ) - # 13D(3)(b): any other person who is not a child. - other_adults = occupiers_total((age >= 16) & ~claimant_or_partner) - # 13D(3)(c)-(e): the occupiers' children, the claimant's own and - # other families', share rooms with each other. - under_16 = age < 16 - male = person("is_male", period) - under_10 = age < 10 - rooms_for_children = child_bedrooms( - occupiers_total(under_10 & male), - occupiers_total(~under_10 & under_16 & male), - occupiers_total(under_10 & ~male), - occupiers_total(~under_10 & under_16 & ~male), - ) - # 13D(3A) and (3B): additional bedrooms. - additional = benunit("housing_benefit_LHA_additional_bedrooms", period) - return max_(adult_units, 1) + other_adults + rooms_for_children + additional + able_to_share = housing_benefit_bedrooms_if_able_to_share(benunit, period) + # 13D(3)(za), (zb) and (ba): children and couples who cannot share a + # bedroom because of disability. + cannot_share = benunit("housing_benefit_LHA_cannot_share_bedrooms", period) + return able_to_share + cannot_share diff --git a/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_cannot_share_bedrooms.py b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_cannot_share_bedrooms.py new file mode 100644 index 0000000000..6209536344 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/housing_benefit_LHA_cannot_share_bedrooms.py @@ -0,0 +1,70 @@ +from policyengine_uk.model_api import * +from policyengine_uk.variables.gov.dwp.housing_benefit_LHA_allowed_bedrooms import ( + housing_benefit_bedrooms_if_able_to_share, + housing_benefit_child_bedrooms, + housing_benefit_occupiers_total, +) + + +class housing_benefit_LHA_cannot_share_bedrooms(Variable): + value_type = float + entity = BenUnit + label = "Housing Benefit bedrooms for children and couples who cannot share" + documentation = ( + "Bedrooms in the Housing Benefit size criteria beyond those the " + "claimant would have if every occupier could share. Each occupier " + "child who cannot share a bedroom because of disability (see " + "is_child_who_cannot_share_bedroom) has a room of their own and the " + "other children share as usual, so there is no extra room where such " + "a child would not otherwise share. A couple of occupiers, the " + "claimant's own or another family's, has a bedroom each instead of " + "one between them if either member cannot share with the other (see " + "is_member_of_couple_who_cannot_share_bedroom). These bedrooms count " + "only so far as the dwelling has bedrooms beyond the claimant's " + "entitlement if everyone could share, including the additional " + "bedrooms for overnight care and qualifying parents or carers. The " + "dwelling's bedrooms are read from num_bedrooms; where that is 0, " + "meaning not reported (the Family Resources Survey records at least " + "one bedroom for every household, and the released enhanced FRS does " + "not carry it), the model assumes the dwelling has the bedrooms." + ) + definition_period = YEAR + reference = ( + "https://www.legislation.gov.uk/uksi/2006/213/regulation/13D", + "https://www.legislation.gov.uk/uksi/2006/214/regulation/13D", + "https://www.legislation.gov.uk/uksi/2006/213/regulation/2", + "https://www.legislation.gov.uk/uksi/2006/214/regulation/2", + "https://www.legislation.gov.uk/uksi/2017/213/made", + ) + + def formula(benunit, period, parameters): + person = benunit.members + occupiers_total = housing_benefit_occupiers_total(benunit, period) + # HB Regs 2006 reg 13D(3)(ba): a child who cannot share a bedroom is + # a category of their own, ahead of the pairs in (c) and (d). + cannot_share = person("is_child_who_cannot_share_bedroom", period) + child_rooms = housing_benefit_child_bedrooms( + benunit, period, cannot_share + ) - housing_benefit_child_bedrooms(benunit, period) + # Reg 13D(3)(za) and (zb), ahead of (a): each member of a couple one + # of whom cannot share has their own bedroom, so the couple has two + # rather than one. This holds for every couple of occupiers, the + # claimant's own and those of the other families the claim counts + # (see housing_benefit_occupiers_total): one further bedroom per + # couple, however many of its members qualify. As in the (a) bedroom, + # a family counts as a couple only where both members are present. + claimant_or_partner = person("is_claimant_or_partner", period) + couple = (person.benunit.sum(claimant_or_partner) == 2) & person.benunit( + "is_couple", period + ) + member = person("is_member_of_couple_who_cannot_share_bedroom", period) + qualifying_couple = couple & person.benunit.any(member) + couple_rooms = occupiers_total(claimant_or_partner & qualifying_couple) / 2 + extra = child_rooms + couple_rooms + # Reg 13D(3), closing words: only if the dwelling has a bedroom + # additional to those to which the claimant would be entitled if the + # child or the member of the couple were able to share. + able_to_share = housing_benefit_bedrooms_if_able_to_share(benunit, period) + bedrooms = benunit.max(person.household("num_bedrooms", period)) + spare = max_(bedrooms - able_to_share, 0) + return where(bedrooms > 0, min_(extra, spare), extra) diff --git a/policyengine_uk/variables/gov/dwp/is_child_who_cannot_share_bedroom.py b/policyengine_uk/variables/gov/dwp/is_child_who_cannot_share_bedroom.py new file mode 100644 index 0000000000..8eb3bd3027 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/is_child_who_cannot_share_bedroom.py @@ -0,0 +1,42 @@ +from policyengine_uk.model_api import * + + +class is_child_who_cannot_share_bedroom(Variable): + value_type = bool + entity = Person + label = "Child who cannot share a bedroom (LHA size criteria)" + documentation = ( + "A child under 16 who receives the care component of Disability " + "Living Allowance at the middle or highest rate and is not reasonably " + "able to share a bedroom with another child because of their " + "disability (cannot_reasonably_share_bedroom_due_to_disability). " + "This is the child in the Universal Credit disabled child condition " + "and the Housing Benefit 'child who cannot share a bedroom', in force " + "from 4 December 2013. The law also accepts the care component of " + "child disability payment (Scotland), which the model counts only " + "where the data record it as Disability Living Allowance. Whether " + "the child would otherwise be expected to share is decided in the " + "size criteria (see LHA_cannot_share_bedrooms and " + "housing_benefit_LHA_cannot_share_bedrooms)." + ) + definition_period = YEAR + reference = ( + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12", + "https://www.legislation.gov.uk/uksi/2006/213/regulation/2", + "https://www.legislation.gov.uk/uksi/2006/214/regulation/2", + "https://www.legislation.gov.uk/uksi/2013/2828/made", + ) + + def formula(person, period, parameters): + p = parameters(period).gov.dwp.LHA.cannot_share_bedroom.child + # UC Regs 2013 reg 2 and HB Regs 2006 reg 2(1): a child is a person + # under 16. + child = person("age", period) < 16 + # UC Sch 4 para 12(6)(a); HB reg 2(1), "child who cannot share a + # bedroom", (a). + qualifying_benefit = add(person, period, p.benefits) > 0 + # Para 12(6)(b); reg 2(1), (b). + cannot_share = person( + "cannot_reasonably_share_bedroom_due_to_disability", period + ) + return p.in_effect & child & qualifying_benefit & cannot_share diff --git a/policyengine_uk/variables/gov/dwp/is_member_of_couple_who_cannot_share_bedroom.py b/policyengine_uk/variables/gov/dwp/is_member_of_couple_who_cannot_share_bedroom.py new file mode 100644 index 0000000000..37a56d2e89 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/is_member_of_couple_who_cannot_share_bedroom.py @@ -0,0 +1,46 @@ +from policyengine_uk.model_api import * + + +class is_member_of_couple_who_cannot_share_bedroom(Variable): + value_type = bool + entity = Person + label = "Member of a couple who cannot share a bedroom (LHA size criteria)" + documentation = ( + "The claimant or partner of a couple who receives a qualifying " + "disability benefit (attendance allowance or armed forces " + "independence payment, the care component of Disability Living " + "Allowance at the middle or highest rate, or the daily living " + "component of Personal Independence Payment) and is not reasonably " + "able to share a bedroom with the other member of the couple because " + "of their disability (cannot_reasonably_share_bedroom_due_to_" + "disability). This is the renter in the Universal Credit disabled " + "person condition and the Housing Benefit 'member of a couple who " + "cannot share a bedroom', in force from 1 April 2017. Attendance " + "allowance counted only at the higher rate until 27 January 2025. " + "The law also lists the Scottish devolved equivalents, which the " + "model counts only where the data record them as the DWP benefits." + ) + definition_period = YEAR + reference = ( + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12", + "https://www.legislation.gov.uk/uksi/2006/213/regulation/2", + "https://www.legislation.gov.uk/uksi/2006/214/regulation/2", + "https://www.legislation.gov.uk/uksi/2017/213/made", + "https://www.legislation.gov.uk/uksi/2025/3/made", + ) + + def formula(person, period, parameters): + p = parameters(period).gov.dwp.LHA.cannot_share_bedroom.couple_member + # UC Sch 4 para 12(6A): the renter and a joint renter; HB Regs 2006 + # reg 2(1): a member of a couple. + couple_member = person("is_claimant_or_partner", period) & person.benunit( + "is_couple", period + ) + # Para 12(6A)(a); reg 2(1), "member of a couple who cannot share a + # bedroom", (a). + qualifying_benefit = add(person, period, p.benefits) > 0 + # Para 12(6A)(b); reg 2(1), (b). + cannot_share = person( + "cannot_reasonably_share_bedroom_due_to_disability", period + ) + return p.in_effect & couple_member & qualifying_benefit & cannot_share diff --git a/policyengine_uk/variables/gov/dwp/receives_higher_rate_attendance_allowance.py b/policyengine_uk/variables/gov/dwp/receives_higher_rate_attendance_allowance.py new file mode 100644 index 0000000000..2654ca1ffb --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/receives_higher_rate_attendance_allowance.py @@ -0,0 +1,13 @@ +from policyengine_uk.model_api import * + + +class receives_higher_rate_attendance_allowance(Variable): + label = "Receives attendance allowance at the higher rate" + entity = Person + definition_period = YEAR + value_type = bool + reference = "https://www.legislation.gov.uk/ukpga/1992/4/section/65" + + def formula(person, period, parameters): + category = person("aa_category", period) + return category == category.possible_values.HIGHER diff --git a/policyengine_uk/variables/household/demographic/cannot_reasonably_share_bedroom_due_to_disability.py b/policyengine_uk/variables/household/demographic/cannot_reasonably_share_bedroom_due_to_disability.py new file mode 100644 index 0000000000..0f336105d4 --- /dev/null +++ b/policyengine_uk/variables/household/demographic/cannot_reasonably_share_bedroom_due_to_disability.py @@ -0,0 +1,25 @@ +from policyengine_uk.model_api import * + + +class cannot_reasonably_share_bedroom_due_to_disability(Variable): + value_type = bool + entity = Person + label = "not reasonably able to share a bedroom because of disability" + documentation = ( + "Whether the decision maker (Universal Credit) or the local authority " + "(Housing Benefit) is satisfied that, because of their disability, " + "this person is not reasonably able to share a bedroom: for a child " + "under 16, with another child; for a member of a couple, with the " + "other member of the couple. With a qualifying disability benefit, " + "this gives the child or the couple a bedroom of their own in the LHA " + "size criteria (see is_child_who_cannot_share_bedroom and " + "is_member_of_couple_who_cannot_share_bedroom). The survey data do " + "not record this judgement, so it is false unless supplied." + ) + definition_period = YEAR + default_value = False + reference = ( + "https://www.legislation.gov.uk/uksi/2013/376/schedule/4/paragraph/12", + "https://www.legislation.gov.uk/uksi/2006/213/regulation/2", + "https://www.legislation.gov.uk/uksi/2006/214/regulation/2", + ) diff --git a/policyengine_uk/variables/household/demographic/num_bedrooms.py b/policyengine_uk/variables/household/demographic/num_bedrooms.py index d30aff8b2a..3a1f95d512 100644 --- a/policyengine_uk/variables/household/demographic/num_bedrooms.py +++ b/policyengine_uk/variables/household/demographic/num_bedrooms.py @@ -6,4 +6,9 @@ class num_bedrooms(Variable): value_type = int entity = Household label = "The number of bedrooms in the house" + documentation = ( + "The number of bedrooms in the dwelling (Family Resources Survey " + "BEDROOM6, which is at least 1 and top-coded at 6). 0, the default, " + "means not reported." + ) definition_period = YEAR