Commit 8ebd063
Fix NEED calibration to use gross income for income band assignment (#288)
* Fix NEED calibration to use gross income for income band assignment
NEED 2023 income bands use Experian modelled gross household income, not
net income. The previous code used hbai_household_net_income which
misallocated households across bands (especially at extremes — too few in
£100k+ bands). This switches to household_gross_income (LCFS P344p) for
both the LCFS training calibration and the FRS 4D raking step.
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix LCFS column name: p344p is lowercase
Co-Authored-By: Claude <noreply@anthropic.com>
* Use gross income in calibration test to match raking
The test was evaluating NEED band fit using hbai_household_net_income
while the raking now targets household_gross_income.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8e82888 commit 8ebd063
File tree
3 files changed
+16
-3
lines changed- changelog.d
- policyengine_uk_data
- datasets/imputations
- tests
3 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
336 | 341 | | |
337 | 342 | | |
338 | 343 | | |
339 | | - | |
| 344 | + | |
340 | 345 | | |
341 | 346 | | |
342 | 347 | | |
343 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
344 | 352 | | |
345 | 353 | | |
346 | 354 | | |
| |||
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
| 482 | + | |
474 | 483 | | |
475 | 484 | | |
476 | 485 | | |
| |||
516 | 525 | | |
517 | 526 | | |
518 | 527 | | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | 531 | | |
| |||
584 | 594 | | |
585 | 595 | | |
586 | 596 | | |
587 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
588 | 600 | | |
589 | 601 | | |
590 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments