-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #880 from PolicyEngine/fix/879-private-school-vat
Implement private school VAT
- Loading branch information
Showing
12 changed files
with
231 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- bump: patch | ||
changes: | ||
added: | ||
- Private school VAT calculation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
...cyengine_uk/parameters/calibration/demographics/people/total_private_school_students.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
description: Total number of private school students | ||
value: | ||
2015-01-01: 583_029 | ||
2016-01-01: 583_268 | ||
2017-01-01: 581_873 | ||
2018-01-01: 580_480 | ||
2019-01-01: 576_857 | ||
2020-01-01: 569_366 | ||
2021-01-01: 581_427 | ||
2022-01-01: 591_954 | ||
2023-01-01: 593_486 | ||
metadata: | ||
unit: person | ||
label: total number of private school students | ||
reference: | ||
- title: School characteristics for Academy, Independent, Independent school, LA Maintained, Non-maintained special school and 5 other filters in England between 2015/16 and 2023/24 | ||
href: https://explore-education-statistics.service.gov.uk/data-tables/fast-track/27e148e3-2581-4bc3-b0bc-08dc6f35f09f |
6 changes: 6 additions & 0 deletions
6
policyengine_uk/parameters/gov/contrib/labour/private_school_vat.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: VAT rate applied to private schools. | ||
values: | ||
2000-01-01: 0 | ||
metadata: | ||
unit: /1 | ||
label: private school VAT rate |
49 changes: 49 additions & 0 deletions
49
...ngine_uk/parameters/gov/simulation/private_school_vat/private_school_attendance_rate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
description: Rate at which households enroll children in private schools, by percentile. | ||
0: | ||
2000-01-01: 0 | ||
5: | ||
2000-01-01: 0.025 | ||
10: | ||
2000-01-01: 0.0125 | ||
15: | ||
2000-01-01: 0.01 | ||
20: | ||
2000-01-01: 0.005 | ||
25: | ||
2000-01-01: 0.008 | ||
30: | ||
2000-01-01: 0.01 | ||
35: | ||
2000-01-01: 0.015 | ||
40: | ||
2000-01-01: 0.01 | ||
45: | ||
2000-01-01: 0.0175 | ||
50: | ||
2000-01-01: 0.025 | ||
55: | ||
2000-01-01: 0.0175 | ||
60: | ||
2000-01-01: 0.0175 | ||
65: | ||
2000-01-01: 0.025 | ||
70: | ||
2000-01-01: 0.03 | ||
75: | ||
2000-01-01: 0.025 | ||
80: | ||
2000-01-01: 0.05 | ||
85: | ||
2000-01-01: 0.06 | ||
90: | ||
2000-01-01: 0.0875 | ||
95: | ||
2000-01-01: 0.13 | ||
100: | ||
2000-01-01: 0.47 | ||
metadata: | ||
unit: /1 | ||
label: percentage of students in private school, by household net income percentile | ||
reference: | ||
- title: Income, housing wealth, and private school access in Britain | ||
href: https://www.tandfonline.com/doi/full/10.1080/09645292.2021.1874878 |
10 changes: 10 additions & 0 deletions
10
policyengine_uk/parameters/gov/simulation/private_school_vat/private_school_fees.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: Mean annual private school fee | ||
values: | ||
2022-01-01: 15_200 | ||
metadata: | ||
unit: currency-GBP | ||
label: mean annual private school fee | ||
reference: | ||
- title: Tax, private school fees and state school spending | ||
href: https://ifs.org.uk/publications/tax-private-school-fees-and-state-school-spending | ||
uprating: calibration.uprating.CPI |
13 changes: 13 additions & 0 deletions
13
policyengine_uk/parameters/gov/simulation/private_school_vat/private_school_vat_basis.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
description: Effective percentage of private school tuition subject to VAT | ||
# Per IFS article | ||
# (https://ifs.org.uk/publications/tax-private-school-fees-and-state-school-spending), | ||
# about 25% of private school costs would be | ||
# effectively VAT-free | ||
values: | ||
0000-01-01: 0.75 | ||
metadata: | ||
unit: /1 | ||
label: private school tuition VAT basis | ||
reference: | ||
- title: Tax, private school fees and state school spending | ||
href: https://ifs.org.uk/publications/tax-private-school-fees-and-state-school-spending |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
policyengine_uk/variables/contrib/labour/private_school_vat.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
from policyengine_uk.model_api import * | ||
from policyengine_uk.variables.gov.hmrc.tax import household_tax | ||
|
||
|
||
class attends_private_school(Variable): | ||
label = "attends private school" | ||
entity = Person | ||
definition_period = YEAR | ||
value_type = bool | ||
|
||
def formula(person, period, parameters): | ||
household = person.household | ||
# To ensure that our model matches | ||
# total number of students actually enrolled | ||
|
||
ps_vat_params = parameters(period).gov.simulation.private_school_vat | ||
private_school_attendance_rate = ( | ||
ps_vat_params.private_school_attendance_rate | ||
) | ||
|
||
person = household.members | ||
|
||
is_child = person("is_child", period) | ||
|
||
taxes = household.sum( | ||
person("income_tax", period) + person("national_insurance", period) | ||
) | ||
|
||
net_income = ( | ||
household("household_market_income", period) | ||
+ household("household_benefits", period) | ||
- taxes | ||
) | ||
|
||
household_weight = household("household_weight", period) | ||
weighted_income = MicroSeries(net_income, weights=household_weight) | ||
percentile = ( | ||
weighted_income.percentile_rank() | ||
.clip(0, 100) | ||
.values.astype(numpy.int64) | ||
) | ||
STUDENT_POPULATION_ADJUSTMENT_FACTOR = 1.1 | ||
|
||
p_attends_private_school = ( | ||
np.array( | ||
[ | ||
interpolate_percentile(private_school_attendance_rate, p) | ||
for p in percentile | ||
] | ||
) | ||
* STUDENT_POPULATION_ADJUSTMENT_FACTOR | ||
* is_child | ||
) | ||
|
||
return random(person) < p_attends_private_school | ||
|
||
|
||
class private_school_vat(Variable): | ||
label = "private school VAT" | ||
entity = Household | ||
definition_period = YEAR | ||
value_type = float | ||
unit = "currency-GBP" | ||
|
||
def formula(household, period, parameters): | ||
num_children = add(household, period, ["attends_private_school"]) | ||
|
||
ps_vat_params = parameters(period).gov.simulation.private_school_vat | ||
private_school_vat_basis = ps_vat_params.private_school_vat_basis | ||
avg_yearly_private_school_cost = ps_vat_params.private_school_fees | ||
|
||
private_school_vat_rate = parameters( | ||
period | ||
).gov.contrib.labour.private_school_vat | ||
|
||
return ( | ||
num_children | ||
* avg_yearly_private_school_cost | ||
* private_school_vat_rate | ||
* private_school_vat_basis | ||
) | ||
|
||
|
||
def interpolate_percentile(param, percentile): | ||
if str(percentile) in param: | ||
return param[str(percentile)] | ||
else: | ||
idx = percentile - (percentile % 5) | ||
p1 = idx | ||
p2 = idx + 5 | ||
v1 = param[str(idx)] | ||
v2 = param[str(idx + 5)] | ||
return v1 + (v2 - v1) * (percentile - p1) / (p2 - p1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters