Skip to content

Revised income estimates#489

Closed
dariaple wants to merge 103 commits into
simpaths:mainfrom
dariaple:revised_income_estimates
Closed

Revised income estimates#489
dariaple wants to merge 103 commits into
simpaths:mainfrom
dariaple:revised_income_estimates

Conversation

@dariaple

Copy link
Copy Markdown
Contributor

this is step 2 of an update to the regression estimates: new reg_income.xlsx

andrewbaxter439 and others added 30 commits January 16, 2026 18:40
…iles

Deleted old validation plot files and uploaded new validation do files.
  Persistence.createEntityManagerFactory(...) was called on every invocation of all three methods. Building a factory is expensive — it validates the schema and sets up a connection pool. Two static fields replace this:
  - emfStartingPopulationPersist — shared by getProcessed() and persistProcessed() (both use getPersistDatabasePath())
  - emfStartingPopulationRun — used by loadStartingPopulation() (uses RunDatabasePath)
  2. loadStartingPopulation() — bug fix for LazyInitializationException
  With @onetomany collections already marked FetchType.LAZY, returning detached Household objects after em.close() without having initialised benefitUnits or members would throw LazyInitializationException the moment the caller iterated them. The force-initialisation loop triggers the SUBSELECT batch
loads
   within the open session before closing it.

  3. getProcessed() — dead variable removed
  processed_return was assigned the JOIN FETCH result but the method returned processed (the same L1-cached object). The two are identical references, so processed_return.resetDependents() and processed.resetDependents() were equivalent. The dead variable is removed and the call is chained directly. No
  behaviour change.
  -DonorTaxImputation used Math.random() to decide whether a benefit unit receives Universal Credit based on the weighted mean UC receipt across donor candidates. Math.random() draws from Java's global, unseeded Random instance, producing different results on every JVM run regardless of the model's random seed setting.

  -Replaced with SimulationEngine.getRnd().nextDouble(), which draws from the model's seeded Random instance — the same one used throughout the rest of the model. With a fixed seed, UC/Legacy benefit assignment is now deterministic across runs.
  AlignmentAdjustmentFactors fields (30 total):
  - Partnership: adj factor, sim share, target share (same computation)
  - Fertility: adj factor, sim rate, target rate (same computation)
  - In-school: adj factor, sim share, target share — new
  - Utility adj factors × 7 (same computation)
  - Employment shares: 7 × simulated + 7 × target — new
Optimized database hadling and replaced Statistics3 with AlignmentAdjustmentFactors
Remove all remaining hard-coded values (issue simpaths#393)
Replace <h3> with <h2> to solve error in PR simpaths#453.
Introduces a new model parameter `taxDonorUpratingByWage` that, when
enabled, scales simulated household income by the real wage growth index
(TimeSeriesVariable.WageGrowth) before nearest-neighbour matching
against the tax donor database. When disabled (default), the existing
price-growth-only behaviour is preserved. In both cases, imputed
financial flows are deflated back to BASE_PRICE_YEAR (2015) using
price inflation only (TimeSeriesVariable.Inflation).

The option is exposed as a JAS-mine @GUIparameter checkbox in
SimPathsModel, is configurable via YAML (taxDonorUpratingByWage),
and is written to the per-run config output file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Stop applying regression RMSE and random Gaussian draws to the childcare cost (C1b) regression. In the latest estimate update, C1b was no longer included in RMSE. The old value lingered for the sake of code functioning. With this commit, the code is updated accordingly.
dav-sonn and others added 26 commits June 2, 2026 21:38
Restore integration tests with numeric tolerance
-the documentation has been updated accordingly
- resetting alignment time-series factors have slightly changed the model output (mostly fertility process outcome)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…approach

Ported EU alignment approach for inSchool and Fertility processes
…factors

Corrected alignment factors time-series values
Support for actions running with node 20 stops on 16th of September.
yBenAmountMonth is monthly benefit receipt at the benefit-unit level. It comes from the tax-benefit evaluation:
TaxEvaluation.getBenefitsReceivedPerMonth().

old assignment was mismatched:
    yPensYear = chosenEval.benefitsReceivedPerMonth;
It put a monthly benefit-transfer value into the annual pension-income variable.
revised typo in a regressor used in social care module , and changed suffix "Excel" to "Excellent"
Correct a misspelling of the identifier careMarketMixedPsrtner to careMarketMixedPartner in Person.java.
updated reg_income.xlsx
@dariaple dariaple requested review from Mariia-Var and dav-sonn June 11, 2026 15:23
@dav-sonn

Copy link
Copy Markdown
Collaborator

this is step 2 of an update to the regression estimates: new reg_income.xlsx

@dariaple you opened the PR into main, while I guess it was intended into develop. If it's indeed the case, could you please close it and reopen the correct one?

@dav-sonn dav-sonn closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants