Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

F1: fertility-rate predictor inconcistency between estimation and Java implementation

未關閉
#538 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

@dariaple 已經在處理了。

開始於 2026年10月23日。

評估

這個 Issue 還沒有評估資料。

描述

The UK F1 equation is estimated using a national annual fertility-rate series, but Java evaluates the coefficient using a regional measure derived from population projections. This mismatch remains in develop at commit 971d050, checked on 23 October 2026.

Estimation

The UID construction assigns dukfr by calendar year only, with the label "UK General fertility rate (ONS)": 02_create_UKHLS_variables.do, lines 1846–1867.

The regression preparation then sets fertilityRate = dukfr (variable_update.do, lines 679–680), and the active F1 probit includes fertilityRate. Thus all observations in the same year receive the same national rate, irrespective of region.

Java implementation

For ordinary simulated persons, the FertilityRate getter instead calls getFertilityRateByRegionYear(getRegion(), getYear()). The lower-case fertilityRate getter delegates to it (lines 4016–4018).

Parameters.java, lines 1932–1960 constructs this as the projected number of children aged zero in the region divided by the projected number of women between the maternity-age limits, currently 18–49 (constants). The getter multiplies this by 1,000.

The coefficient is therefore applied to a different predictor from the one used in estimation: both the geographical variation and the construction differ. This is not a missing per-1,000 conversion, and switching fertility alignment on or off does not make the two predictor definitions consistent. The size of the effect on validation results needs to be assessed after the intended definition is agreed.

Question and proposed resolution

Should F1 be re-estimated using a consistently defined regional fertility-rate series, as suggested in the meeting, or should Java instead use a national predictor consistent with estimation?

Would it make sense to agree on a common definition for estimation and simulation, including the geographical coverage, age range and timing? If this involves changing the predictor used in estimation, I imagine we would also need to re-estimate F1. I would be happy to help check the resulting consistency between Stata and Java.

主要語言
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 摘要。