Incorrect benefit-unit equivalence scale understates equivalised income for multi-adult units
還沒有人認領這個 Issue。
評估
研究方向
閱讀 src/main/java/simpaths/model/BenefitUnit.java 中的 BenefitUnit.getEquivalisedWeight(),並將成人權重與文件所述的尺度以及 src/main/java/simpaths/model/Household.java 中的家戶計算進行比較。檢查 issue 中描述的兩名成人案例:福利單位等值尺度應為1.5,月可支配收入為£3,000時,年等值收入應為£24,000。
由索引模型根據 Issue 內容生成。
描述
Problem
In BenefitUnit.getEquivalisedWeight(), firstAdult is initialised to true but never set to false. Consequently, every member aged at least AGE_TO_BECOME_RESPONSIBLE receives a weight of 1.0, rather than 1.0 for the first adult and 0.5 for subsequent adults.
This differs from the scale documented above the method and from the household calculation, which does update the flag.
Reproduction and effect
For a household containing one benefit unit with two adults aged 40 and 38, and total disposable income of £3,000 per month:
- Expected equivalence scale: 1.5; annual equivalised income: £24,000.
- Current benefit-unit calculation: 2.0; annual equivalised income: £18,000.
- The household calculation correctly returns £24,000 for those same people and income.
The error therefore understates benefit-unit equivalised income by 25% in this example. Cash income itself is unchanged. It can affect quantities and regressors derived from benefit-unit equivalised income; the aggregate effect on model outputs has not been established by this check.
Proposed correction and verification
Setting the flag after the first adult's contribution resolves the tested cases:
if (firstAdult) {
weight += 1.0;
firstAdult = false;
} else {
weight += 0.5;
}
The error remains in the latest shared code. Although the existing automated tests pass, a direct check shows that two adults receive an equivalence scale of 2 rather than 1.5.
- 主要語言
- Java
- 星號
- 26
- 分支
- 38
- 平均合併
- 13 小時 5 分鐘
- 30 天內合併 PR
- 7
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
simpaths/SimPaths 的其他 Issue
-
bug
難度 1/5 1 小時以內 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 4/5 3-5 天 新手友好度 45/100
-
F1: fertility-rate predictor inconcistency between estimation and Java implementation可能已有人在做 @dariaple 於 3 天前認領。 未關閉
-
H2: should dlltsd01 be set to zero for retirees?可能已有人在做 @Kolndre 於 5 天前認領。 未關閉
查看 simpaths/SimPaths 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
Type/Improvement
難度 2/5 1-3 小時 新手友好度 68/100
ballerina-platform/static-code-analysis-tool#140 ·
維護者通常 1 天內回覆
-
ready-for-triage triaged
難度 2/5 1-3 小時 新手友好度 74/100
RedHatInsights/notifications-backend#5080 · 2 則留言 ·
維護者通常 1 天內回覆
-
Bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
protobuf
難度 2/5 1-3 小時 新手友好度 84/100
FasterXML/jackson-dataformats-binary#874 ·
維護者通常 1 天內回覆