Skip to content

Addressed boundary solution issues in UK employment alignment#333

Open
LiangShi369 wants to merge 7 commits intodevelop_LS_PortEmploymentAlignmentfrom
MV-fix-EmploymentAlignment_boundarySolution
Open

Addressed boundary solution issues in UK employment alignment#333
LiangShi369 wants to merge 7 commits intodevelop_LS_PortEmploymentAlignmentfrom
MV-fix-EmploymentAlignment_boundarySolution

Conversation

@LiangShi369
Copy link

I have made following changes to SimPath Java code and Stata code:

For the simulation side:

Root causes of boundary roots after employment alignment:

  1. Regression objects were built once and did not refresh when coefficient maps changed.
  2. Single_Dep shares used BU‑level fracEmployed() (male+female / total), capping share at ~0.5.
  3. Alignment for Single_DepMales/Females used fixed‑cost regressors or constant‑like terms, not affecting choice probabilities in fast path.

Key fixes:

  1. Refresh regressions after coefficient updates
    • Parameters.refreshLabourSupplyUtilityRegression(...) added and called from ActivityAlignmentV2.adjustCoefficients(...).
  2. Single_Dep share computed partner‑specific
    • In ActivityAlignmentV2.computeSimulatedShareUsingFraction(...), Single_DepMales uses male employment rate; Single_DepFemales uses female employment rate.
  3. New alignment‑only regressors
    • AlignmentSingleDepMen, AlignmentSingleDepWomen added to BenefitUnit.Regressors.
    • Defined in BenefitUnit.getDoubleValue(...):
      • Men: couple, male at risk, female not, male employed.
      • Women: couple, female at risk, male not, female employed.
    • Subtracted in computeUtilityRegressionScoreWithoutFC(...), added back in updateFixedCostsAndLabour(...).
  4. Single_Dep alignment switched to new regressors
    • SimPathsModel.activityAlignmentSingleDepMale/Female() uses AlignmentSingleDepMen/Women.
  5. Subgroup-specific bounds
    • activityAlignment(...) now uses:
      • Couples: MAX_EMPLOYMENT_ALIGNMENT * 12
      • Single_DepMales: * 20
      • Single_DepFemales: * 20
      • Others: * 1
  6. Comments added explaining rationale (bounds, refresh, single‑dep share logic).

For the data side:

  1. 01_employment_shares_initpopdata do-file calculates the employment ratio of male/female in BUs that only one person is at risk of work:
    bu_fracemployed = bu_male_emp / (number of SingleDep_Males/Females BUs),
    Notice that unlike EU model, the UK model defines "at risk of work" additionally with "careNeedFlag!=1".

  2. 02_person_risk_employment_stats do-file calculates employment statistics for all 7 categories (couple, single_male, single_female, singleDep_Males, singleDep_Females, singleAC_males and singleAC_females). It shows there are persons long-term disabled but employed, and persons need care but employed.

…the JAS-MINE core already update regression coefficient during employment alignment, hence I remove refreshLabourSupplyUtilityRegression(...) method in the Parameters class.
… little bit

  - Employment alignment now warm-starts from previous year’s solved adjustment when year > startYear; otherwise it uses current-year configured value.
  - Added inline comments explaining purpose and behaviour.
1. use new initial population to calculate employment targets, hence singleDep_male/female have the same alignment target variable as other groups. Simulation code is modified accordingly.
2. Add warm-start and search boundary adjustments as in the inSchool alignment.
3. Integration test 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.

1 participant