Repository navigation
Consumption model update following validation - #544
Merged
dav-sonn merged 5 commits intoOct 23, 2026
Merged
Conversation
Add age-specific income slopes, student status and the centred consumption trend. Install the matching FW1a coefficients, covariance and residual RMSE estimated from benefit-unit own income and expenditure after local tax. Include standalone Stata construction/estimation scripts, portable three-run validation and synthetic Stata prediction fixtures. Preserve unrelated configuration, database setup and cash-income/donor-matching behaviour.
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Synthetic prediction parity is supported, but end-to-end simulation effects of the recalibrated consumption model remain unverified.
No open issues 🎉
What changed in this PR
Updates SimPaths’ consumption regression support for the revised model, adding age-specific income slopes and a reference-adult student indicator while retaining common quadratic curvature.
Changes:
- Adds age–income interactions, student status and a centred year trend that preserves the existing freeze.
- Adds 700 synthetic Stata fixtures and a script to regenerate them.
- Adds regression parity tests and checks for age boundaries, income flooring and trend freezing.
| File | Description |
|---|---|
src/test/stata/export_consumption_fixtures.do |
Exports deterministic predictions from saved Stata estimates. |
src/test/resources/simpaths/model/consumption_stata_fixtures.csv |
Supplies 700 reference prediction cases. |
src/test/java/simpaths/model/ConsumptionRegressionTest.java |
Checks prediction parity and regressor boundary behavior. |
src/main/java/simpaths/model/BenefitUnit.java |
Exposes the revised consumption regressors. |
Review effort: Balanced
dav-sonn
reviewed
Oct 23, 2026
dav-sonn
left a comment
Collaborator
There was a problem hiding this comment.
@LiangShi369: the check on the integration tests is failing. If the implemented changes are meant to change the outputs, then the integration tests should be updated accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update adds age-specific log-income slopes and a reference-adult student indicator, retaining log broad expenditure, the existing 14 age groups, common quadratic curvature and other controls.
The updated input/regression_files/reg_wealth_financial.xlsx, sheet FW1a, contains all 65 coefficients and the full covariance matrix. The matching RMSE is 0.6457928727473985 in input/regression_files/reg_RMSE.xlsx, sheet UK, entry FW1a. Other regression processes and the cash-income and donor-matching algorithms are unchanged.
We also revised the LCFS dataset used for estimation and validation:
@justin-ven: The UKHLS initial-population scripts already aggregate constructed personal incomes within benefit units. Could you advise whether their disposable-income measure also needs adjustment for Council Tax/domestic rates, and whether this would require regenerating the initial populations?
The preparation and estimation scripts, validation materials and detailed documentation are maintained separately on our Box drive:
I am completing the wealth-module documentation, including the revised consumption-modelling section and a new consumption-validation section.