Skip to content

Corrected alignment factors time-series values#483

Merged
Mariia-Var merged 6 commits into
simpaths:developfrom
Mariia-Var:MV-correct_alignment_factors
Jun 3, 2026
Merged

Corrected alignment factors time-series values#483
Mariia-Var merged 6 commits into
simpaths:developfrom
Mariia-Var:MV-correct_alignment_factors

Conversation

@Mariia-Var

Copy link
Copy Markdown
Collaborator

No description provided.

Delete the unused code that still pointed to align_employment.xlsx and align_student_under30.xlsx.
- reset fertility and cohabitation ajustment factors to zero
- resetting alignment time-series factors have slightly changed the model output (mostly fertility process outcome)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates SimPaths alignment inputs/outputs by re-pointing Java parameter loading to the newer alignment/economic time-series workbooks, removing the legacy employment-alignment time-series hook, and refreshing integration-test expected CSVs to match the corrected series values.

Changes:

  • Update Parameters time-series loaders to use economic_time_series.xlsx and alignment_adjustment_series.xlsx, and rename several target workbooks (alignment_targets_*.xlsx).
  • Remove the deprecated employment-alignment time-series variable and the old employmentAlignment() resampling method.
  • Refresh integration-test expected statistics/alignment CSV snapshots and add/adjust Stata target-generation scripts + documentation.

Reviewed changes

Copilot reviewed 15 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/java/simpaths/integrationtest/expected/Statistics21.csv Updates expected time-series outputs for integration tests.
src/test/java/simpaths/integrationtest/expected/Statistics1.csv Updates expected distribution/statistics outputs for integration tests.
src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv Updates expected health statistics outputs for integration tests.
src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv Updates expected employment stats outputs for integration tests.
src/test/java/simpaths/integrationtest/expected/AlignmentAdjustmentFactors1.csv Updates expected alignment adjustment factors time-series outputs.
src/main/java/simpaths/model/SimPathsModel.java Removes legacy employment alignment resampling method.
src/main/java/simpaths/model/enums/TimeSeriesVariable.java Removes EmploymentAlignment enum value.
src/main/java/simpaths/data/Parameters.java Switches to new workbook names/sheets for economic + alignment adjustment series; removes old maps/getters.
input/DoFilesTarget/90_person_risk_employment_stats.do Adds a new Stata script to compute person-level risk/employment diagnostics (CSV export).
input/DoFilesTarget/03b_calculate_partnership_target.do Renames output workbook and adds provenance metadata sheet.
input/DoFilesTarget/03a_calculate_partneredShare_initialPop_BUlogic.do Renames output workbook and adds provenance metadata sheet.
input/DoFilesTarget/02_inSchool_targets_initpopdata.do Renames output workbook and adds provenance metadata sheet.
input/DoFilesTarget/01_employment_shares_initpopdata.do Renames output workbook and adds provenance metadata sheet.
documentation/wiki/developer-guide/repository-guide.md Updates input filenames; needs script-name table correction.
documentation/repository-guide.md Updates input filenames; needs script-name table correction.
CLAUDE.md Updates documentation reference to inflation series workbook/sheet.
Comments suppressed due to low confidence (1)

input/DoFilesTarget/02_inSchool_targets_initpopdata.do:113

  • The Stata code uses labc4 == 2 to define students (isStudent) and documents that in the new metadata sheet. However other alignment target scripts in the same folder treat students as labc4 == 4 (e.g., 90_person_risk_employment_stats.do sets student = (labc4 == 4) and 01_employment_shares_initpopdata.do excludes labc4 == 4 in its at-risk definition). Please reconcile the coding of labc4 across these scripts; otherwise the generated targets/diagnostics will be internally inconsistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread documentation/wiki/developer-guide/repository-guide.md Outdated
Comment on lines +362 to 366
| `01_employment_shares_initpopdata.do` | `input/alignment_targets_employment.xlsx` — employment shares by benefit-unit subgroup and year |
| `01_inSchool_targets_initpopdata.do` | `input/alignment_targets_inSchool.xlsx` — school participation rates by year |
| `03_calculate_partneredShare_initialPop_BUlogic.do` | `input/alignment_targets_partnered_share.xlsx` — partnership shares by year |
| `03_calculate_partnership_target.do` | Supplementary partnership targets |
| `02_person_risk_employment_stats.do` | `employment_risk_emp_stats.csv` — person-level at-risk diagnostics used for employment alignment group construction |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And this one (@Mariia-Var).

Comment on lines 173 to 177
sort year

* Create/overwrite Excel file that will hold all sheets
putexcel set "${dir_output}/employment_targets.xlsx", replace
putexcel set "${dir_output}/alignment_targets_employment.xlsx", replace

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure Copilot is right here, but you might want to check this too @Mariia-Var.

@Mariia-Var Mariia-Var Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dav-sonn,
yes, no changes needed;
In Stata, replace automatically widens a string variable's storage type when the new value is longer — so str7/str6 get promoted to fit "Single_female", "SingleDep_Females", etc

I will proceed with approving this PR.

Mariia-Var and others added 2 commits June 3, 2026 17:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Mariia-Var Mariia-Var merged commit eab2def into simpaths:develop Jun 3, 2026
6 checks passed
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.

3 participants