Corrected alignment factors time-series values#483
Conversation
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)
There was a problem hiding this comment.
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
Parameterstime-series loaders to useeconomic_time_series.xlsxandalignment_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 == 2to define students (isStudent) and documents that in the new metadata sheet. However other alignment target scripts in the same folder treat students aslabc4 == 4(e.g.,90_person_risk_employment_stats.dosetsstudent = (labc4 == 4)and01_employment_shares_initpopdata.doexcludeslabc4 == 4in its at-risk definition). Please reconcile the coding oflabc4across 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.
| | `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 | |
| 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 | ||
|
|
There was a problem hiding this comment.
I'm not sure Copilot is right here, but you might want to check this too @Mariia-Var.
There was a problem hiding this comment.
@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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.