Incorrect lagged income quintiles after benefit-unit changes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with Person.getYHhQuintilesMonthC5L1() in src/main/java/simpaths/model/Person.java, the Q2–Q5 dummy getters, and new benefit unit initialization in src/main/java/simpaths/model/BenefitUnit.java. Trace how a person's benefit unit changes and decide how individual lagged quintile history should be retained, including how missing history is handled. Add focused checks for unchanged membership, a new unit at age 18, and partnership formation between people with different quintiles.
Written by the indexing model from the issue text.
Description
Coding problem
A person's lagged income quintile should describe the benefit unit they belonged to in the previous period. Instead, Person.getYHhQuintilesMonthC5L1() reads the lag stored on their current benefit unit:
return benefitUnit.getYHhQuintilesMonthC5L1();
When someone forms a new benefit unit, for example on turning 18 or forming a partnership, that unit may have no previous-period quintile. The Q2-Q5 dummy getters then all return zero, implicitly applying the Q1 reference-category coding.
The new-unit initialisation supplies Q3 for a missing current quintile, but does not restore the person's previous quintile.
Verification
In a clean build of develop at 11bec2bd9 (23 October), an isolated getter test returned:
- Original benefit unit with lagged Q5: Q5.
- Membership changed to a new unit without history: null, with all Q2-Q5 dummy values 0.
- Destination unit given lagged Q2: Q2, rather than the person's original Q5.
The same behaviour occurs in the saved income-validation JAR. These checks establish the getter problem; they do not measure its population frequency or aggregate effect on predictions.
Proposed coding repair
The approach discussed was to preserve each person's BU income quintile at the individual level before membership changes, and use that stored previous-period value for the lagged regressor. Two people forming a couple could then correctly retain different lagged quintiles. Retaining the previous BU link and its historical value is an alternative.
A focused test would check unchanged membership, a new BU at age 18, and partnership formation between people from different quintiles. Missing history would also need explicit handling rather than silently becoming the reference category. This repair preserves the meaning of the existing regressor; it does not itself require replacing it with parental income.
Separate education-specification question
Even with the coding repair, a student may subsequently have low own-BU income while still living with well-off parents. Whether E1a should instead use parental income, and how E1b should distinguish own from parental resources, is a separate specification decision requiring consistent estimation and Java implementation.
Could we confirm the preferred implementation and who will take it forward?
- Dominant language
- Java
- Stars
- 26
- Forks
- 38
- Avg merge
- 11h 45m
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simpaths/SimPaths
-
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Double hurdle model of labour supplyPossibly taken @dariaple claimed this 1 day ago. Open
simpaths/SimPaths#548 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Sort note on integration test procedurePossibly taken @Mariia-Var claimed this 1 day ago. Open
simpaths/SimPaths#547 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in simpaths/SimPaths
Similar issues
-
Good First Issue
Difficulty 1/5 Under an hour Newbie friendliness 75/100
hiero-ledger/hiero-sdk-java#3025 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
DogFooding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
OpenAEV-Platform/openaev#8768 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
federicoiosue/Omni-Notes#1039 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
micronaut-projects/micronaut-core#14179 ·
Maintainers usually reply within 1 day