Skip to content

Commit

Permalink
Update Enhanced FRS
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Dec 5, 2023
1 parent 2c30da6 commit b75aa52
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion policyengine_uk/data/datasets/frs/enhanced_frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
1 change: 1 addition & 0 deletions policyengine_uk/data/datasets/frs/frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)


Expand Down
1 change: 1 addition & 0 deletions policyengine_uk/data/datasets/frs/stacked_frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Binary file modified policyengine_uk/data/gov/enhanced_frs_brmas.csv.gz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,4 +46,4 @@
benunit:
members: [parent1, parent2, child1, child2]
output:
child_benefit: 1820
child_benefit: 1825.20
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- name: Only child receives higher amount
period: 2022
absolute_error_margin: 30
input:
people:
child:
Expand All @@ -12,6 +13,7 @@

- name: Eldest child receives higher amount, younger child receives lower amount
period: 2022
absolute_error_margin: 30
input:
people:
eldest:
Expand All @@ -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:
Expand All @@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -74,6 +75,7 @@
benunits:
benunit:
members: adult
would_claim_UC: true
output:
universal_credit: 4_938

Expand All @@ -89,5 +91,6 @@
benunits:
benunit:
members: adult
would_claim_UC: true
output:
universal_credit: 4_938 - 5_200 * 0.63
2 changes: 1 addition & 1 deletion policyengine_uk/tools/generate_brmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit b75aa52

Please sign in to comment.