Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Children count processing

Open
#522 1 comment 0 reactions 3 assignees View on GitHub

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,

  1. 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.

  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from simpaths/SimPaths

All issues in simpaths/SimPaths

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.