Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Incorrect lagged income quintiles after benefit-unit changes

未关闭
#543 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
backend, databases

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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, silently applying the Q1 reference-category coding. This is not evidence that the person was previously in Q1.

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.

This issue is about preserving individual history, not choosing those education specifications or imputing parental income. It is also distinct from the equivalence-scale error in #541.

Could we confirm the preferred implementation and who will take it forward?

主要语言
Java
星标
26
派生
38
平均合并
13 小时 5 分钟
30 天内合并 PR
7

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

simpaths/SimPaths 的其他 Issue

查看 simpaths/SimPaths 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。