Skip to content

Fix inSchool alignment boundary solution issues#339

Open
LiangShi369 wants to merge 3 commits intoMV-fix-edu-modulefrom
LS-fix-inSchool-alignment-boundarySolutions
Open

Fix inSchool alignment boundary solution issues#339
LiangShi369 wants to merge 3 commits intoMV-fix-edu-modulefrom
LS-fix-inSchool-alignment-boundarySolutions

Conversation

@LiangShi369
Copy link

Previously this branch is called "education alignment", however, it is dedicated to "in school alignment" as defined by
private boolean alignInSchool = true; //Set to true to align share of students among 16-29 age group
in the SimPathsModel class.

I made following fixes:

  1. The alignment target should be the share of students among 16-29 age group. Therefore, I modified the Stata do-file line 61-62 to calculate the correct share, and the InSchoolAlignment class line 77-86 to compute the correct simulated share.
  2. InSchoolAlignment line 49: In evaluate(double[] args), each person is reset to Les_c4_lag1 before calling person.inSchool(args[0]). This prevents the previous trial state (in root finding) to contaminate the current trial.
  3. Person line 1585. I added guard if (demAge > MAX_AGE_TO_ENTER_EDUCATION) return false;, hence person with age >= 29 would not return to education. Perhaps we can revise the relevant flowchart.
  4. Warm-start in-school alignment from previous solved year. This strategy reduces the number of iterations in root finding. Specifically, in SimPathsModel line 2113, initial adjustment for inSchool alignment is:

I also added some diagnotics to show the root finding process during the alignment.

@LiangShi369
Copy link
Author

I tried running the simulation without "fix 3", and the alignment looks very good. In fact, the parameter MAX_AGE_TO_ENTER_EDUCATION is no longer used in the simulation.

In our do files (Box\CeMPA shared area_SimPaths_SimPathsUK\input data preparation_Darias backup folder_keep for now\regression_estimates\do), the probability of returning education if condition does not rule out people whose age are greater than MAX_AGE_TO_ENTER_EDUCATION.

@matteorichiardi
Copy link
Contributor

@dariaple and @ANBurdett can confirm, but I recall that the removal of max age from the filtering conditions of returning to education was intentional.
@dav-sonn @ @Mariia-Var can you please double check that the code is consistent with (this and all) filtering conditions?
Also, we need to establish a practice so that when a filtering condition is changed, the related flow diagrams are also changed.
Liang is currently in charge of the flow diagrams, so please let him know.

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