diff --git a/input/DatabaseCountryYear.xlsx b/input/DatabaseCountryYear.xlsx index cddc317cf..72299e737 100644 Binary files a/input/DatabaseCountryYear.xlsx and b/input/DatabaseCountryYear.xlsx differ diff --git a/src/main/java/simpaths/model/InSchoolAlignment.java b/src/main/java/simpaths/model/InSchoolAlignment.java new file mode 100644 index 000000000..803596edf --- /dev/null +++ b/src/main/java/simpaths/model/InSchoolAlignment.java @@ -0,0 +1,76 @@ +package simpaths.model; + +import microsim.engine.SimulationEngine; +import simpaths.data.IEvaluation; +import simpaths.data.Parameters; +import simpaths.model.enums.Les_c4; +import simpaths.model.enums.TargetShares; + +import java.util.Set; + + +/** + * InSchoolAlignment adjusts the probability of being a student. + * The object is designed to assist modification of the intercept of the "inSchool" models. + * + * A search routine is used to find the value by which the intercept should be adjusted. + * If the projected share of students in the population differs from the desired target by more than a specified threshold, + * then the intercept is adjusted and the share re-evaluated. + * + * Importantly, the adjustment needs to be only found once. Modified intercepts can then be used in subsequent simulations. + */ +public class InSchoolAlignment implements IEvaluation { + + private double targetStudentShare; + private Set persons; + private SimPathsModel model; + + + // CONSTRUCTOR + public InSchoolAlignment(Set persons) { + this.model = (SimPathsModel) SimulationEngine.getInstance().getManager(SimPathsModel.class.getCanonicalName()); + this.persons = persons; + targetStudentShare = Parameters.getTargetShare(model.getYear(), TargetShares.Students); + } + + + /** + * Evaluates the discrepancy between the simulated and target total student share and adjusts probabilities if necessary. + * + * This method focuses on the influence of the adjustment parameter 'args[0]' on the difference between the target and + * simulated student share (error). + * + * The error value is returned and serves as the stopping condition in root search routines. + * + * @param args An array of parameters, where args[0] represents the adjustment parameter. + * @return The error in the target aggregate share of students after potential adjustments. + */ + @Override + public double evaluate(double[] args) { + + persons.parallelStream() + .forEach(person -> person.inSchool(args[0])); + + return targetStudentShare - evalStudentShare(); + } + + + /** + * Evaluates the aggregate share of students. + * + * This method uses Java streams to count the number of students over the total number of individuals. + * + * @return The aggregate share of partnered persons among those eligible, or 0.0 if no eligible persons are found. + */ + private double evalStudentShare() { + + long numStudents = model.getPersons().stream() + .filter(person -> (!person.isToLeaveSchool() && !Les_c4.EmployedOrSelfEmployed.equals(person.getLes_c4()) && !Les_c4.NotEmployed.equals(person.getLes_c4()) && !Les_c4.Retired.equals(person.getLes_c4()))) // count number of students who are not supposed to leave school + .count(); + long numPeople = model.getPersons().stream() + .filter(person -> person.getLes_c4() != null) + .count(); + + return (numStudents > 0) ? (double) numStudents / numPeople : 0.0; + } +} diff --git a/src/main/java/simpaths/model/Person.java b/src/main/java/simpaths/model/Person.java index b965464a2..af60fb27c 100644 --- a/src/main/java/simpaths/model/Person.java +++ b/src/main/java/simpaths/model/Person.java @@ -26,7 +26,7 @@ import java.math.RoundingMode; import java.util.*; -import static simpaths.data.Parameters.getUnemploymentRateByGenderEducationAgeYear; +import static simpaths.data.Parameters.*; @Entity public class Person implements EventListener, IDoubleSource, IIntSource, Weight, Comparable { @@ -75,6 +75,7 @@ public class Person implements EventListener, IDoubleSource, IIntSource, Weight, @Enumerated(EnumType.STRING) private Education eduHighestFatherC3; //Father's education level @Enumerated(EnumType.STRING) private Ethnicity demEthnC6; //Ethnicity @Enumerated(EnumType.STRING) private Indicator eduSpellFlag; // in continuous education + @Enumerated(EnumType.STRING) private Indicator eduSpellFlagL1; // in continuous education @Enumerated(EnumType.STRING) private Indicator eduReturnFlag; // return to education @Enumerated(EnumType.STRING) private Les_c4 labC4; //Activity (employment) status @Enumerated(EnumType.STRING) private Les_c7_covid labC7Covid; //Activity (employment) status used in the Covid-19 models @@ -288,6 +289,8 @@ public Person(Gender gender, Person mother) { benefitUnit = mother.benefitUnit; idBu = benefitUnit.getId(); demAge = 0; + eduSpellFlag = Indicator.True ; + eduReturnFlag = Indicator.False; wgt = mother.getWgt(); //Newborn has same weight as mother (the number of newborns will then be aligned in fertility alignment) healthSelfRated = Dhe.VeryGood; healthWbScore0to36 = 9.; //Set to median for under 18's as a placeholder @@ -356,12 +359,19 @@ public Person (Person originalPerson, long statSeed, SampleEntry demEnterSample) eduHighestMotherC3 = originalPerson.eduHighestMotherC3; eduHighestPartnerC3L1 = originalPerson.eduHighestC3L1; + // set eduSpellFlag if (originalPerson.demAge < Parameters.MIN_AGE_TO_LEAVE_EDUCATION) { //If under age to leave education, set flag for being in education to true eduSpellFlag = Indicator.True; } else { eduSpellFlag = originalPerson.eduSpellFlag; } + if (originalPerson.eduSpellFlagL1 != null) { //If original person misses lagged level of education, assign current level of education + eduSpellFlagL1 = originalPerson.eduSpellFlagL1; + } else { + eduSpellFlagL1 = eduSpellFlag; + } + eduReturnFlag = originalPerson.eduReturnFlag; demPartnerNYear = Objects.requireNonNullElse(originalPerson.demPartnerNYear,0); demPartnerNYearL1 = Objects.requireNonNullElseGet(originalPerson.demPartnerNYearL1, () -> Math.max(0, this.demPartnerNYear - 1)); @@ -383,7 +393,7 @@ public Person (Person originalPerson, long statSeed, SampleEntry demEnterSample) else if (demAge > Parameters.MAX_AGE_TO_LEAVE_CONTINUOUS_EDUCATION) eduLeftEduFlag = true; else - eduLeftEduFlag = (!Les_c4.Student.equals(labC4)); + eduLeftEduFlag = (!Les_c4.Student.equals(labC4) || (Les_c4.Student.equals(labC4) && eduSpellFlag.equals(Indicator.False))) ; if (originalPerson.labC4L1 != null) { //If original persons misses lagged activity status, assign current activity status labC4L1 = originalPerson.labC4L1; @@ -1507,50 +1517,132 @@ protected void partnershipDissolution() { } } - protected void inSchool() { - double labourInnov = statInnovations.getDoubleDraw(24); - //Min age to leave education set to 16 (from 18 previously) but note that age to leave home is 18. - if (Les_c4.Retired.equals(labC4) || demAge < Parameters.MIN_AGE_TO_LEAVE_EDUCATION || demAge > Parameters.MAX_AGE_TO_ENTER_EDUCATION) { //Only apply module for persons who are old enough to consider leaving education, but not retired - return; - } else if (Les_c4.Student.equals(labC4) && !eduLeftEduFlag && demAge >= Parameters.MIN_AGE_TO_LEAVE_EDUCATION) { //leftEducation is initialised to false and updated to true when individual leaves education (and never reset). - //If age is between 16 - 29 and individual has always been in education, follow process E1a: + public boolean inSchool() { + double probitAdjustment = (model.isAlignInSchool()) ? Parameters.getTimeSeriesValue(getYear(), TimeSeriesVariable.InSchoolAdjustment) : 0.0; + return inSchool(probitAdjustment); + } - if (demAge <= Parameters.MAX_AGE_TO_LEAVE_CONTINUOUS_EDUCATION) { - double prob = Parameters.getRegEducationE1a().getProbability(this, Person.DoublesVariables.class); - eduLeaveSchoolFlag = (labourInnov >= prob); //If event is true, stay in school. If event is false, leave school. - } else { - eduLeaveSchoolFlag = true; //Hasn't left education until 30 - force out - } - } else if (demAge <= 45 && (!Les_c4.Student.equals(labC4) || eduLeftEduFlag)) { //leftEducation is initialised to false and updated to true when individual leaves education for the first time (and never reset). - //If age is between 16 - 45 and individual has not continuously been in education, follow process E1b: - //Either individual is currently a student and has left education at some point in the past (so returned) or individual is not a student so has not been in continuous education: - //TODO: If regression outcome of process E1b is true, set activity status to student and der (return to education indicator) to true? + public boolean inSchool(double probitAdjustment) { + // Documentation: diagram "SimPathsEU education module - MR2" - double prob = Parameters.getRegEducationE1b().getProbability(this, Person.DoublesVariables.class); - if (labourInnov < prob) { - //If event is true, re-enter education. If event is false, leave school + eduLeaveSchoolFlag = false; - setLes_c4(Les_c4.Student); - setDer(Indicator.True); - setDed(Indicator.True); - } else if (Les_c4.Student.equals(labC4)){ - //If activity status is student but regression to be in education was evaluated to false, remove student status + // Innovation for education decisions + double labourInnov = statInnovations.getDoubleDraw(24); - setLes_c4(Les_c4.NotEmployed); - setDed(Indicator.False); - eduLeaveSchoolFlag = true; //Test what happens if people who returned to education leave again + // Initial case (laggedStudent): In the previous period, was the individual a student? + // Yes + if (Les_c4.Student.equals(labC4L1)) { + + // Is the age of the individual above the minimum age to leave education (age >= minQuittingAge)? + // Yes + if (demAge >= MIN_AGE_TO_LEAVE_EDUCATION) { + // Is the age of the individual below the max age to leave education (age < maxQuittingAge)? + // Yes + if (demAge <= MAX_AGE_TO_LEAVE_CONTINUOUS_EDUCATION) { + // --> process E1a + double score = Parameters.getRegEducationE1a().getScore(this, Person.DoublesVariables.class); + double prob = Parameters.getRegEducationE1a().getProbability(score + probitAdjustment); + + if (labourInnov < prob) { + // Remain a student *OUTCOME B* + setLes_c4(Les_c4.Student); //not needed, more of a precaution + //setDed(Indicator.True); //(!) a bug; E1a is applied to everyone with Ded true and false + //setDer(Indicator.False); //(!) a bug; Der is set to true only when individual re-enters education (i.e. process E1b) + return true; // Must return true as they remain in school + } else { + // Leave education --> Process E2 + eduLeaveSchoolFlag = true; // Must set flag to true + return false; // Must return false as they are leaving + } + } + // No (demAge > MAX_AGE_TO_LEAVE_CONTINUOUS_EDUCATION) + else { + // Leave education --> Process E2 + eduLeaveSchoolFlag = true; // Must set flag to true + return false; // Must return false as they are leaving + } + } + // No (demAge < MIN_AGE_TO_LEAVE_EDUCATION) + else { + return true; // The individual remains a student *OUTCOME A* + } + } + + // No (Not a Student in labC4L1) + else { + // In the previous period, was the individual a retired (laggedRetired)? + // Yes + if (Les_c4.Retired.equals(labC4L1)) { + return false; // The individual can't be a student *OUTCOME C* + // Remain in current status which is retired + } + + // No --> Process E1b + else { + double score = Parameters.getRegEducationE1b().getScore(this, Person.DoublesVariables.class); + double prob = Parameters.getRegEducationE1b().getProbability(score + probitAdjustment); + + if (labourInnov < prob) { + // Become a student *OUTCOME E* + setLes_c4(Les_c4.Student); + setDer(Indicator.True); + setDed(Indicator.False); //not needed, more of a precaution as ded should already be false + return true; // Must return true as they become a student + } else { + return false; + } } - } else if (demAge > 45 && labC4.equals(Les_c4.Student)) { - //People above 45 shouldn't be in education, so if someone re-entered at 45 in previous step, force out - setLes_c4(Les_c4.NotEmployed); - setDed(Indicator.False); } } - protected void leavingSchool() { + + + +// //Min age to leave education set to 16 (from 18 previously) but note that age to leave home is 18. +// if (Les_c4.Retired.equals(labC4) || demAge < Parameters.MIN_AGE_TO_LEAVE_EDUCATION || demAge > Parameters.MAX_AGE_TO_ENTER_EDUCATION) { //Only apply module for persons who are old enough to consider leaving education, but not retired +// return; +// } else if (Les_c4.Student.equals(labC4) && !eduLeftEduFlag && demAge >= Parameters.MIN_AGE_TO_LEAVE_EDUCATION) { //leftEducation is initialised to false and updated to true when individual leaves education (and never reset). +// //If age is between 16 - 29 and individual has always been in education, follow process E1a: +// +// if (demAge <= Parameters.MAX_AGE_TO_LEAVE_CONTINUOUS_EDUCATION) { +// +// double prob = Parameters.getRegEducationE1a().getProbability(this, Person.DoublesVariables.class); +// eduLeaveSchoolFlag = (labourInnov >= prob); //If event is true, stay in school. If event is false, leave school. +// } else { +// eduLeaveSchoolFlag = true; //Hasn't left education until 30 - force out +// } +// } else if (demAge <= 45 && (!Les_c4.Student.equals(labC4) || eduLeftEduFlag)) { //leftEducation is initialised to false and updated to true when individual leaves education for the first time (and never reset). +// //If age is between 16 - 45 and individual has not continuously been in education, follow process E1b: +// //Either individual is currently a student and has left education at some point in the past (so returned) or individual is not a student so has not been in continuous education: +// //TODO: If regression outcome of process E1b is true, set activity status to student and der (return to education indicator) to true? +// +// double prob = Parameters.getRegEducationE1b().getProbability(this, Person.DoublesVariables.class); +// if (labourInnov < prob) { +// //If event is true, re-enter education. If event is false, leave school +// +// setLes_c4(Les_c4.Student); +// setDer(Indicator.True); +// setDed(Indicator.True); +// } else if (Les_c4.Student.equals(labC4)){ +// //If activity status is student but regression to be in education was evaluated to false, remove student status +// +// setLes_c4(Les_c4.NotEmployed); +// setDed(Indicator.False); +// eduLeaveSchoolFlag = true; //Test what happens if people who returned to education leave again +// } +// } else if (demAge > 45 && labC4.equals(Les_c4.Student)) { +// //People above 45 shouldn't be in education, so if someone re-entered at 45 in previous step, force out +// +// setLes_c4(Les_c4.NotEmployed); +// setDed(Indicator.False); +// } +// } + + public void leavingSchool() { if (eduLeaveSchoolFlag) { @@ -1814,8 +1906,12 @@ public boolean atRiskOfWork() { // Note that persons are now assigned a Low education level by default at birth (to prevent null pointer exceptions when persons become old enough to marry while still being a student // (we now allow students to marry, given they can re-enter school throughout their lives). // The module only applies to students who are leaving school (activityStatus == Student and toLeaveSchool == true) - see inSchool() - private void setEducationLevel() { + public void setEducationLevel() { + + // Process E2 + // --- Step 1: Regression Result --- + // The regression determines the highest possible qualification achieved this spell. Map probs = Parameters.getRegEducationE2a().getProbabilities(this, Person.DoublesVariables.class); MultiValEvent event = new MultiValEvent(probs, statInnovations.getDoubleDraw(30)); Education newEducationLevel = (Education) event.eval(); @@ -1824,6 +1920,8 @@ private void setEducationLevel() { //This is because we no longer prevent people in school to get married, given that people can re-enter education throughout their lives. //Note that by not filtering out students, we must assign a low education level by default to persons at birth to prevent a null pointer exception when new born persons become old enough to marry if they have not yet left school because //their education level has not yet been assigned. + + // --- Step 2: Update counters based on regression result --- if (newEducationLevel.equals(Education.Low)) { model.lowEd++; } else if (newEducationLevel.equals(Education.Medium)) { @@ -1833,13 +1931,15 @@ private void setEducationLevel() { } else { model.nothing++; } + + // --- Step 3: process E2 in the diagaram --- if(eduHighestC3 != null) { if(newEducationLevel.ordinal() > eduHighestC3.ordinal()) { //Assume Education level cannot decrease after re-entering school. eduHighestC3 = newEducationLevel; } - } else { - eduHighestC3 = newEducationLevel; - } + } /*else { + // retain old level -> deh_c3 remains the same + }*/ } public double getLiquidWealth() { @@ -1875,7 +1975,8 @@ protected void updateVariables(boolean initialUpdate) { demGiveBirthFlag = false; demBePartnerFlag = false; demLeavePartnerFlag = false; - eduSpellFlag = (Les_c4.Student.equals(labC4)) ? Indicator.True : Indicator.False; + // eduSpellFlag = (Les_c4.Student.equals(labC4)) ? Indicator.True : Indicator.False; + if (initialUpdate && !Parameters.checkFinite(careHrsFromParentWeek)) careHrsFromParentWeek = 0.0; if (demAge { return (Indicator.True.equals(eduSpellFlag)) ? 1.0 : 0.0; } + case Ded_L1 -> { + return (double) eduSpellFlagL1.getValue() ; + } case Deh_c3_High -> { return (Education.High.equals(eduHighestC3)) ? 1.0 : 0.0; } @@ -4207,10 +4313,19 @@ public Indicator getDed() { return eduSpellFlag; } + public Indicator getDed_lag1() { + return eduSpellFlagL1; + } + public void setDed(Indicator eduSpellFlag) { this.eduSpellFlag = eduSpellFlag; } + public void setDed_lag1(Indicator eduSpellFlagL1) { + this.eduSpellFlagL1 = eduSpellFlagL1; + } + + public int getLowEducation() { if(eduHighestC3 != null) { if (eduHighestC3.equals(Education.Low)) return 1; @@ -4629,6 +4744,10 @@ public void setDer(Indicator eduReturnFlag) { this.eduReturnFlag = eduReturnFlag; } + public Indicator getDer() {return eduReturnFlag;} + + public Indicator getSedex() {return eduExitSampleFlag;} + public Long getIdOriginalPerson() { return idPersOriginal; } diff --git a/src/main/java/simpaths/model/SimPathsModel.java b/src/main/java/simpaths/model/SimPathsModel.java index d8eeb7cbc..2310cb5bd 100644 --- a/src/main/java/simpaths/model/SimPathsModel.java +++ b/src/main/java/simpaths/model/SimPathsModel.java @@ -2108,60 +2108,14 @@ public void resample(Person person) { */ private void inSchoolAlignment() { - int numStudents = 0; - int num16to29 = 0; - ArrayList personsLeavingSchool = new ArrayList(); - for (Person person : persons) { - if (person.getDemAge() > 15 && person.getDemAge() < 30) { //Could introduce separate alignment for different age groups, but this is more flexible as it depends on the regression process within the larger alignment target - num16to29++; - if (person.getLes_c4().equals(Les_c4.Student)) { - numStudents++; - } - if (person.isToLeaveSchool()) { //Only those who leave school for the first time have toLeaveSchool set to true - personsLeavingSchool.add(person); - } - } - } - - int targetNumberOfPeopleLeavingSchool = numStudents - (int)( (double)num16to29 * ((Number) Parameters.getStudentShareProjections().getValue(country.toString(), year)).doubleValue() ); + InSchoolAlignment inSchoolAlignment = new InSchoolAlignment(persons); + double inSchoolAdjustment = Parameters.getTimeSeriesValue(getYear(), TimeSeriesVariable.InSchoolAdjustment); + RootSearch search = getRootSearch(inSchoolAdjustment, inSchoolAlignment, 1.0E-2, 1.0E-2, 4); // epsOrdinates and epsFunction determine the stopping condition for the search. For inSchoolAlignment error term is the difference between target and observed share of partnered individuals. - System.out.println("Number of students < 30 is " + numStudents + " Persons set to leave school " + personsLeavingSchool.size() + " Number of people below 30 " + num16to29 - + " Target number of people leaving school " + targetNumberOfPeopleLeavingSchool); - - if (targetNumberOfPeopleLeavingSchool <= 0) { - for(Person person : personsLeavingSchool) { - person.setToLeaveSchool(false); //Best case scenario is to prevent anyone from leaving school in this year as the target share of students is higher than the number of students. Although we cannot match the target, this is the nearest we can get to it. - if(Parameters.systemOut) { - System.out.println("target number of school leavers is not positive. Force all school leavers to stay at school."); - } - } - } else if (targetNumberOfPeopleLeavingSchool < personsLeavingSchool.size()) { - if(Parameters.systemOut) { - System.out.println("Schooling alignment: target number of students is " + targetNumberOfPeopleLeavingSchool); - } - new ResamplingAlignment().align( - personsLeavingSchool, - null, - new AlignmentOutcomeClosure() { - @Override - public boolean getOutcome(Person agent) { - return agent.isToLeaveSchool(); - } - - @Override - public void resample(Person agent) { - agent.setToLeaveSchool(false); - } - }, - targetNumberOfPeopleLeavingSchool); - - int numPostAlign = 0; - for(Person person : persons) { - if(person.isToLeaveSchool()) { - numPostAlign++; - } - } - System.out.println("Schooling alignment: aligned number of students is " + numPostAlign); + // update and exit + if (search.isTargetAltered()) { + Parameters.putTimeSeriesValue(getYear(), search.getTarget()[0], TimeSeriesVariable.InSchoolAdjustment); // If adjustment is altered from the initial value, update the map + System.out.println("InSchool adjustment value was " + search.getTarget()[0]); } } @@ -3077,6 +3031,8 @@ public void setAlignInSchool(boolean flag) { alignInSchool = flag; } + public boolean isAlignInSchool() { return alignInSchool; } + public void setYear(int year) { this.year = year; } diff --git a/src/main/java/simpaths/model/enums/TargetShares.java b/src/main/java/simpaths/model/enums/TargetShares.java index f55c602ed..842650040 100644 --- a/src/main/java/simpaths/model/enums/TargetShares.java +++ b/src/main/java/simpaths/model/enums/TargetShares.java @@ -2,6 +2,9 @@ public enum TargetShares { Partnership, + Retirement, + Disability, + Students, EmploymentSingleMales, EmploymentSingleFemales, EmploymentCouples; diff --git a/src/main/java/simpaths/model/enums/TimeSeriesVariable.java b/src/main/java/simpaths/model/enums/TimeSeriesVariable.java index da390cbe6..46c481387 100644 --- a/src/main/java/simpaths/model/enums/TimeSeriesVariable.java +++ b/src/main/java/simpaths/model/enums/TimeSeriesVariable.java @@ -15,5 +15,6 @@ public enum TimeSeriesVariable { UtilityAdjustmentSingleMales, UtilityAdjustmentSingleFemales, UtilityAdjustmentCouples, + InSchoolAdjustment, WageGrowth, } diff --git a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv index c8ef64cab..7e8c4c155 100644 --- a/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/EmploymentStatistics1.csv @@ -1,9 +1,9 @@ run,time,id_EmploymentStatistics1,labEmpShare,labEmpToNotEmpShare,labNotEmpToEmpShare,labUnempShare 1,2019.0,1,0.7375197275521223,0.04822544511260465,0.4428874734607219,0.12592408007309577 -1,2020.0,1,0.7638024076380241,0.013328890369876709,0.26879699248120303,0.10585305105853052 -1,2021.0,1,0.7744079767345243,0.013477377259599957,0.20364741641337386,0.09729954299958454 -1,2022.0,1,0.7832958988436902,0.016548961737113944,0.19237147595356552,0.09458447716496132 +1,2020.0,1,0.6523038605230386,0.01010774186382317,0.23182957393483708,0.08684101286841013 +1,2021.0,1,0.7274615704196095,0.010578638796839153,0.2099712368168744,0.09488990444536768 +1,2022.0,1,0.680891772731054,0.011519716437749225,0.1648,0.080026620081524 2,2019.0,1,0.7375197275521223,0.04822544511260465,0.4428874734607219,0.12592408007309577 -2,2020.0,1,0.7638024076380241,0.013328890369876709,0.26879699248120303,0.10585305105853052 -2,2021.0,1,0.7744079767345243,0.013477377259599957,0.20364741641337386,0.09729954299958454 -2,2022.0,1,0.7832958988436902,0.016548961737113944,0.19237147595356552,0.09458447716496132 \ No newline at end of file +2,2020.0,1,0.6523038605230386,0.01010774186382317,0.23182957393483708,0.08684101286841013 +2,2021.0,1,0.7274615704196095,0.010578638796839153,0.2099712368168744,0.09488990444536768 +2,2022.0,1,0.680891772731054,0.011519716437749225,0.1648,0.080026620081524 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv index 86d6f5ce6..6f14e38ba 100644 --- a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -2,24 +2,24 @@ run,time,id_HealthStatistics1,demLifeSatScore1to7Avg,demLifeSatScore1to7P10,demL 1,2019.0,1,5.082882273342355,3.0,4.0,6.0,6.0,6.0,Total,9845.10078575798,94442.85714285714,47.46016576454639,32.93,41.6125,49.375,54.79,58.05,11824,51.582412043302156,37.85,48.135000000000005,54.8,57.57,60.09,11.508203653585927,6.0,8.0,10.0,13.0,19.0 1,2019.0,1,5.0900653145410795,3.0,4.0,6.0,6.0,6.0,Male,4948.7929222607045,46536.28571428571,48.49371433482308,34.439,43.38,51.0,55.48,58.3,5818,52.14620831900955,40.0,49.39,55.0,57.49,59.72,10.95496734272946,6.0,7.0,10.0,12.0,18.0 1,2019.0,1,5.075924075924076,3.0,4.0,6.0,6.0,6.0,Female,4896.3078634974345,47906.57142857143,46.45896936396954,31.587,40.71,48.63,54.2,57.33,6006,51.036263736263685,35.59700000000001,47.09,54.67,57.76,60.31,12.044122544122544,6.0,8.0,11.0,14.0,20.0 -1,2020.0,1,5.1041137633316405,4.0,5.0,5.0,6.0,6.0,Total,9867.629028620691,94757.14285714286,46.06161454306233,37.05800729137269,42.587491101460316,47.432004480092814,50.68859873971846,52.87456665243567,11814,52.18030101407709,42.25576516632326,49.680919587888695,54.665894128667496,57.068693441002054,58.429207300762144,12.477151978299252,5.534893179347836,8.665287181108546,12.188744213920447,15.967226489842192,19.678480450828733 -1,2020.0,1,5.111913357400722,4.0,5.0,5.0,6.0,6.0,Male,4964.0316314330385,46728.0,47.406965541146334,39.249952833151376,44.449420566721116,48.79874828592617,51.55431716630187,53.63085567014427,5817,52.576394035910695,43.91550465962647,50.380985534570584,54.736891829213405,56.975619760277816,58.25838852247566,11.74852852524423,5.003288210730821,8.12187068455188,11.522269155861272,15.152909704327817,18.788181346366713 -1,2020.0,1,5.096548274137069,4.0,5.0,5.0,6.0,6.0,Female,4903.597397187632,48029.142857142855,44.75664426528129,35.50282075868708,41.25303679694558,45.97140874282798,49.567357263319764,51.91896318278354,5997,51.79609672726596,40.834709760259706,48.833003378983946,54.574158862383214,57.2146301348631,58.609003838500385,13.183905792943397,6.153944825084665,9.267597531236369,12.977001345457008,16.71467741966822,20.375702908186494 -1,2021.0,1,5.056487127371274,4.0,5.0,5.0,5.0,6.0,Total,9792.794512293089,93825.28571428571,45.53698910330616,39.28736596985248,43.12104798097639,46.36477346004733,48.889468511237226,50.617988764525194,11808,52.009383090433815,44.042790652756416,49.92889860573529,53.88041332456192,56.201691381397914,57.55961874748001,12.7791923652743,5.886397122941414,9.0825339687628,12.664605546067076,16.37201012423222,19.86214220228487 -1,2021.0,1,5.067239896818573,4.0,5.0,5.0,5.0,6.0,Male,4925.377486670445,46303.71428571428,46.92742305195073,41.40159875119027,44.87523275838807,47.732021438966584,49.8279563681638,51.46856479608388,5815,52.33606601671287,45.2834272075495,50.4981717416713,53.967270766420825,56.172336404468474,57.42661850385404,12.035195139163632,5.272064447569398,8.397260642314148,11.973291551300328,15.498967076850288,18.89999299643993 -1,2021.0,1,5.046053729350909,4.0,5.0,5.0,5.0,6.0,Female,4867.417025622632,47521.57142857143,44.187852875813064,37.66526858343326,41.862561637495475,45.037099440071465,47.63377495546325,49.446385918283475,5993,51.69240307770004,42.74959544099078,49.322708220092466,53.775846655603154,56.229840645013844,57.72624175507087,13.501091893028939,6.533162089878138,9.676477117306487,13.289130815898963,17.173770574514695,20.56876333606342 -1,2022.0,1,5.01398542125784,4.0,5.0,5.0,5.0,6.0,Total,9678.911095704907,92957.85714285714,45.330885675242,40.27396863022321,43.353337370720354,45.956332059413,48.13522835386524,49.696132136029526,11798,51.49339710747833,44.77671019344879,49.737904401112324,52.99920715163458,55.26618096587674,56.619139626071416,12.733576277808323,5.884717768426957,8.990776612223831,12.590363515003684,16.321618670954518,19.78447264624798 -1,2022.0,1,5.025116119043523,4.0,5.0,5.0,5.0,6.0,Male,4874.9555752692095,45903.0,46.61670536172718,42.23914809142157,45.002548062181724,47.124840978677916,49.017683151062755,50.51815597013682,5813,51.91763076988683,45.874383139673576,50.21710500279242,53.2741817975423,55.37949220045634,56.69394084423383,12.062603272014805,5.372843090248836,8.42896883124155,11.917440135003691,15.606935792574298,18.8789921386015 -1,2022.0,1,5.003174603174603,4.0,5.0,5.0,5.0,6.0,Female,4803.955520435719,47054.857142857145,44.08201853446716,38.91756527396111,42.23150893268319,44.67251584512197,46.934168913320605,48.54443392727054,5985,51.081355289670334,43.433537512409515,49.170102629911526,52.733955958548236,55.1022850401056,56.552713849871225,13.385266517186453,6.4063087478722975,9.631762564506932,13.180531379100671,16.927199640950732,20.670750153102137 +1,2020.0,1,5.107160995429152,4.0,5.0,5.0,6.0,6.0,Total,9867.987846382177,94813.71428571429,46.07723313307481,37.05800729137269,42.590478206582176,47.45552153497012,50.70058112078441,52.90735655171413,11814,52.17333588341197,42.25576516632326,49.67124686886112,54.66098263588519,57.06731142182204,58.42297734144503,12.467025929767127,5.525783669184398,8.658696479828267,12.178426335498791,15.957498213999914,19.671033970309345 +1,2020.0,1,5.115351555784769,4.0,5.0,5.0,6.0,6.0,Male,4964.27160875494,46759.42857142857,47.42426467846777,39.235797633496375,44.455158820998385,48.81842218980688,51.57376213151434,53.68543528235989,5817,52.56867387726656,43.922918846680524,50.36497904641212,54.731302764359064,56.96749134816214,58.25838852247566,11.741328978850017,5.003288210730821,8.112030872274639,11.518604063779721,15.135336660545661,18.784475598858187 +1,2020.0,1,5.099216274804069,4.0,5.0,5.0,6.0,6.0,Female,4903.7162376272545,48054.28571428571,44.77063274962495,35.50282075868708,41.258951489098806,45.97356139454508,49.58458201662452,51.944848237651264,5997,51.789863962409406,40.84757499293931,48.831221402993954,54.56412378180342,57.20849007980755,58.6041245360313,13.170941081256984,6.136265253755889,9.251654196351577,12.963577464175241,16.71082705901307,20.375702908186494 +1,2021.0,1,5.031419376693767,4.0,5.0,5.0,5.0,6.0,Total,9783.504062152717,93360.14285714286,45.45076878402121,39.220412496219204,43.07559742598681,46.301735672787004,48.77503563061213,50.475100806592366,11808,52.00875443353065,44.046560461058945,49.892505483935764,53.85911525180584,56.18464398695711,57.557997261950945,12.82093567708548,5.927930920294657,9.130349540208435,12.711076010872631,16.393871334829758,19.8641617862824 +1,2021.0,1,5.042476354256234,4.0,5.0,5.0,5.0,6.0,Male,4920.735935849245,46077.42857142857,46.843845890467826,41.285495709174555,44.83047297156983,47.67136910768306,49.75614630417793,51.36279429617805,5815,52.33202874469034,45.359985782793444,50.46400546872791,53.95041680493021,56.16083738328063,57.42309981558958,12.078058433817468,5.368039536015929,8.443842168543183,12.02625202017624,15.559078620421626,18.907342913464774 +1,2021.0,1,5.020690805940264,4.0,5.0,5.0,5.0,6.0,Female,4862.768126303455,47282.71428571428,44.09906790399688,37.5829262368226,41.79085972733833,44.958691941322634,47.52379579312965,49.28001586200368,5993,51.69508179555413,42.789739259026405,49.310822284494634,53.74383563353733,56.221169544670815,57.72624175507087,13.541748486964362,6.605371367377746,9.741049298863413,13.35394990099573,17.220348861920563,20.5641707959241 +1,2022.0,1,5.000423800644177,4.0,5.0,5.0,5.0,6.0,Total,9685.42377474214,92706.42857142857,45.265711909063306,40.26066224241355,43.319733973341286,45.9223264412563,48.03466197054144,49.57264308670507,11798,51.57606809415161,44.860774595213215,49.84881807323178,53.015757167841976,55.28626546114065,56.64653806826095,12.754305828139334,5.90404268805009,9.024271709329822,12.595234937526566,16.35505115696332,19.789779631396573 +1,2022.0,1,5.012041974883881,4.0,5.0,5.0,5.0,6.0,Male,4877.244852437185,45783.57142857143,46.545636164485806,42.16786333939389,44.977079570398985,47.11834894405378,48.95419462198866,50.368022670160144,5813,51.99500039408917,45.99039419203403,50.34339234998302,53.304645126641425,55.405068439453494,56.70551576511696,12.090521357611516,5.387075980332026,8.455428383060564,11.958342548150666,15.611169117438422,18.954112414848723 +1,2022.0,1,4.989139515455305,4.0,5.0,5.0,5.0,6.0,Female,4808.17892230496,46922.857142857145,44.022570773428846,38.911791903162076,42.20320676983231,44.64897067828675,46.86055596059599,48.37691127851741,5985,51.16917528554095,43.5608311939296,49.31073830575697,52.750566419764944,55.12521026635699,56.59644255643239,13.399014120065512,6.439347164084394,9.648075594431448,13.19962326504095,16.943563884431526,20.68321023271273 2,2019.0,1,5.082882273342355,3.0,4.0,6.0,6.0,6.0,Total,9845.10078575798,94442.85714285714,47.46016576454639,32.93,41.6125,49.375,54.79,58.05,11824,51.582412043302156,37.85,48.135000000000005,54.8,57.57,60.09,11.508203653585927,6.0,8.0,10.0,13.0,19.0 2,2019.0,1,5.0900653145410795,3.0,4.0,6.0,6.0,6.0,Male,4948.7929222607045,46536.28571428571,48.49371433482308,34.439,43.38,51.0,55.48,58.3,5818,52.14620831900955,40.0,49.39,55.0,57.49,59.72,10.95496734272946,6.0,7.0,10.0,12.0,18.0 2,2019.0,1,5.075924075924076,3.0,4.0,6.0,6.0,6.0,Female,4896.3078634974345,47906.57142857143,46.45896936396954,31.587,40.71,48.63,54.2,57.33,6006,51.036263736263685,35.59700000000001,47.09,54.67,57.76,60.31,12.044122544122544,6.0,8.0,11.0,14.0,20.0 -2,2020.0,1,5.1041137633316405,4.0,5.0,5.0,6.0,6.0,Total,9867.629028620691,94757.14285714286,46.06161454306233,37.05800729137269,42.587491101460316,47.432004480092814,50.68859873971846,52.87456665243567,11814,52.18030101407709,42.25576516632326,49.680919587888695,54.665894128667496,57.068693441002054,58.429207300762144,12.477151978299252,5.534893179347836,8.665287181108546,12.188744213920447,15.967226489842192,19.678480450828733 -2,2020.0,1,5.111913357400722,4.0,5.0,5.0,6.0,6.0,Male,4964.0316314330385,46728.0,47.406965541146334,39.249952833151376,44.449420566721116,48.79874828592617,51.55431716630187,53.63085567014427,5817,52.576394035910695,43.91550465962647,50.380985534570584,54.736891829213405,56.975619760277816,58.25838852247566,11.74852852524423,5.003288210730821,8.12187068455188,11.522269155861272,15.152909704327817,18.788181346366713 -2,2020.0,1,5.096548274137069,4.0,5.0,5.0,6.0,6.0,Female,4903.597397187632,48029.142857142855,44.75664426528129,35.50282075868708,41.25303679694558,45.97140874282798,49.567357263319764,51.91896318278354,5997,51.79609672726596,40.834709760259706,48.833003378983946,54.574158862383214,57.2146301348631,58.609003838500385,13.183905792943397,6.153944825084665,9.267597531236369,12.977001345457008,16.71467741966822,20.375702908186494 -2,2021.0,1,5.056487127371274,4.0,5.0,5.0,5.0,6.0,Total,9792.794512293089,93825.28571428571,45.53698910330616,39.28736596985248,43.12104798097639,46.36477346004733,48.889468511237226,50.617988764525194,11808,52.009383090433815,44.042790652756416,49.92889860573529,53.88041332456192,56.201691381397914,57.55961874748001,12.779192365274302,5.886397122941414,9.0825339687628,12.664605546067076,16.37201012423222,19.86214220228487 -2,2021.0,1,5.067239896818573,4.0,5.0,5.0,5.0,6.0,Male,4925.377486670445,46303.71428571428,46.92742305195073,41.40159875119027,44.87523275838807,47.732021438966584,49.8279563681638,51.46856479608388,5815,52.33606601671287,45.2834272075495,50.4981717416713,53.967270766420825,56.172336404468474,57.42661850385404,12.035195139163632,5.272064447569398,8.397260642314148,11.973291551300328,15.498967076850288,18.89999299643993 -2,2021.0,1,5.046053729350909,4.0,5.0,5.0,5.0,6.0,Female,4867.417025622632,47521.57142857143,44.187852875813064,37.66526858343326,41.862561637495475,45.037099440071465,47.63377495546325,49.446385918283475,5993,51.69240307770004,42.74959544099078,49.322708220092466,53.775846655603154,56.229840645013844,57.72624175507087,13.501091893028939,6.533162089878138,9.676477117306487,13.289130815898963,17.173770574514695,20.56876333606342 -2,2022.0,1,5.01398542125784,4.0,5.0,5.0,5.0,6.0,Total,9678.911095704907,92957.85714285714,45.330885675242,40.27396863022321,43.353337370720354,45.956332059413,48.13522835386524,49.696132136029526,11798,51.49339710747833,44.77671019344879,49.737904401112324,52.99920715163458,55.26618096587674,56.619139626071416,12.733576277808323,5.884717768426957,8.990776612223831,12.590363515003684,16.321618670954518,19.78447264624798 -2,2022.0,1,5.025116119043523,4.0,5.0,5.0,5.0,6.0,Male,4874.9555752692095,45903.0,46.61670536172718,42.23914809142157,45.002548062181724,47.124840978677916,49.017683151062755,50.51815597013682,5813,51.91763076988683,45.874383139673576,50.21710500279242,53.2741817975423,55.37949220045634,56.69394084423383,12.062603272014805,5.372843090248836,8.42896883124155,11.917440135003691,15.606935792574298,18.8789921386015 -2,2022.0,1,5.003174603174603,4.0,5.0,5.0,5.0,6.0,Female,4803.955520435719,47054.857142857145,44.08201853446716,38.91756527396111,42.23150893268319,44.67251584512197,46.934168913320605,48.54443392727054,5985,51.081355289670334,43.433537512409515,49.170102629911526,52.733955958548236,55.1022850401056,56.552713849871225,13.385266517186453,6.4063087478722975,9.631762564506932,13.180531379100671,16.927199640950732,20.670750153102137 \ No newline at end of file +2,2020.0,1,5.107160995429152,4.0,5.0,5.0,6.0,6.0,Total,9867.987846382177,94813.71428571429,46.07723313307481,37.05800729137269,42.590478206582176,47.45552153497012,50.70058112078441,52.90735655171413,11814,52.17333588341197,42.25576516632326,49.67124686886112,54.66098263588519,57.06731142182204,58.42297734144503,12.467025929767129,5.525783669184398,8.658696479828267,12.178426335498791,15.957498213999914,19.671033970309345 +2,2020.0,1,5.115351555784769,4.0,5.0,5.0,6.0,6.0,Male,4964.27160875494,46759.42857142857,47.42426467846777,39.235797633496375,44.455158820998385,48.81842218980688,51.57376213151434,53.68543528235989,5817,52.56867387726656,43.922918846680524,50.36497904641212,54.731302764359064,56.96749134816214,58.25838852247566,11.741328978850017,5.003288210730821,8.112030872274639,11.518604063779721,15.135336660545661,18.784475598858187 +2,2020.0,1,5.099216274804069,4.0,5.0,5.0,6.0,6.0,Female,4903.7162376272545,48054.28571428571,44.77063274962495,35.50282075868708,41.258951489098806,45.97356139454508,49.58458201662452,51.944848237651264,5997,51.789863962409406,40.84757499293931,48.831221402993954,54.56412378180342,57.20849007980755,58.6041245360313,13.170941081256984,6.136265253755889,9.251654196351577,12.963577464175241,16.71082705901307,20.375702908186494 +2,2021.0,1,5.031419376693767,4.0,5.0,5.0,5.0,6.0,Total,9783.504062152717,93360.14285714286,45.45076878402121,39.220412496219204,43.07559742598681,46.301735672787004,48.77503563061213,50.475100806592366,11808,52.00875443353065,44.046560461058945,49.892505483935764,53.85911525180584,56.18464398695711,57.557997261950945,12.820935677085481,5.927930920294657,9.130349540208435,12.711076010872631,16.393871334829758,19.8641617862824 +2,2021.0,1,5.042476354256234,4.0,5.0,5.0,5.0,6.0,Male,4920.735935849245,46077.42857142857,46.843845890467826,41.285495709174555,44.83047297156983,47.67136910768306,49.75614630417793,51.36279429617805,5815,52.33202874469034,45.359985782793444,50.46400546872791,53.95041680493021,56.16083738328063,57.42309981558958,12.078058433817468,5.368039536015929,8.443842168543183,12.02625202017624,15.559078620421626,18.907342913464774 +2,2021.0,1,5.020690805940264,4.0,5.0,5.0,5.0,6.0,Female,4862.768126303455,47282.71428571428,44.09906790399688,37.5829262368226,41.79085972733833,44.958691941322634,47.52379579312965,49.28001586200368,5993,51.69508179555413,42.789739259026405,49.310822284494634,53.74383563353733,56.221169544670815,57.72624175507087,13.541748486964362,6.605371367377746,9.741049298863413,13.35394990099573,17.220348861920563,20.5641707959241 +2,2022.0,1,5.000423800644177,4.0,5.0,5.0,5.0,6.0,Total,9685.423774742141,92706.42857142857,45.265711909063306,40.26066224241355,43.319733973341286,45.9223264412563,48.03466197054144,49.57264308670507,11798,51.57606809415161,44.860774595213215,49.84881807323178,53.015757167841976,55.28626546114065,56.64653806826095,12.754305828139334,5.90404268805009,9.024271709329822,12.595234937526566,16.35505115696332,19.789779631396573 +2,2022.0,1,5.012041974883881,4.0,5.0,5.0,5.0,6.0,Male,4877.244852437185,45783.57142857143,46.545636164485806,42.16786333939389,44.977079570398985,47.11834894405378,48.95419462198866,50.368022670160144,5813,51.99500039408917,45.99039419203403,50.34339234998302,53.304645126641425,55.405068439453494,56.70551576511696,12.090521357611516,5.387075980332026,8.455428383060564,11.958342548150666,15.611169117438422,18.954112414848723 +2,2022.0,1,4.989139515455305,4.0,5.0,5.0,5.0,6.0,Female,4808.17892230496,46922.857142857145,44.022570773428846,38.911791903162076,42.20320676983231,44.64897067828675,46.86055596059599,48.37691127851741,5985,51.16917528554095,43.5608311939296,49.31073830575697,52.750566419764944,55.12521026635699,56.59644255643239,13.399014120065512,6.439347164084394,9.648075594431448,13.19962326504095,16.943563884431526,20.68321023271273 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv index e9edfc266..a4b59e719 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics1.csv @@ -1,9 +1,9 @@ run,time,id_Statistics1,edi_p50,sIndex_p50,statYHhDispEquivNatGini,statYMktNatGini,yHhDispEquivP50,yHhQuintilesC5P20,yHhQuintilesC5P40,yHhQuintilesC5P60,yHhQuintilesC5P80,yLabP20,yLabP40,yLabP60,yLabP80 1,2019.0,1,13643.583390133683,NaN,0.0,0.0,13643.667479107155,0.0,6.51833999175728,7.9090821344821665,8.39487669904798,1015.7031862136506,1595.5475473858087,2190.490749493191,3216.4356578295665 -1,2020.0,1,15900.71234301057,NaN,0.0,0.0,15900.71234301057,0.0,7.088076180135259,8.031141956880619,8.506710224623882,1172.9898846787785,1749.5408273403375,2416.9694325845585,3503.635962054756 -1,2021.0,1,15807.886928269101,NaN,0.0,0.0,15807.886928269101,0.0,7.220824954129774,8.09469510117329,8.580964490955218,1255.2279162400785,1872.7710594117166,2549.7755445091757,3638.0914692035926 -1,2022.0,1,16112.837011538813,NaN,0.0,0.0,16111.568220383782,0.0,7.28597153342024,8.109071579540844,8.57951743271375,1273.8431399224642,1888.3290096639555,2555.749176933975,3676.8576133715255 +1,2020.0,1,12423.40799238695,NaN,0.0,0.0,12423.40799238695,0.0,0.0,7.80523111874781,8.399096813063087,1155.4114367902455,1746.9759994440487,2409.8485417454194,3480.597893507784 +1,2021.0,1,15248.76945713412,NaN,0.0,0.0,15248.764086554458,0.0,7.008969243282366,8.071873405791731,8.590228314596128,1257.0236597604874,1916.3540502445262,2658.054252506135,3853.870426816769 +1,2022.0,1,13512.505112526625,NaN,0.0,0.0,13511.583099289626,0.0,0.0,7.924647831700972,8.496337938699355,1263.6630434935632,1900.9751882920457,2582.5847305134994,3761.9210093792885 2,2019.0,1,13643.583390133683,NaN,0.0,0.0,13643.667479107155,0.0,6.51833999175728,7.9090821344821665,8.39487669904798,1015.7031862136506,1595.5475473858087,2190.490749493191,3216.4356578295665 -2,2020.0,1,15900.71234301057,NaN,0.0,0.0,15900.71234301057,0.0,7.088076180135259,8.031141956880619,8.506710224623882,1172.9898846787785,1749.5408273403375,2416.9694325845585,3503.635962054756 -2,2021.0,1,15807.886928269101,NaN,0.0,0.0,15807.886928269101,0.0,7.220824954129774,8.09469510117329,8.580964490955218,1255.2279162400785,1872.7710594117166,2549.7755445091757,3638.0914692035926 -2,2022.0,1,16112.837011538813,NaN,0.0,0.0,16111.568220383782,0.0,7.28597153342024,8.109071579540844,8.57951743271375,1273.8431399224642,1888.3290096639555,2555.749176933975,3676.8576133715255 \ No newline at end of file +2,2020.0,1,12423.407992386947,NaN,0.0,0.0,12423.407992386947,0.0,0.0,7.80523111874781,8.399096813063087,1155.4114367902455,1746.9759994440487,2409.8485417454194,3480.597893507784 +2,2021.0,1,15248.76945713412,NaN,0.0,0.0,15248.764086554458,0.0,7.008969243282366,8.071873405791731,8.590228314596128,1257.0236597604874,1916.3540502445262,2658.054252506135,3853.870426816769 +2,2022.0,1,13512.505112526625,NaN,0.0,0.0,13511.583099289626,0.0,0.0,7.924647831700972,8.496337938699355,1263.6630434935632,1900.9751882920457,2582.5847305134994,3761.9210093792885 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv index 3fba237f4..6e1fbfbd0 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics21.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics21.csv @@ -1,9 +1,9 @@ run,time,id_Statistics21,demDsbl18to29Share,demDsbl30to54Share,demDsbl55to74Share,demMarried18to29Share,demMarried30to54Share,demMarried55to74Share,demNChild18to29Avg,demNChild30to54Avg,demNChild55to74Avg,demPop18to29N,demPop30to54N,demPop55to74N,healthScore18to29Avg,healthScore30to54Avg,healthScore55to74Avg,labNoWork18to29Share,labNoWork18to54Share,labNoWork30to54Share,labNoWork55to74Share,labWorkFullTime18to29Share,labWorkFullTime30to54Share,labWorkFullTime55to74Share,labWorkPartTime18to29Share,labWorkPartTime30to54Share,labWorkPartTime55to74Share,statInvestLoss18to29Avg,statInvestLoss30to54Avg,statInvestLoss55to74Avg,statYDisp18to29Avg,statYDisp30to54Avg,statYDisp55to74Avg,statYDispGrossOfLosses18to29Avg,statYDispGrossOfLosses30to54Avg,statYDispGrossOfLosses55to75Avg,statYInvest18to29Avg,statYInvest30to54Avg,statYInvest55to74Avg,statYLab18to29Avg,statYLab30to54Avg,statYLab55to74Avg,statYPens18to29Avg,statYPens30to54Avg,statYPens55to74Avg,wealth18to29Avg,wealth30to54Avg,wealth55to74Avg,x18to29Avg,x18to54Avg,x30to54Avg,x55to74Avg,xToLeisureRatio 1,2019.0,1,0.056818181818181816,0.09244486156733928,0.1300523062291964,0.2703168044077135,0.6707336148912874,0.6131716595339991,0.28546831955922863,0.9438448302831222,0.08083689966714218,2904.0,6393.0,4206.0,3.6797520661157024,3.4509619896762085,3.1238706609605327,-0.03280974462809916,-0.04843401568540323,-0.05500624220240888,0.024626505658583042,0.5953856749311295,0.7888315344908494,0.34141702330004753,0.0946969696969697,0.06162990771155952,0.03281027104136947,0.0,0.0,0.0,42.90138650342101,-235.73251852989438,-757.7467085400431,1329.1136079319922,1863.7884002201056,1321.098886102814,0.0,0.0,0.0,434.0636850782414,594.982264159137,577.842361382952,0.0,0.0,0.0,0.0,0.0,0.0,-720.1491392879234,-1107.7139183419072,-1342.7185177749318,-1403.9198889040383,14.047551522588241 -1,2020.0,1,0.05553602811950791,0.08175113761179978,0.15153631284916202,0.2186291739894552,0.6417699670484858,0.5726256983240223,0.2569420035149385,0.9060097285422878,0.08100558659217877,2845.0,6373.0,4296.0,3.6112478031634447,3.419739526125843,3.038175046554935,-0.0685618978910369,-0.07349366319372502,-0.08183963759610859,0.0019729806331471034,0.6463971880492091,0.8536011297662012,0.38337988826815644,0.07943760984182777,0.023693707829907422,0.013500931098696461,0.0,0.0,0.0,177.74529292695115,-86.8723445196822,-651.3959324665625,1463.9575143555223,2012.6485742303178,1427.4496621762946,0.0,0.0,0.0,452.55804068888983,629.2547269095696,598.9694197981935,0.0,0.0,0.0,0.0,0.0,0.0,-720.1480124876006,-1107.7677439694812,-1342.8141815251993,-1403.841594162565,6.374782073884389 -1,2021.0,1,0.05954088952654232,0.0740449614840434,0.1576773008951113,0.17467718794835008,0.6131111460462192,0.5462474179481295,0.23529411764705882,0.8677880836346487,0.08423226991048886,2788.0,6361.0,4357.0,3.5175753228120517,3.3376827542839176,2.9563920128528802,-0.07371705695839315,-0.08367739727528506,-0.09544245760100613,-0.011520310626577879,0.6527977044476327,0.8767489388460934,0.40394767041542345,0.0781922525107604,0.01414871875491275,0.006426440211154464,0.0,0.0,0.0,244.03671500822497,-37.29062072085162,-612.0154685441526,1530.2489364367962,2062.2302980291483,1466.8301260987046,0.0,0.0,0.0,481.5872978554714,644.9106076971538,625.5294693978988,0.0,0.0,0.0,0.0,0.0,0.0,-720.1618329444999,-1107.7869663728059,-1342.8409270257732,-1403.824252037514,0.6733706484920436 -1,2022.0,1,0.060087399854333576,0.07533490937746257,0.1726027397260274,0.13619810633648943,0.5913317572892041,0.515296803652968,0.21303714493809178,0.8332545311268715,0.08082191780821918,2746.0,6345.0,4380.0,3.4107793153678077,3.2512214342001577,2.863013698630137,-0.10456249694100511,-0.0956735778041719,-0.10005307423167849,-0.024890492237442885,0.6809905316824472,0.8869976359338061,0.42168949771689496,0.0808448652585579,0.00851063829787234,0.002054794520547945,0.0,0.0,0.0,282.676114836456,-28.52853207524913,-593.4649228535066,1568.8883362650272,2070.992386674751,1485.3806717893506,0.0,0.0,0.0,483.92594753611274,646.9469360558707,624.7507344788916,0.0,0.0,0.0,0.0,0.0,0.0,-720.2122899302651,-1107.8800003952356,-1342.9620572224005,-1403.8758961656802,21.525072240888445 +1,2020.0,1,0.056239015817223195,0.08175113761179978,0.15153631284916202,0.2172231985940246,0.6417699670484858,0.5726256983240223,0.2562390158172232,0.9060097285422878,0.08100558659217877,2845.0,6373.0,4296.0,3.6087873462214413,3.419739526125843,3.038175046554935,-0.0685618978910369,0.03779833029450941,-0.036335165604895664,0.28456143500931097,0.6460456942003515,0.8091950415816727,0.11173184357541899,0.07978910369068541,0.022595324023222972,0.0025605214152700185,0.0,0.0,0.0,178.85726290557022,-181.53740466318732,-1138.5666684641694,1465.0694843341414,1917.9835140868126,940.2789261786877,0.0,0.0,0.0,452.56436796649825,632.7330291922549,641.6922122499931,0.0,0.0,0.0,0.0,0.0,0.0,-720.1475685528261,-1107.7918465495334,-1342.8542359424646,-1403.855389781263,18.943899571019074 +1,2021.0,1,0.06205164992826399,0.07451658544254049,0.163185678218958,0.17324246771879484,0.6126395220877221,0.5444112921735139,0.2342180774748924,0.8679452916208144,0.08377323846683497,2788.0,6361.0,4357.0,3.5161406025824964,3.338626002200912,2.9761303649299977,-0.06690213586800575,-0.049396337005775226,-0.05755533293507309,0.03507138090429196,0.6474175035868006,0.8380757742493319,0.3484048657333027,0.07675753228120516,0.014934758685741236,0.015377553362405325,0.0,0.0,0.0,233.80744223913666,-89.77828278558468,-497.447417398952,1520.0196636677078,2009.7426359644153,1581.3981772439051,0.0,0.0,0.0,481.53928383966644,652.5782741766019,819.8829678890841,0.0,0.0,0.0,0.0,0.0,0.0,-720.159448471871,-1107.79744755163,-1342.8597000193156,-1403.8120977254491,34.44827018248283 +1,2022.0,1,0.06045156591405681,0.07454688731284476,0.16872146118721462,0.1358339402767662,0.5910165484633569,0.5157534246575343,0.21412964311726146,0.8335697399527187,0.08036529680365297,2746.0,6345.0,4380.0,3.4107793153678077,3.2616233254531126,2.908447488584475,-0.08781085819373635,0.011074250864820723,-0.05340216800630418,0.22533781826484023,0.6675163874726876,0.8400315208825847,0.16940639269406393,0.0775673707210488,0.008825847123719465,0.00410958904109589,0.0,0.0,0.0,254.52345404012112,-106.80243629353572,-989.4596422271429,1540.7356754686923,1992.7184824564642,1089.3859524157142,0.0,0.0,0.0,484.63332723781656,656.5635170299258,774.8814208892799,0.0,0.0,0.0,0.0,0.0,0.0,-720.2113750849451,-1107.8889881725324,-1342.9771963668388,-1403.8700200740648,106.51161990887896 2,2019.0,1,0.056818181818181816,0.09244486156733928,0.1300523062291964,0.2703168044077135,0.6707336148912874,0.6131716595339991,0.28546831955922863,0.9438448302831222,0.08083689966714218,2904.0,6393.0,4206.0,3.6797520661157024,3.4509619896762085,3.1238706609605327,-0.03280974462809916,-0.04843401568540323,-0.05500624220240888,0.024626505658583042,0.5953856749311295,0.7888315344908494,0.34141702330004753,0.0946969696969697,0.06162990771155952,0.03281027104136947,0.0,0.0,0.0,42.90138650342101,-235.73251852989438,-757.7467085400431,1329.1136079319922,1863.7884002201056,1321.098886102814,0.0,0.0,0.0,434.0636850782414,594.982264159137,577.842361382952,0.0,0.0,0.0,0.0,0.0,0.0,-720.1491392879234,-1107.7139183419072,-1342.7185177749318,-1403.9198889040383,14.047551522588241 -2,2020.0,1,0.05553602811950791,0.08175113761179978,0.15153631284916202,0.2186291739894552,0.6417699670484858,0.5726256983240223,0.2569420035149385,0.9060097285422878,0.08100558659217877,2845.0,6373.0,4296.0,3.6112478031634447,3.419739526125843,3.038175046554935,-0.0685618978910369,-0.07349366319372502,-0.08183963759610859,0.0019729806331471034,0.6463971880492091,0.8536011297662012,0.38337988826815644,0.07943760984182777,0.023693707829907422,0.013500931098696461,0.0,0.0,0.0,177.74529292695115,-86.8723445196822,-651.3959324665625,1463.9575143555223,2012.6485742303178,1427.4496621762946,0.0,0.0,0.0,452.55804068888983,629.2547269095696,598.9694197981935,0.0,0.0,0.0,0.0,0.0,0.0,-720.1480124876006,-1107.7677439694812,-1342.8141815251993,-1403.841594162565,6.374782073884389 -2,2021.0,1,0.05954088952654232,0.0740449614840434,0.1576773008951113,0.17467718794835008,0.6131111460462192,0.5462474179481295,0.23529411764705882,0.8677880836346487,0.08423226991048886,2788.0,6361.0,4357.0,3.5175753228120517,3.3376827542839176,2.9563920128528802,-0.07371705695839315,-0.08367739727528506,-0.09544245760100613,-0.011520310626577879,0.6527977044476327,0.8767489388460934,0.40394767041542345,0.0781922525107604,0.01414871875491275,0.006426440211154464,0.0,0.0,0.0,244.03671500822497,-37.29062072085162,-612.0154685441526,1530.2489364367962,2062.2302980291483,1466.8301260987046,0.0,0.0,0.0,481.5872978554714,644.9106076971538,625.5294693978988,0.0,0.0,0.0,0.0,0.0,0.0,-720.1618329444999,-1107.7869663728059,-1342.8409270257732,-1403.824252037514,0.6733706484920436 -2,2022.0,1,0.060087399854333576,0.07533490937746257,0.1726027397260274,0.13619810633648943,0.5913317572892041,0.515296803652968,0.21303714493809178,0.8332545311268715,0.08082191780821918,2746.0,6345.0,4380.0,3.4107793153678077,3.2512214342001577,2.863013698630137,-0.10456249694100511,-0.0956735778041719,-0.10005307423167849,-0.024890492237442885,0.6809905316824472,0.8869976359338061,0.42168949771689496,0.0808448652585579,0.00851063829787234,0.002054794520547945,0.0,0.0,0.0,282.676114836456,-28.52853207524913,-593.4649228535066,1568.8883362650272,2070.992386674751,1485.3806717893506,0.0,0.0,0.0,483.92594753611274,646.9469360558707,624.7507344788916,0.0,0.0,0.0,0.0,0.0,0.0,-720.2122899302651,-1107.8800003952356,-1342.9620572224005,-1403.8758961656802,21.525072240888445 \ No newline at end of file +2,2020.0,1,0.056239015817223195,0.08175113761179978,0.15153631284916202,0.2172231985940246,0.6417699670484858,0.5726256983240223,0.2562390158172232,0.9060097285422878,0.08100558659217877,2845.0,6373.0,4296.0,3.6087873462214413,3.419739526125843,3.038175046554935,-0.0685618978910369,0.03779833029450941,-0.036335165604895664,0.28456143500931097,0.6460456942003515,0.8091950415816727,0.11173184357541899,0.07978910369068541,0.022595324023222972,0.0025605214152700185,0.0,0.0,0.0,178.85726290557022,-181.53740466318732,-1138.5666684641694,1465.0694843341414,1917.9835140868126,940.2789261786877,0.0,0.0,0.0,452.56436796649825,632.7330291922549,641.692212249993,0.0,0.0,0.0,0.0,0.0,0.0,-720.1475685528261,-1107.7918465495334,-1342.8542359424646,-1403.855389781263,18.943899571019074 +2,2021.0,1,0.06205164992826399,0.07451658544254049,0.163185678218958,0.17324246771879484,0.6126395220877221,0.5444112921735139,0.2342180774748924,0.8679452916208144,0.08377323846683497,2788.0,6361.0,4357.0,3.5161406025824964,3.338626002200912,2.9761303649299977,-0.06690213586800575,-0.049396337005775226,-0.05755533293507309,0.03507138090429196,0.6474175035868006,0.8380757742493319,0.3484048657333027,0.07675753228120516,0.014934758685741236,0.015377553362405325,0.0,0.0,0.0,233.80744223913666,-89.77828278558468,-497.447417398952,1520.0196636677078,2009.7426359644153,1581.3981772439051,0.0,0.0,0.0,481.53928383966644,652.5782741766019,819.8829678890841,0.0,0.0,0.0,0.0,0.0,0.0,-720.159448471871,-1107.79744755163,-1342.8597000193156,-1403.8120977254491,34.44827018248283 +2,2022.0,1,0.06045156591405681,0.07454688731284476,0.16872146118721462,0.1358339402767662,0.5910165484633569,0.5157534246575343,0.21412964311726146,0.8335697399527187,0.08036529680365297,2746.0,6345.0,4380.0,3.4107793153678077,3.2616233254531126,2.908447488584475,-0.08781085819373635,0.011074250864820723,-0.05340216800630418,0.22533781826484023,0.6675163874726876,0.8400315208825847,0.16940639269406393,0.0775673707210488,0.008825847123719465,0.00410958904109589,0.0,0.0,0.0,254.52345404012112,-106.80243629353572,-989.4596422271429,1540.7356754686923,1992.7184824564642,1089.3859524157142,0.0,0.0,0.0,484.63332723781656,656.5635170299258,774.8814208892799,0.0,0.0,0.0,0.0,0.0,0.0,-720.2113750849451,-1107.8889881725324,-1342.9771963668388,-1403.8700200740648,106.51161990887896 \ No newline at end of file diff --git a/src/test/java/simpaths/integrationtest/expected/Statistics31.csv b/src/test/java/simpaths/integrationtest/expected/Statistics31.csv index 924dec9b9..9773f577e 100644 --- a/src/test/java/simpaths/integrationtest/expected/Statistics31.csv +++ b/src/test/java/simpaths/integrationtest/expected/Statistics31.csv @@ -1,9 +1,9 @@ run,time,id_Statistics31,careAdj,demFertAdj,demFertRateSim,demFertRateTarget,demPartnerAdj,demPartnerSimShare,demPartnerTargetShare,demUtilAdjCouple,demUtilAdjSingleF,demUtilAdjSingleM 1,2019.0,1,0.0,-0.279462622342386,0.060041407867494824,0.06092462518117112,-0.613869665517935,0.5523988206915036,0.639752445827121,0.0,0.0,0.0 -1,2020.0,1,0.0,-0.2659197918000082,0.027405421507298182,0.059320659210062375,-0.5988444469664678,0.5144874442150137,0.6494882472052341,0.0,0.0,0.0 -1,2021.0,1,0.0,-0.25543875103684177,0.025157232704402517,0.0570746110314559,-0.5821259283872153,0.48475994421940366,0.6444373367775469,0.0,0.0,0.0 -1,2022.0,1,0.0,-0.24930347300809638,0.021039975954313193,0.05798520015481514,-0.584760268520426,0.456553365956884,0.6442540414107724,0.0,0.0,0.0 +1,2020.0,1,0.0,-0.2659197918000082,0.02770330652368186,0.059320659210062375,-0.5988444469664678,0.5142210084593353,0.6494882472052341,0.0,0.0,0.0 +1,2021.0,1,0.0,-0.25543875103684177,0.025157232704402517,0.0570746110314559,-0.5821259283872153,0.4838302676140514,0.6444373367775469,0.0,0.0,0.0 +1,2022.0,1,0.0,-0.24930347300809638,0.021340547039374814,0.05798520015481514,-0.584760268520426,0.456553365956884,0.6442540414107724,0.0,0.0,0.0 2,2019.0,1,0.0,-0.279462622342386,0.060041407867494824,0.06092462518117112,-0.613869665517935,0.5523988206915036,0.639752445827121,0.0,0.0,0.0 -2,2020.0,1,0.0,-0.2659197918000082,0.027405421507298182,0.059320659210062375,-0.5988444469664678,0.5144874442150137,0.6494882472052341,0.0,0.0,0.0 -2,2021.0,1,0.0,-0.25543875103684177,0.025157232704402517,0.0570746110314559,-0.5821259283872153,0.48475994421940366,0.6444373367775469,0.0,0.0,0.0 -2,2022.0,1,0.0,-0.24930347300809638,0.021039975954313193,0.05798520015481514,-0.584760268520426,0.456553365956884,0.6442540414107724,0.0,0.0,0.0 \ No newline at end of file +2,2020.0,1,0.0,-0.2659197918000082,0.02770330652368186,0.059320659210062375,-0.5988444469664678,0.5142210084593353,0.6494882472052341,0.0,0.0,0.0 +2,2021.0,1,0.0,-0.25543875103684177,0.025157232704402517,0.0570746110314559,-0.5821259283872153,0.4838302676140514,0.6444373367775469,0.0,0.0,0.0 +2,2022.0,1,0.0,-0.24930347300809638,0.021340547039374814,0.05798520015481514,-0.584760268520426,0.456553365956884,0.6442540414107724,0.0,0.0,0.0 \ No newline at end of file