diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..8801d26a9 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + changed: + - Refactor the Pension Credit parameter, variable and test files. diff --git a/docs/summary/VARIABLE_STATS.md b/docs/summary/VARIABLE_STATS.md index 1b1b5f7bb..f2b1ba662 100644 --- a/docs/summary/VARIABLE_STATS.md +++ b/docs/summary/VARIABLE_STATS.md @@ -3886,7 +3886,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 10,001,110.31248188 -- guarantee_credit: +- pension_credit_guarantee_credit: - Type: float - Entity: benunit - Description: Guarantee Credit @@ -3896,7 +3896,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 10,001,110.31248188 -- minimum_guarantee: +- pension_credit_minimum_guarantee: - Type: float - Entity: benunit - Description: Minimum Guarantee @@ -3906,7 +3906,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 36,955,812.870046616 -- standard_minimum_guarantee: +- pension_credit_standard_minimum_guarantee: - Type: float - Entity: benunit - Description: Standard Minimum Guarantee @@ -3916,7 +3916,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 36,955,812.870046616 -- severe_disability_minimum_guarantee_addition: +- pension_credit_severe_disability_minimum_guarantee_addition: - Type: float - Entity: benunit - Description: Severe disability-related increase @@ -3926,7 +3926,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 2,765,413.3859882355 -- additional_minimum_guarantee: +- pension_credit_additional_minimum_guarantee: - Type: float - Entity: benunit - Description: Additional Minimum Guarantee @@ -3936,7 +3936,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 10,863,037.356937408 -- child_minimum_guarantee_addition: +- pension_credit_child_minimum_guarantee_addition: - Type: float - Entity: benunit - Description: Child-related addition @@ -3946,7 +3946,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur - Non-zero count: 7,626,600.520817518 -- carer_minimum_guarantee_addition: +- pension_credit_carer_minimum_guarantee_addition: - Type: float - Entity: benunit - Description: Carer-related increase diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/additions.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/additions.yaml index a55a767f4..6c9469208 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/additions.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/additions.yaml @@ -1,11 +1,12 @@ -description: Additional elements available in Pension Credit. +description: The following additional elements are provided under the Pension Credit. metadata: economy: false + period: year propagate_metadata_to_children: true - reference: none unit: currency-GBP + label: Pension Credit guarantee credit additions values: 2002-01-01: - - severe_disability_minimum_guarantee_addition - - carer_minimum_guarantee_addition - - child_minimum_guarantee_addition + - pension_credit_severe_disability_minimum_guarantee_addition + - pension_credit_carer_minimum_guarantee_addition + - pension_credit_child_minimum_guarantee_addition diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/addition.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/amount.yaml similarity index 53% rename from policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/addition.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/amount.yaml index c18f301d7..31db4aee9 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/addition.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/amount.yaml @@ -4,12 +4,13 @@ values: 2020-04-01: 37.50 2021-04-01: 37.70 2022-04-01: 38.85 + 2023-04-01: 42.75 + 2024-04-01: 45.6 metadata: unit: currency-GBP period: week - name: pc_carer_addition - label: Pension Credit carer addition + label: Pension Credit carer addition amount uprating: gov.benefit_uprating_cpi reference: - - title: The Social Security Benefits Up-rating Order 2022 - href: https://www.legislation.gov.uk/uksi/2022/292/article/30/made#article-30-2-c \ No newline at end of file + - title: The State Pension Credit Regulations 2002 Part II reg. 6 (8) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=22 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/addition.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/amount.yaml similarity index 70% rename from policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/addition.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/amount.yaml index c5ac7fac5..835676399 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/addition.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/amount.yaml @@ -2,16 +2,18 @@ description: Addition to the Minimum Guarantee for each child. metadata: economy: false label: Pension Credit child addition - name: pc_child_addition period: week propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA/paragraph/9/2019-02-01 - title: The State Pension Credit Regulations 2002 + - title: The State Pension Credit Regulations 2002 + href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA/paragraph/9/2019-02-01 unit: currency-GBP uprating: gov.benefit_uprating_cpi + values: 2019-02-01: 53.34 2020-04-01: 54.32 2021-04-01: 54.6 2022-04-01: 56.35 + 2023-04-01: 61.88 + 2024-04-01: 66.29 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/addition.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/amount.yaml similarity index 60% rename from policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/addition.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/amount.yaml index ce818aa30..8078112c8 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/addition.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/amount.yaml @@ -1,18 +1,19 @@ -description: Addition to the Minimum Guarantee for each disabled child (above the - child addition). +description: Addition to the Minimum Guarantee for each disabled child (above the child addition). metadata: economy: false label: Pension Credit disabled child addition - name: pc_dis_child_addition period: week propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA/paragraph/9/2019-02-01 - title: The State Pension Credit Regulations 2002 + - title: The State Pension Credit Regulations 2002 SCHEDULE IIA sec. 9 (b)(i) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=82 unit: currency-GBP uprating: gov.benefit_uprating_cpi + values: 2019-01-01: 29.02 2020-04-01: 29.52 2021-04-01: 29.66 2022-04-01: 30.58 + 2023-04-01: 33.67 + 2024-04-01: 35.93 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/eligibility.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/eligibility.yaml index 0332b90b8..d7a993597 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/eligibility.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/eligibility.yaml @@ -1,11 +1,14 @@ description: Benefits which confer standard disability in children for Pension Credit. metadata: economy: false + period: year propagate_metadata_to_children: true + label: Pension Credit guaranteed credit child disability eligibility sources reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA - title: The State Pension Credit Regulations 2002 sch. 2A(9) + - title: The State Pension Credit Regulations 2002 sch. 2A(9) + href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA unit: currency-GBP + values: 2002-01-01: - pip diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/addition.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/amount.yaml similarity index 59% rename from policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/addition.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/amount.yaml index 46235fbd2..f98366cf4 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/addition.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/amount.yaml @@ -1,18 +1,19 @@ -description: Addition to the Minimum Guarantee for each severely disabled child (above - the child addition). +description: Addition to the Minimum Guarantee for each severely disabled child (above the child addition). metadata: economy: false label: Pension Credit severely disabled child addition - name: pc_severe_dis_child_addition period: week propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA/paragraph/9/2019-02-01 - title: The State Pension Credit Regulations 2002 + - title: The State Pension Credit Regulations 2002 SCHEDULE IIA sec. 9 (b)(ii) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=82 unit: currency-GBP uprating: gov.benefit_uprating_cpi + values: 2019-02-01: 88.34 2020-04-01: 92.12 2021-04-01: 92.54 2022-04-01: 95.48 + 2023-04-01: 104.86 + 2024-04-01: 112.21 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/eligibility.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/eligibility.yaml index a3af8c69a..363e67718 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/eligibility.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/child/disability/severe/eligibility.yaml @@ -1,10 +1,12 @@ description: Benefits which confer severe disability in children for Pension Credit. metadata: economy: false + period: year + label: Pension Credit guaranteed credit child severe disability eligibility sources propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA - title: The State Pension Credit Regulations 2002 sch. 2A(9) + - title: The State Pension Credit Regulations 2002 sch. 2A(9) + href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA unit: currency-GBP values: 2002-01-01: diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/income.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/income.yaml index 841900709..1bfc95a3a 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/income.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/income.yaml @@ -3,11 +3,10 @@ description: Income sources included in income used to determine Guarantee Credi metadata: economy: false label: Pension Credit income sources - name: pc_income_sources propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/ukpga/2002/16/section/15 - title: State Pension Credit Act 2002 s. 15(1) + - title: State Pension Credit Act 2002 s. 15(1) + href: https://www.legislation.gov.uk/ukpga/2002/16/section/15 unit: list values: 2002-01-01: diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml index 4479eaeca..1b75eefe6 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml @@ -8,6 +8,8 @@ SINGLE: 2020-04-06: 173.75 2021-04-06: 177.10 2022-04-01: 182.60 + 2023-04-01: 201.05 + 2024-04-01: 218.15 COUPLE: 2015-04-06: 230.85 2016-04-06: 237.55 @@ -17,12 +19,13 @@ COUPLE: 2020-04-06: 265.20 2021-04-06: 270.30 2022-04-01: 278.70 + 2023-04-01: 306.85 + 2024-04-01: 332.95 metadata: period: week - name: pc_min_guarantee label: Pension Credit minimum guarantee uprating: gov.benefit_uprating_cpi unit: currency-GBP reference: - - title: The State Pension Credit Regulations 2002 reg. 6 - url: https://www.legislation.gov.uk/uksi/2002/1792/regulation/6/2021-04-12 + - title: The State Pension Credit Regulations 2002 Part II reg. 6 (1) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=21 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/addition.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/amount.yaml similarity index 52% rename from policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/addition.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/amount.yaml index 63b9d64c6..4e47de25b 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/addition.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/amount.yaml @@ -1,16 +1,17 @@ description: Addition to the Minimum Guarantee for each severely disabled adult. values: - 2018-04-01: 64.30 + 2018-04-01: 64.3 2019-04-01: 65.85 2020-04-01: 66.95 - 2021-04-01: 67.30 - 2022-04-01: 69.40 + 2021-04-01: 67.3 + 2022-04-01: 69.4 + 2023-04-01: 76.4 + 2024-04-01: 81.50 metadata: unit: currency-GBP period: week - name: pc_severe_disability_addition label: Pension Credit severe disability addition uprating: gov.benefit_uprating_cpi reference: - - title: The Social Security Benefits Up-rating Order 2022 - href: https://www.legislation.gov.uk/uksi/2022/292/article/30/made#article-30-2-c \ No newline at end of file + - title: The State Pension Credit Regulations 2002 Part II reg. 6 (5) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=22 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/relevant_benefits.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/relevant_benefits.yaml index f1ff48b44..f3459de36 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/relevant_benefits.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/relevant_benefits.yaml @@ -1,13 +1,12 @@ -description: Benefits which confer entitlement to an increase to the Pension Credit - Minimum Guarantee. +description: Benefits which confer entitlement to an increase to the Pension Credit minimum guarantee. metadata: economy: false label: Pension Credit severe disability criteria - name: pc_severe_disability_criteria + period: year propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/I/paragraph/1 - title: The State Pension Credit Regulations 2002 sch. 1 p. 1 + - title: The State Pension Credit Regulations 2002 sch. 1 p. 1 + href: https://www.legislation.gov.uk/uksi/2002/1792/schedule/I/paragraph/1 unit: list values: 2002-01-01: diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/income/pension_contributions_deduction.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/income/pension_contributions_deduction.yaml index 42073faaa..af81cbe61 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/income/pension_contributions_deduction.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/income/pension_contributions_deduction.yaml @@ -3,7 +3,7 @@ values: 2002-01-01: 0.5 metadata: unit: /1 - name: pc_pen_con_deduction + period: year label: Pension Credit pension contribution deduction reference: - title: Pension Credit technical guidance | GOV.UK diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/income/sources.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/income/sources.yaml index 2ff96c314..be723396e 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/income/sources.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/income/sources.yaml @@ -2,12 +2,13 @@ description: Income sources included in income used to determine Pension Credit metadata: economy: false label: Pension Credit income sources - name: pc_income_sources propagate_metadata_to_children: true + period: year reference: - - href: https://www.legislation.gov.uk/ukpga/2002/16/section/15 - title: State Pension Credit Act 2002 s. 15(1) + - title: State Pension Credit Act 2002 s. 15(1) + href: https://www.legislation.gov.uk/ukpga/2002/16/section/15 unit: list + values: 2002-01-01: - earned_income diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_income.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_income.yaml index 60899f07d..f4081bbf2 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_income.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_income.yaml @@ -1,12 +1,14 @@ -description: Income sources which are deducted from Guarantee Credit income before - Savings Credit calculations. +description: Income sources which are deducted from Guarantee Credit income before Savings Credit calculations. metadata: economy: false propagate_metadata_to_children: true + label: Pension credit savings credit excluded income + period: year reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/9 - title: The State Pension Credit Regulations 2002 reg. 9 + - title: The State Pension Credit Regulations 2002 reg. 9 + href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/9 unit: currency-GBP + values: 2002-01-01: - JSA_contrib diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/income/savings_credit_excluded_sources.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_incomeyaml similarity index 56% rename from policyengine_uk/parameters/gov/dwp/pension_credit/income/savings_credit_excluded_sources.yaml rename to policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_incomeyaml index 2570fbea1..41cb356c1 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/income/savings_credit_excluded_sources.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/excluded_incomeyaml @@ -1,11 +1,14 @@ description: Income sources which are deducted from income before Savings Credit calculations. metadata: economy: false + period: year + label: Pension Credit savings credit excluded income propagate_metadata_to_children: true reference: - - href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/9 - title: The State Pension Credit Regulations 2002 reg. 9 + - title: The State Pension Credit Regulations 2002 reg. 9 + href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/9 unit: currency-GBP + values: 2002-01-01: - JSA_contrib diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_in.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_in.yaml index 726e757d9..f9a5af918 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_in.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_in.yaml @@ -3,7 +3,8 @@ values: 2002-01-01: 0.6 metadata: unit: /1 + period: year label: Savings Credit phase-in rate reference: - title: The State Pension Credit Regulations 2002 reg. 7 - href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/7 \ No newline at end of file + href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/7 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_out.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_out.yaml index 19280a5fd..d85efc549 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_out.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/rate/phase_out.yaml @@ -3,7 +3,8 @@ values: 2002-01-01: 0.4 metadata: unit: /1 + period: year label: Savings Credit phase-out rate reference: - title: The State Pension Credit Regulations 2002 reg. 7 - href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/7 \ No newline at end of file + href: https://www.legislation.gov.uk/uksi/2002/1792/regulation/7 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml index 30c7b1f04..89e83989a 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml @@ -9,8 +9,9 @@ SINGLE: 2020-04-06: 150.47 2021-04-06: 153.70 2022-04-01: 158.47 + 2023-04-01: 174.49 + 2024-04-01: 189.8 metadata: - name: pc_sc_income_threshold_single label: Pension Credit savings credit income threshold (single) COUPLE: values: @@ -22,8 +23,9 @@ COUPLE: 2020-04-06: 239.17 2021-04-06: 244.12 2022-04-01: 251.17 + 2023-04-01: 277.12 + 2024-04-01: 301.22 metadata: - name: pc_sc_income_threshold_couple label: Pension Credit savings credit income threshold (couple) metadata: unit: currency-GBP @@ -31,5 +33,5 @@ metadata: uprating: gov.benefit_uprating_cpi propagate_metadata_to_children: true reference: - - title: The State Pension Credit Regulations 2002 reg. 7 - url: https://www.legislation.gov.uk/uksi/2002/1792/regulation/7/2021-04-12 + - title: The State Pension Credit Regulations 2002 Part II reg. 7 (2) + href: https://www.legislation.gov.uk/uksi/2002/1792/data.pdf#page=25 diff --git a/policyengine_uk/parameters/gov/dwp/pension_credit/takeup.yaml b/policyengine_uk/parameters/gov/dwp/pension_credit/takeup.yaml index edbf5e95c..2a584b0bf 100644 --- a/policyengine_uk/parameters/gov/dwp/pension_credit/takeup.yaml +++ b/policyengine_uk/parameters/gov/dwp/pension_credit/takeup.yaml @@ -3,7 +3,7 @@ values: 2015-01-01: 0.7 metadata: label: Pension Credit take-up rate - name: PC_takeup + period: year unit: /1 reference: - title: "Income-related benefits: estimates of take-up: financial year 2019 to 2020" diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.yaml index 4674cfa62..ddd607b45 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.yaml @@ -2,14 +2,14 @@ period: 2021 input: pension_credit_income: 170 - minimum_guarantee: 180 + pension_credit_minimum_guarantee: 180 output: - is_guarantee_credit_eligible: true + is_pension_credit_guarantee_credit_eligible: true - name: Income over the minimum guarantee does not confer eligibility. period: 2021 input: pension_credit_income: 190 - minimum_guarantee: 180 + pension_credit_minimum_guarantee: 180 output: - is_guarantee_credit_eligible: false + is_pension_credit_guarantee_credit_eligible: false diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.yaml index 62a5f6112..c2cc59989 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.yaml @@ -4,7 +4,7 @@ input: carers_allowance: 30 output: - carer_minimum_guarantee_addition: 1_960 + pension_credit_carer_minimum_guarantee_addition: 1_960 - name: Both adults receive carers' allowance, eligible for addition (each). period: 2022 @@ -19,4 +19,4 @@ benunit: members: [claimant, spouse] output: - carer_minimum_guarantee_addition: 3_920 \ No newline at end of file + pension_credit_carer_minimum_guarantee_addition: 3_920 diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.yaml new file mode 100644 index 000000000..c012ec1ea --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.yaml @@ -0,0 +1,34 @@ +- name: Two children with disabled amount + period: 2025 + input: + people: + child_1: + is_child_or_QYP: false + child_2: + is_child_or_QYP: true + child_3: + is_child_or_QYP: true + benunits: + benunit: + members: [child_1, child_2, child_3] + pension_credit_disabled_child_minimum_guarantee_addition: 1_000 + output: + pension_credit_child_minimum_guarantee_addition: 7_894.16 #((66.29 * 2) * 52) + 1_000 + + +- name: No children + period: 2024 + input: + people: + child_1: + is_child_or_QYP: false + child_2: + is_child_or_QYP: false + child_3: + is_child_or_QYP: false + benunits: + benunit: + members: [child_1, child_2, child_3] + pension_credit_disabled_child_minimum_guarantee_addition: 0 + output: + pension_credit_child_minimum_guarantee_addition: 0 diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.yaml new file mode 100644 index 000000000..0d5ccfdaa --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.yaml @@ -0,0 +1,77 @@ +- name: Two children, one disabled + period: 2022 + input: + people: + person1: + is_child_or_QYP: 5 + pip: + dla: + child_2: + is_child_or_QYP: 5 + pip: 1 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 0 + dla: 0 + child_3: + is_child_or_QYP: 5 + pip: 0 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 0 + dla: 0 + benunits: + benunit: + members: [person1, child_2, child_3] + output: + pension_credit_disabled_child_minimum_guarantee_addition: 1_542.32 + +- name: Two children, none disabled + period: 2022 + input: + people: + person1: + is_child_or_QYP: 5 + pip: + dla: + child_2: + is_child_or_QYP: 5 + pip: 0 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 0 + dla: 0 + child_3: + is_child_or_QYP: 5 + pip: 0 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 0 + dla: 0 + benunits: + benunit: + members: [person1, child_2, child_3] + output: + pension_credit_disabled_child_minimum_guarantee_addition: 0 + +- name: Two children, both disabled, one severely + period: 2022 + input: + people: + person1: + is_child_or_QYP: 5 + pip: + dla: + child_2: + is_child_or_QYP: 5 + pip: 1 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 2 + dla: 0 + child_3: + is_child_or_QYP: 5 + pip: 1 + receives_highest_dla_sc: 0 + receives_enhanced_pip_dl: 0 + dla: 0 + benunits: + benunit: + members: [person1, child_2, child_3] + output: + pension_credit_disabled_child_minimum_guarantee_addition: 6_354.4 diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.yaml deleted file mode 100644 index 4d8371663..000000000 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.yaml +++ /dev/null @@ -1,17 +0,0 @@ -- name: Three children, one not disabled, two disabled, one severely. - period: 2022 - input: - people: - child_1: - age: 5 - child_2: - age: 5 - dla_sc_category: LOWER - child_3: - age: 5 - dla_sc_category: HIGHER - benunits: - benunit: - members: [child_1, child_2, child_3] - output: - child_minimum_guarantee_addition: (54.60 + 84.26 + 147.14) * 52 \ No newline at end of file diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.yaml new file mode 100644 index 000000000..f1c01e400 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.yaml @@ -0,0 +1,24 @@ +- name: Two children, no carers allowance and no children with benefits + period: 2025 + input: + people: + child_1: + is_adult: true + carers_allowance: 0 + attendance_allowance: 0 + dla_sc_middle_plus: 0 + child_2: + is_adult: false + carers_allowance: 0 + attendance_allowance: 0 + dla_sc_middle_plus: 0 + child_3: + is_adult: false + carers_allowance: 0 + attendance_allowance: 0 + dla_sc_middle_plus: 0 + benunits: + benunit: + members: [child_1, child_2, child_3] + output: + pension_credit_severe_disability_minimum_guarantee_addition_eligible: false diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.yaml index 7a1deeb02..b65dc241b 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.yaml @@ -4,4 +4,4 @@ input: dla_sc_category: HIGHER output: - severe_disability_minimum_guarantee_addition: 67.29 * 52 \ No newline at end of file + pension_credit_severe_disability_minimum_guarantee_addition: 67.29 * 52 \ No newline at end of file diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/pension_credit_income.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/pension_credit_income.yaml index aef446fe8..2fcbbd0fa 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/pension_credit_income.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/pension_credit_income.yaml @@ -9,4 +9,4 @@ ESA_contrib: 32 JSA_contrib: 64 output: - pension_credit_income: 127 \ No newline at end of file + pension_credit_income: 127 diff --git a/policyengine_uk/variables/gov/dwp/housing_benefit/non_dep_deduction/household_benefits_individual_non_dep_deduction.py b/policyengine_uk/variables/gov/dwp/housing_benefit/non_dep_deduction/household_benefits_individual_non_dep_deduction.py index 674d0b2d6..95b6bcb69 100644 --- a/policyengine_uk/variables/gov/dwp/housing_benefit/non_dep_deduction/household_benefits_individual_non_dep_deduction.py +++ b/policyengine_uk/variables/gov/dwp/housing_benefit/non_dep_deduction/household_benefits_individual_non_dep_deduction.py @@ -13,5 +13,4 @@ def formula(person, period, parameters): p = parameters(period).gov.dwp.housing_benefit.non_dep_deduction weekly_income = person("total_income", period) / WEEKS_IN_YEAR deduction = p.amount.calc(weekly_income, right=True) - print(weekly_income) return deduction * WEEKS_IN_YEAR diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_pension_credit_guarantee_credit_eligible.py similarity index 69% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_pension_credit_guarantee_credit_eligible.py index 3883cbefa..aee47f409 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_guarantee_credit_eligible.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/is_pension_credit_guarantee_credit_eligible.py @@ -1,7 +1,7 @@ from policyengine_uk.model_api import * -class is_guarantee_credit_eligible(Variable): +class is_pension_credit_guarantee_credit_eligible(Variable): label = "Guarantee Credit eligible" entity = BenUnit definition_period = YEAR @@ -10,5 +10,5 @@ class is_guarantee_credit_eligible(Variable): def formula(benunit, period, parameters): income = benunit("pension_credit_income", period) - minimum_guarantee = benunit("minimum_guarantee", period) + minimum_guarantee = benunit("pension_credit_minimum_guarantee", period) return income < minimum_guarantee diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.py new file mode 100644 index 000000000..cc85b0cd5 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_child_minimum_guarantee_addition.py @@ -0,0 +1,19 @@ +from policyengine_uk.model_api import * + + +class pension_credit_child_minimum_guarantee_addition(Variable): + label = "Pension Credit child-related addition" + entity = BenUnit + definition_period = YEAR + value_type = float + unit = GBP + reference = "https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA" + + def formula(benunit, period, parameters): + person = benunit.members + is_child = person("is_child_or_QYP", period) + gc = parameters(period).gov.dwp.pension_credit.guarantee_credit.child + + base_amount = benunit.sum(is_child) * gc.amount * WEEKS_IN_YEAR + disabled_child_amount = benunit("pension_credit_disabled_child_minimum_guarantee_addition", period) + return base_amount + disabled_child_amount diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.py new file mode 100644 index 000000000..11995f5b7 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child/pension_credit_disabled_child_minimum_guarantee_addition.py @@ -0,0 +1,39 @@ +from policyengine_uk.model_api import * + + +class pension_credit_disabled_child_minimum_guarantee_addition(Variable): + label = "eligible for the child-related Pension Credit addition" + entity = BenUnit + definition_period = YEAR + value_type = float + unit = GBP + reference = "https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA" + + def formula(benunit, period, parameters): + person = benunit.members + is_child = person("is_child_or_QYP", period) + gc = parameters(period).gov.dwp.pension_credit.guarantee_credit + standard_disability_benefits = gc.child.disability.eligibility + severe_disability_benefits = gc.child.disability.severe.eligibility + receives_disability_benefits = ( + add(person, period, standard_disability_benefits) > 0 + ) + receives_severe_disability_benefits = ( + add(person, period, severe_disability_benefits) > 0 + ) + is_standard_disabled = ( + receives_disability_benefits & ~receives_severe_disability_benefits + ) + disabled_child = receives_disability_benefits & is_child + per_child_amount = select( + [ + is_standard_disabled, + receives_severe_disability_benefits, + ], + [ + gc.child.disability.amount, + gc.child.disability.severe.amount, + ], + default=0, + ) * disabled_child + return benunit.sum(per_child_amount) * WEEKS_IN_YEAR diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.py deleted file mode 100644 index 4add530a6..000000000 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/child_minimum_guarantee_addition.py +++ /dev/null @@ -1,39 +0,0 @@ -from policyengine_uk.model_api import * - - -class child_minimum_guarantee_addition(Variable): - label = "Child-related addition" - entity = BenUnit - definition_period = YEAR - value_type = float - unit = GBP - reference = "https://www.legislation.gov.uk/uksi/2002/1792/schedule/IIA" - - def formula(benunit, period, parameters): - person = benunit.members - is_child = person("is_child_or_QYP", period) - gc = parameters(period).gov.dwp.pension_credit.guarantee_credit - standard_disability_benefits = gc.child.disability.eligibility - severe_disability_benefits = gc.child.disability.severe.eligibility - is_disabled = add(person, period, standard_disability_benefits) > 0 - is_severely_disabled = ( - add(person, period, severe_disability_benefits) > 0 - ) - is_standard_disabled = is_disabled & ~is_severely_disabled - is_not_disabled = ~is_disabled - per_child_amount = ( - select( - [ - is_child & is_not_disabled, - is_child & is_standard_disabled, - is_child & is_severely_disabled, - ], - [ - gc.child.addition, - gc.child.addition + gc.child.disability.addition, - gc.child.addition + gc.child.disability.severe.addition, - ], - ) - * WEEKS_IN_YEAR - ) - return benunit.sum(per_child_amount) diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition.py new file mode 100644 index 000000000..6df15a459 --- /dev/null +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition.py @@ -0,0 +1,35 @@ +from policyengine_uk.model_api import * + + +class pension_credit_severe_disability_minimum_guarantee_addition(Variable): + label = "Pension Credit severe disability-related increase" + entity = BenUnit + definition_period = YEAR + value_type = float + unit = GBP + reference = ( + "https://www.legislation.gov.uk/uksi/2002/1792/schedule/I/paragraph/1" + ) + defined_for = "pension_credit_severe_disability_minimum_guarantee_addition_eligible" + + def formula(benunit, period, parameters): + # 1. At least one adult receives a qualifying benefit + # 2. No children (except children receiving qualifying benefits) + # 3. Nobody receives Carer's Allowance (technically 'for one of the claimants', but we assume this is true) + severe_disability = parameters( + period + ).gov.dwp.pension_credit.guarantee_credit.severe_disability + relevant_benefits = severe_disability.relevant_benefits + person = benunit.members + person_receives_qualifying_benefits = ( + add(person, period, relevant_benefits) > 0 + ) + is_adult = person("is_adult", period) + count_eligible_adults = benunit.sum( + is_adult & person_receives_qualifying_benefits + ) + return ( + count_eligible_adults + * severe_disability.amount + * WEEKS_IN_YEAR + ) diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.py similarity index 71% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.py index 9593aecf8..0b28922af 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/severe_disability_minimum_guarantee_addition.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/disability/pension_credit_severe_disability_minimum_guarantee_addition_eligible.py @@ -1,8 +1,8 @@ from policyengine_uk.model_api import * -class severe_disability_minimum_guarantee_addition(Variable): - label = "Severe disability-related increase" +class pension_credit_severe_disability_minimum_guarantee_addition_eligible(Variable): + label = "Pension Credit severe disability-related increase" entity = BenUnit definition_period = YEAR value_type = float @@ -24,19 +24,11 @@ def formula(benunit, period, parameters): add(person, period, relevant_benefits) > 0 ) is_adult = person("is_adult", period) - count_eligible_adults = benunit.sum( - is_adult & person_receives_qualifying_benefits - ) + any_children_without_benefits = ( benunit.sum(~is_adult & ~person_receives_qualifying_benefits) > 0 ) carers_allowance_received = ( add(benunit, period, ["carers_allowance"]) > 0 ) - eligible = ~any_children_without_benefits & ~carers_allowance_received - return ( - eligible - * count_eligible_adults - * severe_disability.addition - * WEEKS_IN_YEAR - ) + return ~any_children_without_benefits & ~carers_allowance_received diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/additional_minimum_guarantee.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_additional_minimum_guarantee.py similarity index 69% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/additional_minimum_guarantee.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_additional_minimum_guarantee.py index bb72e4414..6b418b7f9 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/additional_minimum_guarantee.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_additional_minimum_guarantee.py @@ -1,8 +1,8 @@ from policyengine_uk.model_api import * -class additional_minimum_guarantee(Variable): - label = "Additional Minimum Guarantee" +class pension_credit_additional_minimum_guarantee(Variable): + label = "Pension Credit additional minimum guarantee" entity = BenUnit definition_period = YEAR value_type = float diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_carer_minimum_guarantee_addition.py similarity index 70% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_carer_minimum_guarantee_addition.py index 0938e3676..66b5850ff 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/carer_minimum_guarantee_addition.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/additional/pension_credit_carer_minimum_guarantee_addition.py @@ -1,8 +1,8 @@ from policyengine_uk.model_api import * -class carer_minimum_guarantee_addition(Variable): - label = "Carer-related increase" +class pension_credit_carer_minimum_guarantee_addition(Variable): + label = "Pension Credit carer minimum guarantee addition" entity = BenUnit definition_period = YEAR value_type = float @@ -15,6 +15,4 @@ def formula(benunit, period, parameters): carers_allowance = benunit.members("carers_allowance", period) num_receiving_carers_allowance = benunit.sum(carers_allowance > 0) gc = parameters(period).gov.dwp.pension_credit.guarantee_credit - return ( - num_receiving_carers_allowance * gc.carer.addition * WEEKS_IN_YEAR - ) + return num_receiving_carers_allowance * gc.carer.amount * WEEKS_IN_YEAR diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/minimum_guarantee.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_minimum_guarantee.py similarity index 70% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/minimum_guarantee.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_minimum_guarantee.py index 33552c808..f8aa2fee1 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/minimum_guarantee.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_minimum_guarantee.py @@ -1,7 +1,7 @@ from policyengine_uk.model_api import * -class minimum_guarantee(Variable): +class pension_credit_minimum_guarantee(Variable): label = "Minimum Guarantee" documentation = "The Minimum Guarantee informs the Pension Credit Guarantee Credit amount. Pensioners usually have their annual income increased to this amount by Pension Credit." entity = BenUnit @@ -10,4 +10,7 @@ class minimum_guarantee(Variable): unit = GBP reference = "https://www.legislation.gov.uk/uksi/2002/1792/regulation/6" - adds = ["standard_minimum_guarantee", "additional_minimum_guarantee"] + adds = [ + "pension_credit_standard_minimum_guarantee", + "pension_credit_additional_minimum_guarantee", + ] diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/standard_minimum_guarantee.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_standard_minimum_guarantee.py similarity index 80% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/standard_minimum_guarantee.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_standard_minimum_guarantee.py index 3c52220b5..4ccc40183 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/standard_minimum_guarantee.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee/pension_credit_standard_minimum_guarantee.py @@ -1,8 +1,8 @@ from policyengine_uk.model_api import * -class standard_minimum_guarantee(Variable): - label = "Standard Minimum Guarantee" +class pension_credit_standard_minimum_guarantee(Variable): + label = "Pension Credit standard minimum guarantee" entity = BenUnit definition_period = YEAR value_type = float diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/guarantee_credit.py b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/pension_credit_guarantee_credit.py similarity index 51% rename from policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/guarantee_credit.py rename to policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/pension_credit_guarantee_credit.py index 2eb5599e9..13ed69650 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/guarantee_credit.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/guarantee_credit/pension_credit_guarantee_credit.py @@ -1,16 +1,16 @@ from policyengine_uk.model_api import * -class guarantee_credit(Variable): - label = "Guarantee Credit" +class pension_credit_guarantee_credit(Variable): + label = "Pension Credit guarantee credit" entity = BenUnit definition_period = YEAR value_type = float unit = GBP reference = "https://www.legislation.gov.uk/ukpga/2002/16/section/2" + defined_for = "is_pension_credit_guarantee_credit_eligible" def formula(benunit, period, parameters): income = benunit("pension_credit_income", period) - minimum_guarantee = benunit("minimum_guarantee", period) - eligible = benunit("is_guarantee_credit_eligible", period) - return max_(0, minimum_guarantee - income) * eligible + minimum_guarantee = benunit("pension_credit_minimum_guarantee", period) + return max_(0, minimum_guarantee - income) diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/is_pension_credit_eligible.py b/policyengine_uk/variables/gov/dwp/pension_credit/is_pension_credit_eligible.py index 4761c9c2c..15fbd83f0 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/is_pension_credit_eligible.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/is_pension_credit_eligible.py @@ -11,6 +11,8 @@ class is_pension_credit_eligible(Variable): def formula(benunit, period, parameters): has_sp_age_member = benunit.any(benunit.members("is_SP_age", period)) - is_gc_eligible = benunit("is_guarantee_credit_eligible", period) + is_gc_eligible = benunit( + "is_pension_credit_guarantee_credit_eligible", period + ) is_sc_eligible = benunit("is_savings_credit_eligible", period) return has_sp_age_member & (is_gc_eligible | is_sc_eligible) diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/pension_credit_entitlement.py b/policyengine_uk/variables/gov/dwp/pension_credit/pension_credit_entitlement.py index 7284e0631..f99d97f39 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/pension_credit_entitlement.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/pension_credit_entitlement.py @@ -8,4 +8,4 @@ class pension_credit_entitlement(Variable): value_type = float unit = GBP defined_for = "is_pension_credit_eligible" - adds = ["guarantee_credit", "savings_credit"] + adds = ["pension_credit_guarantee_credit", "savings_credit"] diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py index c75d66a16..33666d4b5 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/is_savings_credit_eligible.py @@ -2,7 +2,7 @@ class is_savings_credit_eligible(Variable): - label = "Eligible for Savings Credit" + label = "eligible for Savings Credit" entity = BenUnit definition_period = YEAR value_type = bool diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py index ed6f120ee..fa4237658 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit.py @@ -8,13 +8,14 @@ class savings_credit(Variable): value_type = float unit = GBP reference = "https://www.legislation.gov.uk/ukpga/2002/16/section/3" + defined_for = "is_savings_credit_eligible" def formula(benunit, period, parameters): income = benunit("savings_credit_income", period) sc = parameters(period).gov.dwp.pension_credit.savings_credit relation_type = benunit("relation_type", period) threshold = sc.threshold[relation_type] * WEEKS_IN_YEAR - minimum_guarantee = benunit("minimum_guarantee", period) + minimum_guarantee = benunit("pension_credit_minimum_guarantee", period) income_over_threshold = max_(income - threshold, 0) income_over_mg = max_(income - minimum_guarantee, 0) maximum_savings_credit = sc.rate.phase_in * ( @@ -24,5 +25,4 @@ def formula(benunit, period, parameters): maximum_savings_credit, sc.rate.phase_in * income_over_threshold ) sc_reduction = sc.rate.phase_out * income_over_mg - eligible = benunit("is_savings_credit_eligible", period) - return max_(0, phased_in_sc - sc_reduction) * eligible + return max_(0, phased_in_sc - sc_reduction) diff --git a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit_income.py b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit_income.py index fe3e40e4f..e8814afec 100644 --- a/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit_income.py +++ b/policyengine_uk/variables/gov/dwp/pension_credit/savings_credit/savings_credit_income.py @@ -2,7 +2,7 @@ class savings_credit_income(Variable): - label = "Income for Savings Credit" + label = "income considered for the Savings Credit" documentation = "Savings Credit (Pension Credit) excludes certain income sources from the calculation of the amount." entity = BenUnit definition_period = YEAR