Children count processing
Maintainers usually reply within 1 day
@ANBurdett is already working on this.
Since Sep 16, 2026.
Assessment
This issue has not been assessed yet.
Description
SimPaths bug:
Should use age range 0-17, instead of 0-18:
i.e. getNumberChildren(0,Parameters.AGE_TO_BECOME_RESPONSIBLE-1)
https://github.com/simpaths/SimPaths/blob/b649c6967db2d9cced068c8878a2979725dc39e0/src/main/java/simpaths/model/BenefitUnit.java#L4087
Java code inconsistency with Stata .do files:
Java counts people under 18 who belong to the benefit unit. Stata counts children under 18 who are linked to the person, or to the benefit-unit head in a couple, as their parent. Stata never checks which benefit unit the child is in, and that's where the mismatches come from.
More specifically,
-
Couples (Stata counts fewer). A child is placed in a couple's unit if it is linked to either partner. But it is only counted if it is linked to the head. Say the survey lists the woman as mother but doesn't list the head as step-father. The child lives in the unit, so Java counts it. It isn't linked to the head, so Stata doesn't.
-
Single adults (Stata counts more). Every time, both of the child's parents live in the data but aren't recorded as a couple, so each forms their own unit. The child is placed in one parent's unit. The other parent still has the parent link, so Stata counts the child for them too. Java counts the child only in the unit where it lives.
For Spain data,
| Group | Affected | Group size | % of group | % of all adults |
|---|---|---|---|---|
| Couples | 2,372 (1,186 couples) | 263,918 | 0.90% | 0.54% |
| Singles | 212 | 172,280 | 0.12% | 0.05% |
| Total | 2,584 | 436,198 | — | 0.59% |
- 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 today. 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
-
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 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Dans-Plugins/Medieval-Roleplay-Engine#384 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day