Commit 932ff6d
Update stale VAT test expectation and clamp negative energy consumption (#365)
The 'Raise VAT standard rate by 2pp' reform-impact test expected a
£25 bn delta, but the enhanced FRS's total consumption aggregate has
since grown to a UK-realistic ~£1.6 T base. The VAT formula itself is
unchanged:
delta = consumption * 0.5 (full-rate share)
* 0.02 (rate change)
/ 0.38 (microdata_vat_coverage)
≈ 0.0263 * consumption
so a 2pp rise on a £1.6 T base produces ~£43 bn. Update the expected
value with explanatory comments pointing at #364 for the separate
question of whether the 0.38 coverage factor should rise toward 1.0
now that the underlying consumption base is fuller.
Also clamps raw electricity/gas consumption in `impute_energy_splits`
to non-negative. LCFS bill-variable inconsistencies (e.g. B490 > B489
on a handful of PPM households) were producing small negatives that
propagated into `test_non_negative_energy` failures. Consumption is
non-negative by definition.
Closes #364
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b73eccd commit 932ff6d
3 files changed
Lines changed: 18 additions & 1 deletion
File tree
- changelog.d
- policyengine_uk_data
- datasets/imputations
- tests/microsimulation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| |||
0 commit comments