Skip to content

Commit

Permalink
Add employer pension contributions (#31)
Browse files Browse the repository at this point in the history
* Remove pension contributions from SPI imputation list

* Set employer share to 2.5% actually (misread the chart)

* Add employer pension contributions

* Update data
  • Loading branch information
nikhilwoodruff authored Oct 16, 2024
1 parent 634120f commit 6616a6e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 8 deletions.
3 changes: 1 addition & 2 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- bump: minor
changes:
added:
- 5% dropout in calibration.
- Code quality improvements.
- Add employer pension contributions.
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ root: intro
chapters:
- file: methodology.ipynb
- file: validation.ipynb
- file: pension_contributions.ipynb
25 changes: 25 additions & 0 deletions docs/pension_contributions.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pension contributions\n",
"\n",
"We take pension contributions from the FRS data where available. This includes:\n",
"\n",
"* Employee contributions (~£30 billion in FY2022)\n",
"* Personal contributions (~£5 billion in FY2022)\n",
"\n",
"We do not have data on employer contributions, but from aggregate data this is around [250% of employee contributions](https://www.gov.uk/government/statistics/workplace-pension-participation-and-savings-trends-2009-to-2022/workplace-pension-participation-and-savings-trends-of-eligible-employees-2009-to-2022). We apply this as a multiplier to estimate employer contributions for each worker."
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
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 @@ -56,7 +56,7 @@ class EnhancedFRS_2022_23(EnhancedFRS):
input_frs = ExtendedFRS_2022_23
time_period = 2022
end_year = 2028
url = "release://PolicyEngine/ukda/1.3.0/enhanced_frs_2022_23.h5"
url = "release://PolicyEngine/ukda/1.4.0/enhanced_frs_2022_23.h5"


def reweight(
Expand Down
9 changes: 6 additions & 3 deletions policyengine_uk_data/datasets/frs/frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class FRS_2022_23(FRS):
label = "FRS (2022-23)"
file_path = STORAGE_FOLDER / "frs_2022_23.h5"
time_period = 2022
url = "release://PolicyEngine/ukda/1.3.0/frs_2022_23.h5"
url = "release://PolicyEngine/ukda/1.4.0/frs_2022_23.h5"


def add_id_variables(frs: h5py.File, person: DataFrame, household: DataFrame):
Expand Down Expand Up @@ -745,7 +745,7 @@ def add_expenses(
* 52
)

frs["private_pension_contributions"] = max_(
frs["personal_pension_contributions"] = max_(
0,
sum_to_entity(
pen_prov.PENAMT[pen_prov.STEMPPEN.isin((5, 6))],
Expand All @@ -754,10 +754,13 @@ def add_expenses(
).clip(0, pen_prov.PENAMT.quantile(0.95))
* 52,
)
frs["occupational_pension_contributions"] = max_(
frs["employee_pension_contributions"] = max_(
0,
sum_to_entity(job.DEDUC1.fillna(0), job.person_id, person.index) * 52,
)
frs["employer_pension_contributions"] = (
frs["employee_pension_contributions"] * 2.5
) # Rough estimate based on aggregates.

frs["housing_service_charges"] = (
pd.DataFrame(
Expand Down
2 changes: 0 additions & 2 deletions policyengine_uk_data/utils/imputations/income.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
charitable_investment_gifts="GIFTINV",
employment_expenses="EPB",
other_deductions="MOTHDED",
pension_contributions="PENSRLF",
person_weight="FACT",
benunit_weight="FACT",
household_weight="FACT",
Expand Down Expand Up @@ -79,7 +78,6 @@ def generate_spi_table(spi: pd.DataFrame):
"employment_expenses",
"property_income",
"gift_aid",
"pension_contributions",
]


Expand Down

0 comments on commit 6616a6e

Please sign in to comment.