Skip to content

Feature/uc effects mental health#161

Closed
andrewbaxter439 wants to merge 61 commits intosimpaths:developfrom
MRC-CSO-SPHSU:feature/uc-effects-mental-health
Closed

Feature/uc effects mental health#161
andrewbaxter439 wants to merge 61 commits intosimpaths:developfrom
MRC-CSO-SPHSU:feature/uc-effects-mental-health

Conversation

@andrewbaxter439
Copy link
Copy Markdown
Collaborator

What

  • adds a process for UC affecting the mental health of benefit recipients

Why

@andrewbaxter439 andrewbaxter439 requested a review from Copilot March 28, 2025 14:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a simulation process for UC affecting mental health outcomes by extending models and tests to support UC-specific benefit flags.

  • Enhances PersonTest with additional test scenarios for Health MCS stage 2.
  • Extends the Person and BenefitUnit classes with new fields and methods to track UC and non-UC benefits.
  • Updates Parameters to include UC-related variables and regression coefficient loading for health models.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
src/test/java/simpaths/model/PersonTest.java Adds test scenarios and data classes for Health MCS stage 2 simulations.
src/main/java/simpaths/model/Person.java Introduces new constructors and benefit flag variables/methods for UC.
src/main/java/simpaths/model/BenefitUnit.java Implements new method (setReceivesBenefitsFlagUCNonUC) to set UC and non-UC flags.
src/main/java/simpaths/data/Parameters.java Adds UC parameters and adjusts regression parameter loading for Health MCS2.

@andrewbaxter439 andrewbaxter439 requested a review from Copilot June 3, 2025 14:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new process for simulating the impact of Universal Credit (UC) on the mental health of benefit recipients while updating various tax, benefit, and parameter handling mechanisms. Key changes include:

  • Adding parameterized tests for MCS score evaluation in PersonTest.java.
  • Modifying tax and benefit unit classes to aggregate and impute UC and legacy benefit flags.
  • Updating configuration files and parameters to support toggling of UC rollout.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/test/java/simpaths/model/PersonTest.java Adds tests for Health MCS stage 2 using parameterized scenarios.
src/main/java/simpaths/model/taxes/database/TaxDonorDataParser.java Aggregates UC and legacy benefit flags from donor persons.
src/main/java/simpaths/model/taxes/DonorTaxUnitPolicy.java Introduces new fields and accessors for UC and legacy benefits.
src/main/java/simpaths/model/taxes/DonorTaxImputation.java Implements temporary weighted probability logic for UC imputation.
src/main/java/simpaths/model/DonorPersonPolicy.java Adds columns and helper methods to calculate UC and legacy benefits.
src/main/java/simpaths/model/TaxEvaluation.java Propagates new UC/legacy benefit flags via additional getters.
src/main/java/simpaths/model/Person.java Adds new constructors, fields, and lag updates for UC flags.
src/main/java/simpaths/experiment/SimPathsMultiRun.java Reorders YAML config processing to remove duplicate processing.
src/main/java/simpaths/experiment/SimPathsCollector.java Adjusts statistics collection by correcting ordering and duplicate imports.
src/main/java/simpaths/data/Parameters.java Updates parameter arrays and adds UC rollout flag along with new parameters.
config/uc_on.yml & config/no_uc.yml Introduces configuration toggles to enable/disable UC rollout.

@andrewbaxter439
Copy link
Copy Markdown
Collaborator Author

Update

This is becoming too big a pull request. Ideally will still be possible to have UC effects synced with main SimPaths branches rather than keep this one aside and still working.

Actions

  • rebase onto develop branch
  • Split into more incremental PRs from cherry-picked commits; discard duplicated commits and changes
  • identify where bugs are introduced

To examine

  • Integration tests/tests with run persist are taking >1hr in this PR, normally ~25mins. Delay in second initialising pop:
Found processed dataset - preparing for simulation
Number of simulated individuals (persons.size()) is 18879 living in 10891 simulated benefitUnits.
Time to create initial population structures: 3672.552 seconds.
Scaling factor is 3531.948757217198
Time to complete initialisation 61.278083333333335 minutes.

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.

2 participants