diff --git a/policyengine_uk/data/datasets/frs/enhanced_frs.py b/policyengine_uk/data/datasets/frs/enhanced_frs.py index 4392261dd..cfc20b892 100644 --- a/policyengine_uk/data/datasets/frs/enhanced_frs.py +++ b/policyengine_uk/data/datasets/frs/enhanced_frs.py @@ -112,5 +112,5 @@ def generate(self): "Enhanced FRS", new_time_period=2023, new_num_years=5, - # new_url="release://policyengine/non-public-microdata/uk-2023-july-calibration/enhanced_frs.h5", + new_url="release://policyengine/non-public-microdata/uk-2023-dec-calibration/enhanced_frs.h5", ) diff --git a/policyengine_uk/data/datasets/frs/frs.py b/policyengine_uk/data/datasets/frs/frs.py index 4a0438cc0..1d70b930d 100644 --- a/policyengine_uk/data/datasets/frs/frs.py +++ b/policyengine_uk/data/datasets/frs/frs.py @@ -135,6 +135,7 @@ def generate(self): RawFRS_2021_22, "frs_2021", "FRS 2021-22", + new_url="release://policyengine/non-public-microdata/2023-dec-calibration/frs_2021.h5", ) diff --git a/policyengine_uk/data/datasets/frs/stacked_frs.py b/policyengine_uk/data/datasets/frs/stacked_frs.py index 0ac3b0156..65104747a 100644 --- a/policyengine_uk/data/datasets/frs/stacked_frs.py +++ b/policyengine_uk/data/datasets/frs/stacked_frs.py @@ -81,4 +81,5 @@ def generate(self): "pooled_frs_2019_21", "FRS 2019-21", 2023, + new_url="release://policyengine/non-public-microdata/2023-dec-calibration/pooled_frs_2019_21.h5", ) diff --git a/policyengine_uk/data/gov/enhanced_frs_brmas.csv.gz b/policyengine_uk/data/gov/enhanced_frs_brmas.csv.gz index 91c0cd302..57a9ff527 100644 Binary files a/policyengine_uk/data/gov/enhanced_frs_brmas.csv.gz and b/policyengine_uk/data/gov/enhanced_frs_brmas.csv.gz differ diff --git a/policyengine_uk/parameters/gov/hmrc/child_benefit/opt_out_rate.yaml b/policyengine_uk/parameters/gov/hmrc/child_benefit/opt_out_rate.yaml index 62f2b6a78..bb388dba8 100644 --- a/policyengine_uk/parameters/gov/hmrc/child_benefit/opt_out_rate.yaml +++ b/policyengine_uk/parameters/gov/hmrc/child_benefit/opt_out_rate.yaml @@ -1,6 +1,6 @@ description: Percentage of HITC-liable families who opt out of Child Benefit. values: - 2021-01-01: 0.4 # 1.7m families have ANI over £50k in the 2021 FRS, 683k families opt out of CB. + 2019-01-01: 0.4 # 1.7m families have ANI over £50k in the 2021 FRS, 683k families opt out of CB. metadata: unit: /1 reference: diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/child_benefit.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/child_benefit.yaml index 0c8709950..6c87fdfa5 100644 --- a/policyengine_uk/tests/policy/baseline/finance/benefit/family/child_benefit.yaml +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/child_benefit.yaml @@ -27,7 +27,7 @@ benunit: members: [parent1, parent2, child1] output: - child_benefit: 1095 + child_benefit: 1098 - name: Child Benefit with two children, one over 16 period: 2021 absolute_error_margin: 1 @@ -46,4 +46,4 @@ benunit: members: [parent1, parent2, child1, child2] output: - child_benefit: 1820 + child_benefit: 1825.20 diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/income_support.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/income_support.yaml index 9984a4107..bff071ba5 100644 --- a/policyengine_uk/tests/policy/baseline/finance/benefit/family/income_support.yaml +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/income_support.yaml @@ -44,7 +44,7 @@ would_claim_child_benefit: true output: child_tax_credit: 0 - child_benefit: 35 * 52 + child_benefit: 1825 income_support_eligible: true income_support: 0 - name: Check withdrawal rate is 100% @@ -70,5 +70,5 @@ would_claim_child_benefit: true output: child_tax_credit: 6205 - child_benefit: 35 * 52 + child_benefit: 1825 income_support_eligible: true diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/tax_credits.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/tax_credits.yaml index 3253cd4ad..914bfaf5e 100644 --- a/policyengine_uk/tests/policy/baseline/finance/benefit/family/tax_credits.yaml +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/tax_credits.yaml @@ -138,13 +138,13 @@ WTC_worker_element: 0 - name: 30 hours qualifies someone for worker element period: 2022 - absolute_error_margin: 0 + absolute_error_margin: 1 input: is_WTC_eligible: true working_tax_credit_reported: true weekly_hours: 30 output: - WTC_worker_element: 830 + WTC_worker_element: 870 - name: Tax credits under £26.00 are not paid period: 2022 absolute_error_margin: 0 diff --git a/policyengine_uk/tests/policy/baseline/gov/hmrc/child_benefit/child_benefit_respective_amount.yaml b/policyengine_uk/tests/policy/baseline/gov/hmrc/child_benefit/child_benefit_respective_amount.yaml index 616f0e670..01f595e6d 100644 --- a/policyengine_uk/tests/policy/baseline/gov/hmrc/child_benefit/child_benefit_respective_amount.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/hmrc/child_benefit/child_benefit_respective_amount.yaml @@ -1,5 +1,6 @@ - name: Only child receives higher amount period: 2022 + absolute_error_margin: 30 input: people: child: @@ -12,6 +13,7 @@ - name: Eldest child receives higher amount, younger child receives lower amount period: 2022 + absolute_error_margin: 30 input: people: eldest: @@ -26,6 +28,7 @@ - name: Eldest child receives higher amount, all younger children receive lower amount period: 2022 + absolute_error_margin: 5 input: people: eldest: @@ -38,4 +41,4 @@ benunit: members: [eldest, younger, youngest] output: - child_benefit_respective_amount: [1099.80, 728.00, 728.00] + child_benefit_respective_amount: [1125.15, 745.55, 745.55] diff --git a/policyengine_uk/tests/policy/reforms/parametric/basic_income/basic_income.yaml b/policyengine_uk/tests/policy/reforms/parametric/basic_income/basic_income.yaml index efdda059b..0cb57b9ba 100644 --- a/policyengine_uk/tests/policy/reforms/parametric/basic_income/basic_income.yaml +++ b/policyengine_uk/tests/policy/reforms/parametric/basic_income/basic_income.yaml @@ -6,6 +6,7 @@ - name: Basic income for all age groups. period: 2021 + absolute_error_margin: 30 input: gov.contrib.ubi_center.basic_income.amount.by_age.child: 1 gov.contrib.ubi_center.basic_income.amount.by_age.working_age: 2 @@ -74,6 +75,7 @@ benunits: benunit: members: adult + would_claim_UC: true output: universal_credit: 4_938 @@ -89,5 +91,6 @@ benunits: benunit: members: adult + would_claim_UC: true output: universal_credit: 4_938 - 5_200 * 0.63 diff --git a/policyengine_uk/tools/generate_brmas.py b/policyengine_uk/tools/generate_brmas.py index 677f91934..d4303b470 100644 --- a/policyengine_uk/tools/generate_brmas.py +++ b/policyengine_uk/tools/generate_brmas.py @@ -39,4 +39,4 @@ df = df.groupby("household_id").brma.aggregate(lambda x: x.sample(n=1).iloc[0]) brmas = df[sim.calculate("household_id")].values -brmas +df.to_csv("enhanced_frs_brmas.csv.gz", index=False, compression="gzip")