From 9d9517584a750c2b1e2ce88995bb4fb39d77183c Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 14 Apr 2025 16:20:25 +0100 Subject: [PATCH 01/18] new health statistics file --- .../data/statistics/HealthStatistics.java | 298 ++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 src/main/java/simpaths/data/statistics/HealthStatistics.java diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java new file mode 100644 index 000000000..00cf4983a --- /dev/null +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -0,0 +1,298 @@ +package simpaths.data.statistics; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import microsim.data.db.PanelEntityKey; +import microsim.statistics.CrossSection; +import microsim.statistics.IDoubleSource; +import microsim.statistics.IIntSource; +import microsim.statistics.functions.CountArrayFunction; +import microsim.statistics.functions.MeanArrayFunction; +import microsim.statistics.functions.PercentileArrayFunction; +import microsim.statistics.functions.SumArrayFunction; +import simpaths.data.filters.AgeGroupCSfilter; +import simpaths.model.Person; +import simpaths.model.SimPathsModel; +import simpaths.model.enums.Gender; +import simpaths.data.filters.GenderCSfilter; +import simpaths.data.filters.MaleAgeGroupCSfilter; + +@Entity +public class HealthStatistics { + + @Id + private PanelEntityKey key = new PanelEntityKey(1L); + + @Column(name = "n_claiming_UC") + private double nClaimingUC; + + @Column(name = "n_claiming_legacy_benefits") + private double nClaimingLegacyBenefits; + + @Column(name = "gender") + private String gender; + + // mental health numeric + @Column(name = "dhm_mean") + private double dhm_mean; + + @Column(name = "dhm_median") + private double dhm_median; + + @Column(name = "dhm_p_10") + private double dhm_p_10; + + @Column(name = "dhm_p_90") + private double dhm_p_90; + + @Column(name = "dhm_p_25") + private double dhm_p_25; + + @Column(name = "dhm_p_75") + private double dhm_p_75; + + // MCS score numeric + @Column(name = "dhe_mcs_mean") + private double dhe_mcs_mean; + + @Column(name = "dhe_mcs_median") + private double dhe_mcs_median; + + @Column(name = "dhe_mcs_p_10") + private double dhe_mcs_p_10; + + @Column(name = "dhe_mcs_p_90") + private double dhe_mcs_p_90; + + @Column(name = "dhe_mcs_p_25") + private double dhe_mcs_p_25; + + @Column(name = "dhe_mcs_p_75") + private double dhe_mcs_p_75; + + // PCS score numeric + @Column(name = "dhe_pcs_mean") + private double dhe_pcs_mean; + + @Column(name = "dhe_pcs_median") + private double dhe_pcs_median; + + @Column(name = "dhe_pcs_p_10") + private double dhe_pcs_p_10; + + @Column(name = "dhe_pcs_p_90") + private double dhe_pcs_p_90; + + @Column(name = "dhe_pcs_p_25") + private double dhe_pcs_p_25; + + @Column(name = "dhe_pcs_p_75") + private double dhe_pcs_p_75; + + // Life Satisfaction numeric + @Column(name = "dls_mean") + private double dls_mean; + + @Column(name = "dls_median") + private double dls_median; + + @Column(name = "dls_p_10") + private double dls_p_10; + + @Column(name = "dls_p_90") + private double dls_p_90; + + @Column(name = "dls_p_25") + private double dls_p_25; + + @Column(name = "dls_p_75") + private double dls_p_75; + + //N + @Column(name = "N") + private int N; + + public void setnClaimingUC(double nClaimingUC) { + this.nClaimingUC = nClaimingUC; + } + + public void setnClaimingLegacyBenefits(double nClaimingLegacyBenefits) { + this.nClaimingLegacyBenefits = nClaimingLegacyBenefits; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public void setDhm_mean(double dhm_mean) { + this.dhm_mean = dhm_mean; + } + + public void setDhm_median(double dhm_median) { + this.dhm_median = dhm_median; + } + + public void setDhm_p_10(double dhm_p_10) { + this.dhm_p_10 = dhm_p_10; + } + + public void setDhm_p_90(double dhm_p_90) { + this.dhm_p_90 = dhm_p_90; + } + + public void setDhm_p_25(double dhm_p_25) { + this.dhm_p_25 = dhm_p_25; + } + + public void setDhm_p_75(double dhm_p_75) { + this.dhm_p_75 = dhm_p_75; + } + + public void setDhe_mcs_mean(double dhe_mcs_mean) { + this.dhe_mcs_mean = dhe_mcs_mean; + } + + public void setDhe_mcs_median(double dhe_mcs_median) { + this.dhe_mcs_median = dhe_mcs_median; + } + + public void setDhe_mcs_p_10(double dhe_mcs_p_10) { + this.dhe_mcs_p_10 = dhe_mcs_p_10; + } + + public void setDhe_mcs_p_90(double dhe_mcs_p_90) { + this.dhe_mcs_p_90 = dhe_mcs_p_90; + } + + public void setDhe_mcs_p_25(double dhe_mcs_p_25) { + this.dhe_mcs_p_25 = dhe_mcs_p_25; + } + + public void setDhe_mcs_p_75(double dhe_mcs_p_75) { + this.dhe_mcs_p_75 = dhe_mcs_p_75; + } + + public void setDhe_pcs_mean(double dhe_pcs_mean) { + this.dhe_pcs_mean = dhe_pcs_mean; + } + + public void setDhe_pcs_median(double dhe_pcs_median) { + this.dhe_pcs_median = dhe_pcs_median; + } + + public void setDhe_pcs_p_10(double dhe_pcs_p_10) { + this.dhe_pcs_p_10 = dhe_pcs_p_10; + } + + public void setDhe_pcs_p_90(double dhe_pcs_p_90) { + this.dhe_pcs_p_90 = dhe_pcs_p_90; + } + + public void setDhe_pcs_p_25(double dhe_pcs_p_25) { + this.dhe_pcs_p_25 = dhe_pcs_p_25; + } + + public void setDhe_pcs_p_75(double dhe_pcs_p_75) { + this.dhe_pcs_p_75 = dhe_pcs_p_75; + } + + public void setDls_mean(double dls_mean) { + this.dls_mean = dls_mean; + } + + public void setDls_median(double dls_median) { + this.dls_median = dls_median; + } + + public void setDls_p_10(double dls_p_10) { + this.dls_p_10 = dls_p_10; + } + + public void setDls_p_90(double dls_p_90) { + this.dls_p_90 = dls_p_90; + } + + public void setDls_p_25(double dls_p_25) { + this.dls_p_25 = dls_p_25; + } + + public void setDls_p_75(double dls_p_75) { + this.dls_p_75 = dls_p_75; + } + + public void setN(int n) { + N = n; + } + + public void update(SimPathsModel model, String gender_s) { + + + AgeGroupCSfilter ageGroupFilter = new AgeGroupCSfilter(18, 65); + + // set gender + setGender(gender_s); + + // Number claiming UC + + CrossSection.Double personsUC = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.D_Econ_benefits_UC); + personsUC.setFilter(ageGroupFilter); + + SumArrayFunction.Double n_claiming_uc_f = new SumArrayFunction.Double(personsUC); + n_claiming_uc_f.applyFunction(); + setnClaimingUC(n_claiming_uc_f.getDoubleValue(IDoubleSource.Variables.Default)); + // Number claiming Legacy Benefits + + CrossSection.Double personsLB = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.D_Econ_benefits_NonUC); + personsLB.setFilter(ageGroupFilter); + + SumArrayFunction.Double n_claiming_lb_f = new SumArrayFunction.Double(personsLB); + n_claiming_lb_f.applyFunction(); + setnClaimingLegacyBenefits(n_claiming_lb_f.getDoubleValue(IDoubleSource.Variables.Default)); + + // dhm score + CrossSection.Double personsDhm = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhm); // Get cross section of simulated individuals and their mental health using the IDoubleSource interface implemented by Person class. + personsDhm.setFilter(ageGroupFilter); + + + MeanArrayFunction dhm_mean_f = new MeanArrayFunction(personsDhm); // Create MeanArrayFunction + dhm_mean_f.applyFunction(); + setDhm_mean(dhm_mean_f.getDoubleValue(IDoubleSource.Variables.Default)); + + PercentileArrayFunction percDhm_f = new PercentileArrayFunction(personsDhm); + percDhm_f.applyFunction(); + + setDhm_p_10(percDhm_f.getDoubleValue(PercentileArrayFunction.Variables.P10)); + setDhm_p_25(percDhm_f.getDoubleValue(PercentileArrayFunction.Variables.P25)); + setDhm_median(percDhm_f.getDoubleValue(PercentileArrayFunction.Variables.P50)); + setDhm_p_75(percDhm_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); + setDhm_p_90(percDhm_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + + // mcs score + CrossSection.Double personsMCS = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhe_mcs); + personsMCS.setFilter(ageGroupFilter); + + + MeanArrayFunction dhe_mcs_mean_f = new MeanArrayFunction(personsMCS); // Create MeanArrayFunction + dhe_mcs_mean_f.applyFunction(); + setDhe_mcs_mean(dhe_mcs_mean_f.getDoubleValue(IDoubleSource.Variables.Default)); + + PercentileArrayFunction perc_dhe_mcs_f = new PercentileArrayFunction(personsMCS); + perc_dhe_mcs_f.applyFunction(); + + setDhe_mcs_p_10(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P10)); + setDhe_mcs_p_25(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P25)); + setDhe_mcs_median(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P50)); + setDhe_mcs_p_75(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); + setDhe_mcs_p_90(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + + + // count + CrossSection.Integer n_persons = new CrossSection.Integer(model.getPersons(), Person.class, "getPersonCount", true); + n_persons.setFilter(ageGroupFilter); + + SumArrayFunction.Integer count_f = new SumArrayFunction.Integer(n_persons); + count_f.applyFunction(); + setN(count_f.getIntValue(IDoubleSource.Variables.Default)); + } +} From 8fe47428cd05fec9a84bbb48daa213f2c48d5565 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 14 Apr 2025 18:03:29 +0100 Subject: [PATCH 02/18] add health stats calls to collector --- .../experiment/SimPathsCollector.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/simpaths/experiment/SimPathsCollector.java b/src/main/java/simpaths/experiment/SimPathsCollector.java index df6636c2d..c3b604d54 100644 --- a/src/main/java/simpaths/experiment/SimPathsCollector.java +++ b/src/main/java/simpaths/experiment/SimPathsCollector.java @@ -9,6 +9,7 @@ import simpaths.data.filters.FlexibleInLabourSupplyFilter; import simpaths.data.statistics.EmploymentStatistics; +import simpaths.data.statistics.HealthStatistics; import simpaths.model.BenefitUnit; import simpaths.model.SimPathsModel; import simpaths.model.enums.Quintiles; @@ -60,6 +61,9 @@ public class SimPathsCollector extends AbstractSimulationCollectorManager implem private boolean persistEmploymentStatistics = false; + @GUIparameter(description="Report health statistics") + private boolean persistHealthStatistics = true; + @GUIparameter(description="Toggle to turn database persistence on/off") private boolean exportToDatabase = false; @@ -96,6 +100,8 @@ public class SimPathsCollector extends AbstractSimulationCollectorManager implem private EmploymentStatistics statsEmployment; + private HealthStatistics statsHealth; + private GiniPersonalGrossEarnings giniPersonalGrossEarnings; private GiniEquivalisedHouseholdDisposableIncome giniEquivalisedHouseholdDisposableIncome; @@ -122,6 +128,8 @@ public class SimPathsCollector extends AbstractSimulationCollectorManager implem private DataExport exportStatisticsEmployment; + private DataExport exportHealthStatistics; + protected MultiTraceFunction.Double fGiniPersonalGrossEarningsNational; protected Map fGiniPersonalGrossEarningsRegionalMap; @@ -157,7 +165,8 @@ public enum Processes { DumpStatistics, DumpStatistics2, DumpStatistics3, - DumpStatisticsEmployment + DumpStatisticsEmployment, + DumpHealthStatistics } @@ -233,6 +242,14 @@ public void onEvent(Enum type) { } catch (Exception e) { log.error(e.getMessage()); } + break; + case DumpHealthStatistics: + statsHealth.update(model, "Total"); + try { + exportHealthStatistics.export(); + } catch (Exception e) { + log.error(e.getMessage()); + } } } @@ -250,6 +267,7 @@ public void buildObjects() { stats2 = new Statistics2(); stats3 = new Statistics3(); statsEmployment = new EmploymentStatistics(); + statsHealth = new HealthStatistics(); //For export to database or .csv files. if(persistPersons) @@ -266,6 +284,8 @@ public void buildObjects() { exportStatistics3 = new DataExport(stats3, exportToDatabase, exportToCSV); if (persistEmploymentStatistics) exportStatisticsEmployment = new DataExport(statsEmployment, exportToDatabase, exportToCSV); + if (persistHealthStatistics) + exportHealthStatistics = new DataExport(statsHealth, exportToDatabase, exportToCSV); if (calculateGiniCoefficients) { @@ -330,6 +350,10 @@ public void buildSchedule() { getEngine().getEventQueue().scheduleRepeat(new SingleTargetEvent(this, Processes.DumpStatisticsEmployment), model.getStartYear() + dataDumpStartTime, ordering, dataDumpTimePeriod); } + if (persistHealthStatistics){ + getEngine().getEventQueue().scheduleRepeat(new SingleTargetEvent(this, Processes.DumpHealthStatistics), model.getStartYear() + dataDumpStartTime, ordering, dataDumpTimePeriod); + } + if (persistPersons) { getEngine().getEventQueue().scheduleRepeat(new SingleTargetEvent(this, Processes.DumpPersons), model.getStartYear() + dataDumpStartTime, ordering, dataDumpTimePeriod); } From 29809d8fc099ce7fb3b47b6637070de13b9127b3 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 14 Apr 2025 18:33:51 +0100 Subject: [PATCH 03/18] fuller health stats calculations --- .../data/statistics/HealthStatistics.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index 00cf4983a..a90ff5952 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -286,6 +286,42 @@ public void update(SimPathsModel model, String gender_s) { setDhe_mcs_p_75(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); setDhe_mcs_p_90(perc_dhe_mcs_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + // pcs score + CrossSection.Double personsPCS = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhe_pcs); + personsPCS.setFilter(ageGroupFilter); + + + MeanArrayFunction dhe_pcs_mean_f = new MeanArrayFunction(personsPCS); // Create MeanArrayFunction + dhe_pcs_mean_f.applyFunction(); + setDhe_pcs_mean(dhe_pcs_mean_f.getDoubleValue(IDoubleSource.Variables.Default)); + + PercentileArrayFunction perc_dhe_pcs_f = new PercentileArrayFunction(personsPCS); + perc_dhe_pcs_f.applyFunction(); + + setDhe_pcs_p_10(perc_dhe_pcs_f.getDoubleValue(PercentileArrayFunction.Variables.P10)); + setDhe_pcs_p_25(perc_dhe_pcs_f.getDoubleValue(PercentileArrayFunction.Variables.P25)); + setDhe_pcs_median(perc_dhe_pcs_f.getDoubleValue(PercentileArrayFunction.Variables.P50)); + setDhe_pcs_p_75(perc_dhe_pcs_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); + setDhe_pcs_p_90(perc_dhe_pcs_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + + // Life Satisfaction score + CrossSection.Double personsDls = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dls); + personsDls.setFilter(ageGroupFilter); + + + MeanArrayFunction dls_mean_f = new MeanArrayFunction(personsDls); // Create MeanArrayFunction + dls_mean_f.applyFunction(); + setDls_mean(dls_mean_f.getDoubleValue(IDoubleSource.Variables.Default)); + + PercentileArrayFunction perc_dls_f = new PercentileArrayFunction(personsDls); + perc_dls_f.applyFunction(); + + setDls_p_10(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P10)); + setDls_p_25(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P25)); + setDls_median(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P50)); + setDls_p_75(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); + setDls_p_90(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + // count CrossSection.Integer n_persons = new CrossSection.Integer(model.getPersons(), Person.class, "getPersonCount", true); From fccbd5a44282e557b438cc4764164bccd5009bf4 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Tue, 15 Apr 2025 11:04:16 +0100 Subject: [PATCH 04/18] add qaly and wellby calcs --- .../data/statistics/HealthStatistics.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index a90ff5952..3bc940439 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -109,6 +109,12 @@ public class HealthStatistics { @Column(name = "dls_p_75") private double dls_p_75; + @Column(name = "qualys") + private double qalys; + + @Column(name = "wellbys") + private double wellbys; + //N @Column(name = "N") private int N; @@ -225,6 +231,14 @@ public void setN(int n) { N = n; } + public void setQalys(double qalys) { + this.qalys = qalys; + } + + public void setWellbys(double wellbys) { + this.wellbys = wellbys; + } + public void update(SimPathsModel model, String gender_s) { @@ -322,6 +336,20 @@ public void update(SimPathsModel model, String gender_s) { setDls_p_75(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P75)); setDls_p_90(perc_dls_f.getDoubleValue(PercentileArrayFunction.Variables.P90)); + // QALYS as sum of EQ5D + CrossSection.Double personEQ5D = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.He_eq5d); + personEQ5D.setFilter(ageGroupFilter); + + SumArrayFunction.Double qalys = new SumArrayFunction.Double(personEQ5D); + qalys.applyFunction(); + setQalys(qalys.getDoubleValue(IDoubleSource.Variables.Default)); + + // WELLBYs as sum of 'points' in 0-10-scale life satisfaction (adjusted) + + SumArrayFunction.Double wellbys = new SumArrayFunction.Double(personsDls); + wellbys.applyFunction(); + + setWellbys(wellbys.getDoubleValue(IDoubleSource.Variables.Default) * 11 / 7); // count CrossSection.Integer n_persons = new CrossSection.Integer(model.getPersons(), Person.class, "getPersonCount", true); From e51fd656ca0c496dd6539b285406c83560fecbdb Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Fri, 30 May 2025 11:29:14 +0100 Subject: [PATCH 05/18] remove redundant benefit statistics --- .../data/statistics/HealthStatistics.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index 3bc940439..c22103403 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -24,12 +24,6 @@ public class HealthStatistics { @Id private PanelEntityKey key = new PanelEntityKey(1L); - @Column(name = "n_claiming_UC") - private double nClaimingUC; - - @Column(name = "n_claiming_legacy_benefits") - private double nClaimingLegacyBenefits; - @Column(name = "gender") private String gender; @@ -119,14 +113,6 @@ public class HealthStatistics { @Column(name = "N") private int N; - public void setnClaimingUC(double nClaimingUC) { - this.nClaimingUC = nClaimingUC; - } - - public void setnClaimingLegacyBenefits(double nClaimingLegacyBenefits) { - this.nClaimingLegacyBenefits = nClaimingLegacyBenefits; - } - public void setGender(String gender) { this.gender = gender; } @@ -247,23 +233,6 @@ public void update(SimPathsModel model, String gender_s) { // set gender setGender(gender_s); - // Number claiming UC - - CrossSection.Double personsUC = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.D_Econ_benefits_UC); - personsUC.setFilter(ageGroupFilter); - - SumArrayFunction.Double n_claiming_uc_f = new SumArrayFunction.Double(personsUC); - n_claiming_uc_f.applyFunction(); - setnClaimingUC(n_claiming_uc_f.getDoubleValue(IDoubleSource.Variables.Default)); - // Number claiming Legacy Benefits - - CrossSection.Double personsLB = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.D_Econ_benefits_NonUC); - personsLB.setFilter(ageGroupFilter); - - SumArrayFunction.Double n_claiming_lb_f = new SumArrayFunction.Double(personsLB); - n_claiming_lb_f.applyFunction(); - setnClaimingLegacyBenefits(n_claiming_lb_f.getDoubleValue(IDoubleSource.Variables.Default)); - // dhm score CrossSection.Double personsDhm = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhm); // Get cross section of simulated individuals and their mental health using the IDoubleSource interface implemented by Person class. personsDhm.setFilter(ageGroupFilter); From 1eee849a1707d70f99560bd5113bba969fcd982b Mon Sep 17 00:00:00 2001 From: Andrew Baxter Date: Fri, 30 May 2025 12:07:07 +0100 Subject: [PATCH 06/18] Update src/main/java/simpaths/data/statistics/HealthStatistics.java --- src/main/java/simpaths/data/statistics/HealthStatistics.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index c22103403..7d715c848 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -318,7 +318,8 @@ public void update(SimPathsModel model, String gender_s) { SumArrayFunction.Double wellbys = new SumArrayFunction.Double(personsDls); wellbys.applyFunction(); - setWellbys(wellbys.getDoubleValue(IDoubleSource.Variables.Default) * 11 / 7); + final double WELLBEING_MEASURE_ADJUSTMENT = (double) 11 / 7; + setWellbys(wellbys.getDoubleValue(IDoubleSource.Variables.Default) * WELLBEING_MEASURE_ADJUSTMENT); // count CrossSection.Integer n_persons = new CrossSection.Integer(model.getPersons(), Person.class, "getPersonCount", true); From 169b5f878245d595c5fe9d634bf042dc8b85fa23 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Wed, 16 Apr 2025 08:12:31 +0100 Subject: [PATCH 07/18] switch eq5d process to end of year --- src/main/java/simpaths/model/SimPathsModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/simpaths/model/SimPathsModel.java b/src/main/java/simpaths/model/SimPathsModel.java index d48751e57..d557fd708 100644 --- a/src/main/java/simpaths/model/SimPathsModel.java +++ b/src/main/java/simpaths/model/SimPathsModel.java @@ -588,13 +588,13 @@ public void buildSchedule() { yearlySchedule.addCollectionEvent(persons, Person.Processes.HealthPCS2); yearlySchedule.addCollectionEvent(persons, Person.Processes.LifeSatisfaction2); - addCollectionEventToAllYears(persons, Person.Processes.HealthEQ5D); // mortality (migration) and population alignment at year's end addCollectionEventToAllYears(persons, Person.Processes.ConsiderMortality); addEventToAllYears(Processes.PopulationAlignment); // END OF YEAR PROCESSES + addCollectionEventToAllYears(persons, Person.Processes.HealthEQ5D); addEventToAllYears(Processes.CheckForImperfectTaxDBMatches); addEventToAllYears(tests, Tests.Processes.RunTests); //Run tests addEventToAllYears(Processes.EndYear); From 289f6675146da960dc2add06c8b4ba8e35e24b2c Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 13:41:27 +0100 Subject: [PATCH 08/18] add gender filter to SimPathsCollector for wellbeing statistics --- .../simpaths/experiment/SimPathsCollector.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/simpaths/experiment/SimPathsCollector.java b/src/main/java/simpaths/experiment/SimPathsCollector.java index c3b604d54..a8089c31e 100644 --- a/src/main/java/simpaths/experiment/SimPathsCollector.java +++ b/src/main/java/simpaths/experiment/SimPathsCollector.java @@ -244,12 +244,16 @@ public void onEvent(Enum type) { } break; case DumpHealthStatistics: - statsHealth.update(model, "Total"); - try { - exportHealthStatistics.export(); - } catch (Exception e) { - log.error(e.getMessage()); + String[] genders = {"Total", "Male", "Female"}; + for (String gender_s: genders) { + statsHealth.update(model, gender_s); + try { + exportHealthStatistics.export(); + } catch (Exception e) { + log.error(e.getMessage()); + } } + break; } } From 2a6a1e2503767482defeee24a996620b9a325135 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 13:43:45 +0100 Subject: [PATCH 09/18] move adjustmant variable to class --- src/main/java/simpaths/data/statistics/HealthStatistics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index 7d715c848..df1c7334d 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -318,7 +318,7 @@ public void update(SimPathsModel model, String gender_s) { SumArrayFunction.Double wellbys = new SumArrayFunction.Double(personsDls); wellbys.applyFunction(); - final double WELLBEING_MEASURE_ADJUSTMENT = (double) 11 / 7; + setWellbys(wellbys.getDoubleValue(IDoubleSource.Variables.Default) * WELLBEING_MEASURE_ADJUSTMENT); // count From 461bb43b0c016971c29ed76fa6c61db029d8d1a8 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Fri, 8 Dec 2023 12:52:45 +0000 Subject: [PATCH 10/18] alternate age+gender filter --- .../data/filters/AgeGenderCSfilter.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/java/simpaths/data/filters/AgeGenderCSfilter.java diff --git a/src/main/java/simpaths/data/filters/AgeGenderCSfilter.java b/src/main/java/simpaths/data/filters/AgeGenderCSfilter.java new file mode 100644 index 000000000..d4053135a --- /dev/null +++ b/src/main/java/simpaths/data/filters/AgeGenderCSfilter.java @@ -0,0 +1,33 @@ +package simpaths.data.filters; + +import microsim.statistics.ICollectionFilter; +import simpaths.model.Person; +import simpaths.model.enums.Gender; + +public class AgeGenderCSfilter implements ICollectionFilter { + + private final Gender gender; + private final int ageFrom; + private final int ageTo; + public AgeGenderCSfilter(int ageFrom, int ageTo) { + super(); + this.ageFrom = ageFrom; + this.ageTo = ageTo; + this.gender = null; + } + public AgeGenderCSfilter(int ageFrom, int ageTo, Gender gender) { + super(); + this.ageFrom = ageFrom; + this.ageTo = ageTo; + this.gender = gender; + } + + @Override + public boolean isFiltered(Object object) { + Person person = (Person) object; + if (this.gender == null) + return ( (person.getDag() >= ageFrom) && (person.getDag() <= ageTo) ); + else + return ( (person.getDag() >= ageFrom) && (person.getDag() <= ageTo) && (person.getDgn().equals(gender))); + } +} From c31a7ed23d7aa645eb4e7adcc9bf305497970e2a Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 14:04:55 +0100 Subject: [PATCH 11/18] re-insert adjustment variable --- src/main/java/simpaths/data/statistics/HealthStatistics.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index df1c7334d..e5ecd9901 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -3,6 +3,7 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; +import jakarta.persistence.Transient; import microsim.data.db.PanelEntityKey; import microsim.statistics.CrossSection; import microsim.statistics.IDoubleSource; @@ -113,6 +114,9 @@ public class HealthStatistics { @Column(name = "N") private int N; + @Transient + final static double WELLBEING_MEASURE_ADJUSTMENT = (double) 11 / 7; + public void setGender(String gender) { this.gender = gender; } From 7486ae972768f4e376f699dcd8e7b1b518fb26fe Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 14:23:37 +0100 Subject: [PATCH 12/18] apply gender filter --- .../data/statistics/HealthStatistics.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index e5ecd9901..84e2447b6 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -12,6 +12,7 @@ import microsim.statistics.functions.MeanArrayFunction; import microsim.statistics.functions.PercentileArrayFunction; import microsim.statistics.functions.SumArrayFunction; +import simpaths.data.filters.AgeGenderCSfilter; import simpaths.data.filters.AgeGroupCSfilter; import simpaths.model.Person; import simpaths.model.SimPathsModel; @@ -232,14 +233,20 @@ public void setWellbys(double wellbys) { public void update(SimPathsModel model, String gender_s) { - AgeGroupCSfilter ageGroupFilter = new AgeGroupCSfilter(18, 65); + AgeGenderCSfilter ageGenderCSfilter; + + if (gender_s.equals("Total")) { + ageGenderCSfilter = new AgeGenderCSfilter(18, 65); + } else { + ageGenderCSfilter = new AgeGenderCSfilter(18, 65, Gender.valueOf(gender_s)); + } // set gender setGender(gender_s); // dhm score CrossSection.Double personsDhm = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhm); // Get cross section of simulated individuals and their mental health using the IDoubleSource interface implemented by Person class. - personsDhm.setFilter(ageGroupFilter); + personsDhm.setFilter(ageGenderCSfilter); MeanArrayFunction dhm_mean_f = new MeanArrayFunction(personsDhm); // Create MeanArrayFunction @@ -257,7 +264,7 @@ public void update(SimPathsModel model, String gender_s) { // mcs score CrossSection.Double personsMCS = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhe_mcs); - personsMCS.setFilter(ageGroupFilter); + personsMCS.setFilter(ageGenderCSfilter); MeanArrayFunction dhe_mcs_mean_f = new MeanArrayFunction(personsMCS); // Create MeanArrayFunction @@ -275,7 +282,7 @@ public void update(SimPathsModel model, String gender_s) { // pcs score CrossSection.Double personsPCS = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dhe_pcs); - personsPCS.setFilter(ageGroupFilter); + personsPCS.setFilter(ageGenderCSfilter); MeanArrayFunction dhe_pcs_mean_f = new MeanArrayFunction(personsPCS); // Create MeanArrayFunction @@ -293,7 +300,7 @@ public void update(SimPathsModel model, String gender_s) { // Life Satisfaction score CrossSection.Double personsDls = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.Dls); - personsDls.setFilter(ageGroupFilter); + personsDls.setFilter(ageGenderCSfilter); MeanArrayFunction dls_mean_f = new MeanArrayFunction(personsDls); // Create MeanArrayFunction @@ -311,7 +318,7 @@ public void update(SimPathsModel model, String gender_s) { // QALYS as sum of EQ5D CrossSection.Double personEQ5D = new CrossSection.Double(model.getPersons(), Person.DoublesVariables.He_eq5d); - personEQ5D.setFilter(ageGroupFilter); + personEQ5D.setFilter(ageGenderCSfilter); SumArrayFunction.Double qalys = new SumArrayFunction.Double(personEQ5D); qalys.applyFunction(); @@ -327,7 +334,7 @@ public void update(SimPathsModel model, String gender_s) { // count CrossSection.Integer n_persons = new CrossSection.Integer(model.getPersons(), Person.class, "getPersonCount", true); - n_persons.setFilter(ageGroupFilter); + n_persons.setFilter(ageGenderCSfilter); SumArrayFunction.Integer count_f = new SumArrayFunction.Integer(n_persons); count_f.applyFunction(); From 1410ca9810e888ee70c608d80d56fb1eaa6b2af1 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 14:52:22 +0100 Subject: [PATCH 13/18] tidy file header --- src/main/java/simpaths/data/statistics/HealthStatistics.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/simpaths/data/statistics/HealthStatistics.java b/src/main/java/simpaths/data/statistics/HealthStatistics.java index 84e2447b6..6d42ec693 100644 --- a/src/main/java/simpaths/data/statistics/HealthStatistics.java +++ b/src/main/java/simpaths/data/statistics/HealthStatistics.java @@ -7,18 +7,13 @@ import microsim.data.db.PanelEntityKey; import microsim.statistics.CrossSection; import microsim.statistics.IDoubleSource; -import microsim.statistics.IIntSource; -import microsim.statistics.functions.CountArrayFunction; import microsim.statistics.functions.MeanArrayFunction; import microsim.statistics.functions.PercentileArrayFunction; import microsim.statistics.functions.SumArrayFunction; import simpaths.data.filters.AgeGenderCSfilter; -import simpaths.data.filters.AgeGroupCSfilter; import simpaths.model.Person; import simpaths.model.SimPathsModel; import simpaths.model.enums.Gender; -import simpaths.data.filters.GenderCSfilter; -import simpaths.data.filters.MaleAgeGroupCSfilter; @Entity public class HealthStatistics { From d8bb52c958ae7f076c7e362d38182ab047ac686e Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 15:40:19 +0100 Subject: [PATCH 14/18] added health statistics to testing --- .../RunSimPathsIntegrationTest.java | 4 +++ .../expected/HealthStatistics1.csv | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv diff --git a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java index 77b88102c..dec7e4fba 100644 --- a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java +++ b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java @@ -81,6 +81,10 @@ void testVerifySimulationOutput() throws IOException { latestOutputDir.resolve("csv/Statistics31.csv"), Paths.get("src/test/java/simpaths/integrationtest/expected/Statistics31.csv") ); + compareFiles( + latestOutputDir.resolve("csv/HealthStatistics1.csv"), + Paths.get("src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv") + ); } void compareFiles(Path actualFile, Path expectedFile) throws IOException { diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv new file mode 100644 index 000000000..047333a11 --- /dev/null +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -0,0 +1,25 @@ +run,time,id_HealthStatistics1,N,dhe_mcs_mean,dhe_mcs_median,dhe_mcs_p_10,dhe_mcs_p_25,dhe_mcs_p_75,dhe_mcs_p_90,dhe_pcs_mean,dhe_pcs_median,dhe_pcs_p_10,dhe_pcs_p_25,dhe_pcs_p_75,dhe_pcs_p_90,dhm_mean,dhm_median,dhm_p_10,dhm_p_25,dhm_p_75,dhm_p_90,dls_mean,dls_median,dls_p_10,dls_p_25,dls_p_75,dls_p_90,gender,qalys,wellbys, +1,2019.0,1,11912,47.6846827602495,49.459999,33.259998,41.880001,54.939999,57.73,51.7019543573706,54.799999,38.0,48.81250075,57.759998,59.889999,11.374664204163869,10.0,6.0,8.0,13.0,19.0,5.097968435191404,6.0,3.0,4.0,6.0,6.0,Total,9971.687780376675,95428.14285714286, +1,2019.0,1,5863,48.64184896849732,51.0,35.200001,43.650002,55.540001,58.150002,52.26975268630379,55.0,40.490002,49.689999,57.759998,59.889999,10.875660924441412,10.0,6.0,8.0,12.0,17.0,5.082551594746716,5.0,3.0,4.0,6.0,6.0,Male,5006.7171976368745,46827.0, +1,2019.0,1,6049,46.7569483448173,48.869999,32.18,41.07,54.369999,57.330002,51.15161519345359,54.560001,35.959999,47.84,57.700001,59.91,11.858323689866094,11.0,6.0,8.0,14.0,20.0,5.112911224995867,6.0,3.0,4.0,6.0,6.0,Female,4964.970582739763,48601.142857142855, +1,2020.0,1,11889,46.989592738303976,48.1393197784861,38.41687618863189,43.638667483934526,51.50017527366596,53.54493775221328,51.77930620901035,54.14503875614304,41.51348422582166,49.38345958217214,56.70955739565247,58.151056753040166,11.758446571193103,11.527462317307572,4.876438962574287,7.927671062883274,15.289367910590279,18.931897970710914,5.102699974766591,5.0,4.0,5.0,6.0,6.0,Total,9967.68264939443,95332.28571428571, +1,2020.0,1,5850,47.909011051543374,49.08642748128014,39.656096476736,44.808490149058045,52.11869343424933,53.97018354146365,52.398037428758144,54.545569061969985,43.366231690655965,50.27030225992552,56.91382992448003,58.256276254823575,11.191416151119544,11.016257353414257,4.404749431760246,7.487223597183121,14.52991314303323,18.045283389163576,5.069059829059829,5.0,4.0,5.0,6.0,6.0,Male,5003.401736382007,46599.142857142855, +1,2020.0,1,6039,46.09894906676035,47.217938328494846,37.51406720927416,42.7194981260683,50.723849966323996,52.993614777683476,51.17993915560341,53.68717000339239,39.4910297883255,48.29891817568651,56.48005400757043,58.01415302213644,12.307730882739714,11.969514430189479,5.314059972823787,8.473426423322502,15.973514616783456,19.722927497014442,5.1352872992217256,5.0,4.0,5.0,6.0,6.0,Female,4964.280913012372,48733.142857142855, +1,2021.0,1,11975,46.470965290450195,47.12101384088878,40.542994825055175,44.10630290468881,49.588610303650896,51.22693619318092,51.516479656544334,53.20148235139609,43.130320896449845,49.19306341971431,55.71743394598623,57.2702036743562,12.033388979868082,11.912809185546374,4.871181379815584,8.26497991090125,15.678063525752775,19.195228446663393,5.094864300626305,5.0,4.0,5.0,5.0,6.0,Total,9963.916752038753,95874.42857142857, +1,2021.0,1,5879,47.35555748856298,48.02505376175922,41.73629943003981,45.12982367623452,50.25499098719194,51.79321590308252,52.17033421394891,53.65269155826534,44.964443260366515,50.10544568975812,56.029327908800305,57.51600835312004,11.4412727672301,11.305753724978024,4.347231817031747,7.65910895939775,15.006651175894556,18.60560117472343,5.041843850995067,5.0,4.0,5.0,5.0,6.0,Male,4991.513929802648,46578.71428571428, +1,2021.0,1,6096,45.6178620206492,46.21178127313095,39.53319314527016,43.21628491137481,48.739214090945474,50.52398501799033,50.88590043361488,52.64894554563255,41.474442716306605,48.21642988901685,55.43654336950616,56.992634751078114,12.604427564858105,12.419923484085075,5.5279500446372944,8.930231403107042,16.232449280916395,19.668520259507527,5.145997375328084,5.0,4.0,5.0,6.0,6.0,Female,4972.402822236136,49295.71428571428, +1,2022.0,1,12003,46.16353670318441,46.53442490545375,41.565177082937595,44.17880430065882,48.608258460465464,50.195893024267285,51.309496865050654,52.51813490516129,44.382126065146245,48.9722599517446,54.98180352882629,56.551134887656154,12.216088088785167,12.145002984895529,5.151840873920224,8.492985618515679,15.87985386541898,19.123194697959303,5.052570190785637,5.0,4.0,5.0,5.0,6.0,Total,9925.77953973696,95300.85714285714, +1,2022.0,1,5908,47.00218835205224,47.43358347082925,42.460392194538244,45.19368865623038,49.368347568588604,50.79194506700717,51.96803367143151,53.02628053253228,45.752448448570014,49.92172359400038,55.35949459612331,56.84990553778287,11.588837897000582,11.541836875763913,4.525569703381811,7.8932506544149845,15.185630652606333,18.52682421029326,4.991198375084631,5.0,4.0,5.0,5.0,6.0,Male,4983.368697114731,46338.28571428571, +1,2022.0,1,6095,45.350615629925834,45.61259107056451,40.92510131453283,43.44322188970273,47.76082643144686,49.26720065087601,50.67116455133458,51.92354667117712,43.00410252296177,48.10723592106046,54.56942384470303,56.14979590992442,12.824093688959639,12.79574340086456,5.8551064068885825,9.14123034497807,16.46260947702343,19.64955423638721,5.112059064807219,5.0,5.0,5.0,5.0,6.0,Female,4942.410842622156,48962.57142857143, +2,2019.0,1,11918,47.6865926367756,49.459999,33.259998,41.869999,54.939999,57.73,51.691294706494276,54.799999,38.0,48.799999,57.75,59.889999,11.378670917939251,10.0,6.0,8.0,13.0,19.0,5.099009900990099,6.0,3.0,4.0,6.0,6.0,Total,9975.461941403433,95495.71428571429, +2,2019.0,1,5871,48.64592071134385,51.0,35.1520016,43.630001,55.59,58.150002,52.26375745065561,55.0,40.474001200000004,49.66,57.759998,59.889999,10.885368761710101,10.0,6.0,8.0,12.0,17.0,5.083801737353092,6.0,3.0,4.0,6.0,6.0,Male,5013.514160883202,46902.42857142857, +2,2019.0,1,6047,46.75518613342145,48.869999,32.200001,41.060001,54.369999,57.330002,51.13549368599314,54.549999,35.950001,47.779999,57.639999,59.91,11.857615346452787,11.0,6.0,8.0,14.0,20.0,5.11377542583099,6.0,3.0,4.0,6.0,6.0,Female,4961.947780520183,48593.28571428571, +2,2020.0,1,11895,46.987655618877575,48.151237448947164,38.4056397322171,43.610411252842034,51.514947843019456,53.56360421595973,51.78685441622707,54.14503875614304,41.570828803431176,49.36274511590332,56.72006135860413,58.15662648010466,11.769316748317134,11.53547200625642,4.89003349373704,7.925211125955333,15.30128957274282,18.93096529768897,5.105254308532997,5.0,4.0,5.0,6.0,6.0,Total,9974.147427189124,95428.14285714286, +2,2020.0,1,5852,47.93179671207065,49.13313264766329,39.60168887322851,44.823877072249864,52.14261245419464,53.98337613842494,52.42956761990046,54.54924798178466,43.561269179539224,50.283707747853185,56.93619131845283,58.27274492613615,11.183043899667839,11.000226472030693,4.389529644522404,7.4769847545162795,14.521841237169262,18.050756988341043,5.074675324675325,5.0,4.0,5.0,6.0,6.0,Male,5009.3981560736065,46666.71428571428, +2,2020.0,1,6043,46.07335582119981,47.21428599240779,37.422085668427414,42.68139446837373,50.71816361238542,52.98236731430811,51.164455331683264,53.69184818273822,39.56232406912763,48.2773626920339,56.477489033673415,58.01653212813619,12.337059377854676,11.987014904191803,5.355821096457902,8.505432217000672,16.002459855913,19.71929973082456,5.134866788019195,5.0,4.0,5.0,6.0,6.0,Female,4964.749271115486,48761.42857142857, +2,2021.0,1,11999,46.50279427846029,47.16012853966993,40.5761952471103,44.14356725085487,49.60937891222656,51.23793999289799,51.556974255762725,53.23203757394876,43.405781450228005,49.237977262713486,55.70906115328272,57.2699725811176,12.033761264865674,11.93307118871323,4.830434946498378,8.254925144340925,15.654777483207098,19.23713096372461,5.100175014584549,5.0,4.0,5.0,5.0,6.0,Total,9994.199122706834,96166.71428571429, +2,2021.0,1,5894,47.41238639708121,48.09518506553709,41.83978069779761,45.17364056546063,50.283581691386274,51.81575245492448,52.22029612088281,53.64846418480209,45.13093435044965,50.189602173213366,56.041227189369515,57.52869965872664,11.415510180945889,11.29010440938875,4.290692225559505,7.588960438980336,14.99951789106338,18.622927670085325,5.050220563284697,5.0,4.0,5.0,5.0,6.0,Male,5011.480621792737,46775.142857142855, +2,2021.0,1,6105,45.62463933216135,46.226120143249254,39.54293188380232,43.24384109014866,48.69219669247521,50.522718521921185,50.916578011205964,52.692735374312264,41.64188122539541,48.22743795624237,55.433419908353926,56.970131395764824,12.630644457105454,12.506512271007017,5.531998971779491,8.969432958248376,16.225847874280767,19.76095409834243,5.148402948402948,5.0,4.0,5.0,6.0,6.0,Female,4982.718500914101,49391.57142857143, +2,2022.0,1,11948,46.19864349390396,46.54553561457014,41.632055000690386,44.18465412905864,48.63499971929575,50.22072589467866,51.361309482169986,52.521344779594344,44.59630672213333,49.04287326659228,54.98120310956911,56.55953144261586,12.201316761678802,12.186049227755921,5.104895971688017,8.488028042672298,15.858865297994148,19.098855092529835,5.060010043521928,5.0,4.0,5.0,5.0,6.0,Total,9892.660895381778,95003.85714285714, +2,2022.0,1,5884,47.064389511370415,47.48306797282776,42.61738696528468,45.21238932908183,49.42253583234093,50.80946417650887,52.035908426606746,53.021647853210595,46.058372257878304,50.01570443568624,55.35402164215845,56.86894371544204,11.577651201049198,11.615741363529466,4.476987331389441,7.822516109960954,15.144980634169656,18.479079443662823,5.002209381373215,5.0,4.0,5.0,5.0,6.0,Male,4971.922753237598,46251.857142857145, +2,2022.0,1,6064,45.35859574212747,45.61691728212066,40.95648103375535,43.46228130151936,47.6943448543034,49.28596461250856,50.70673491273332,51.97901816569896,43.163363373596745,48.13796688744382,54.57701488513729,56.13473790952146,12.806469822157743,12.735573001775554,5.797741927860734,9.099429682991039,16.45310035929062,19.6125769475795,5.116094986807388,5.0,5.0,5.0,5.0,6.0,Female,4920.738142144183,48752.0, \ No newline at end of file From 07520f051ff7e337fbfb4505d719e43c2309388f Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 16:41:18 +0100 Subject: [PATCH 15/18] update expected health statistics --- .../expected/HealthStatistics1.csv | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv index 047333a11..727d87346 100644 --- a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -2,15 +2,15 @@ run,time,id_HealthStatistics1,N,dhe_mcs_mean,dhe_mcs_median,dhe_mcs_p_10,dhe_mcs 1,2019.0,1,11912,47.6846827602495,49.459999,33.259998,41.880001,54.939999,57.73,51.7019543573706,54.799999,38.0,48.81250075,57.759998,59.889999,11.374664204163869,10.0,6.0,8.0,13.0,19.0,5.097968435191404,6.0,3.0,4.0,6.0,6.0,Total,9971.687780376675,95428.14285714286, 1,2019.0,1,5863,48.64184896849732,51.0,35.200001,43.650002,55.540001,58.150002,52.26975268630379,55.0,40.490002,49.689999,57.759998,59.889999,10.875660924441412,10.0,6.0,8.0,12.0,17.0,5.082551594746716,5.0,3.0,4.0,6.0,6.0,Male,5006.7171976368745,46827.0, 1,2019.0,1,6049,46.7569483448173,48.869999,32.18,41.07,54.369999,57.330002,51.15161519345359,54.560001,35.959999,47.84,57.700001,59.91,11.858323689866094,11.0,6.0,8.0,14.0,20.0,5.112911224995867,6.0,3.0,4.0,6.0,6.0,Female,4964.970582739763,48601.142857142855, -1,2020.0,1,11889,46.989592738303976,48.1393197784861,38.41687618863189,43.638667483934526,51.50017527366596,53.54493775221328,51.77930620901035,54.14503875614304,41.51348422582166,49.38345958217214,56.70955739565247,58.151056753040166,11.758446571193103,11.527462317307572,4.876438962574287,7.927671062883274,15.289367910590279,18.931897970710914,5.102699974766591,5.0,4.0,5.0,6.0,6.0,Total,9967.68264939443,95332.28571428571, -1,2020.0,1,5850,47.909011051543374,49.08642748128014,39.656096476736,44.808490149058045,52.11869343424933,53.97018354146365,52.398037428758144,54.545569061969985,43.366231690655965,50.27030225992552,56.91382992448003,58.256276254823575,11.191416151119544,11.016257353414257,4.404749431760246,7.487223597183121,14.52991314303323,18.045283389163576,5.069059829059829,5.0,4.0,5.0,6.0,6.0,Male,5003.401736382007,46599.142857142855, -1,2020.0,1,6039,46.09894906676035,47.217938328494846,37.51406720927416,42.7194981260683,50.723849966323996,52.993614777683476,51.17993915560341,53.68717000339239,39.4910297883255,48.29891817568651,56.48005400757043,58.01415302213644,12.307730882739714,11.969514430189479,5.314059972823787,8.473426423322502,15.973514616783456,19.722927497014442,5.1352872992217256,5.0,4.0,5.0,6.0,6.0,Female,4964.280913012372,48733.142857142855, -1,2021.0,1,11975,46.470965290450195,47.12101384088878,40.542994825055175,44.10630290468881,49.588610303650896,51.22693619318092,51.516479656544334,53.20148235139609,43.130320896449845,49.19306341971431,55.71743394598623,57.2702036743562,12.033388979868082,11.912809185546374,4.871181379815584,8.26497991090125,15.678063525752775,19.195228446663393,5.094864300626305,5.0,4.0,5.0,5.0,6.0,Total,9963.916752038753,95874.42857142857, -1,2021.0,1,5879,47.35555748856298,48.02505376175922,41.73629943003981,45.12982367623452,50.25499098719194,51.79321590308252,52.17033421394891,53.65269155826534,44.964443260366515,50.10544568975812,56.029327908800305,57.51600835312004,11.4412727672301,11.305753724978024,4.347231817031747,7.65910895939775,15.006651175894556,18.60560117472343,5.041843850995067,5.0,4.0,5.0,5.0,6.0,Male,4991.513929802648,46578.71428571428, -1,2021.0,1,6096,45.6178620206492,46.21178127313095,39.53319314527016,43.21628491137481,48.739214090945474,50.52398501799033,50.88590043361488,52.64894554563255,41.474442716306605,48.21642988901685,55.43654336950616,56.992634751078114,12.604427564858105,12.419923484085075,5.5279500446372944,8.930231403107042,16.232449280916395,19.668520259507527,5.145997375328084,5.0,4.0,5.0,6.0,6.0,Female,4972.402822236136,49295.71428571428, -1,2022.0,1,12003,46.16353670318441,46.53442490545375,41.565177082937595,44.17880430065882,48.608258460465464,50.195893024267285,51.309496865050654,52.51813490516129,44.382126065146245,48.9722599517446,54.98180352882629,56.551134887656154,12.216088088785167,12.145002984895529,5.151840873920224,8.492985618515679,15.87985386541898,19.123194697959303,5.052570190785637,5.0,4.0,5.0,5.0,6.0,Total,9925.77953973696,95300.85714285714, -1,2022.0,1,5908,47.00218835205224,47.43358347082925,42.460392194538244,45.19368865623038,49.368347568588604,50.79194506700717,51.96803367143151,53.02628053253228,45.752448448570014,49.92172359400038,55.35949459612331,56.84990553778287,11.588837897000582,11.541836875763913,4.525569703381811,7.8932506544149845,15.185630652606333,18.52682421029326,4.991198375084631,5.0,4.0,5.0,5.0,6.0,Male,4983.368697114731,46338.28571428571, -1,2022.0,1,6095,45.350615629925834,45.61259107056451,40.92510131453283,43.44322188970273,47.76082643144686,49.26720065087601,50.67116455133458,51.92354667117712,43.00410252296177,48.10723592106046,54.56942384470303,56.14979590992442,12.824093688959639,12.79574340086456,5.8551064068885825,9.14123034497807,16.46260947702343,19.64955423638721,5.112059064807219,5.0,5.0,5.0,5.0,6.0,Female,4942.410842622156,48962.57142857143, +1,2020.0,1,11889,46.989597311998956,48.1393197784861,38.41687618863189,43.638667483934526,51.50017527366596,53.54493775221328,51.77924200925519,54.14503875614304,41.51348422582166,49.38345958217214,56.70955739565247,58.151056753040166,11.757394864347324,11.528492321343515,4.876438962574287,7.925414720517048,15.289139301859024,18.93162998331923,5.102699974766591,5.0,4.0,5.0,6.0,6.0,Total,9967.672528518131,95332.28571428571, +1,2020.0,1,5850,47.90904067711409,49.08642748128014,39.656096476736,44.808490149058045,52.11869343424933,53.97018354146365,52.39801195008723,54.545569061969985,43.366231690655965,50.27030225992552,56.91382992448003,58.256276254823575,11.189088564239633,11.016257353414257,4.404749431760246,7.483300775950306,14.528213486023558,18.041670193550353,5.069059829059829,5.0,4.0,5.0,6.0,6.0,Male,5003.401417525998,46599.142857142855, +1,2020.0,1,6039,46.09892937261742,47.217938328494846,37.51406720927416,42.7194981260683,50.723849966323996,52.993614777683476,51.179837446601184,53.68717000339239,39.4910297883255,48.29891817568651,56.48005400757043,58.01415302213644,12.307915125256365,11.970421869760605,5.314059972823787,8.473426423322502,15.973514616783456,19.722927497014442,5.1352872992217256,5.0,4.0,5.0,6.0,6.0,Female,4964.271110992084,48733.142857142855, +1,2021.0,1,11962,46.48969046140017,47.1398940507237,40.571936270660515,44.13546346897442,49.58889499471092,51.22896553712098,51.5422615453002,53.23190736195366,43.18842016036475,49.23106222755377,55.73171797179152,57.28066823192914,12.006646271330942,11.890630817787557,4.85750085250165,8.238568232651609,15.640077999654341,19.151214001624634,5.09755893663267,5.0,4.0,5.0,5.0,6.0,Total,9959.481566621638,95821.0, +1,2021.0,1,5871,47.36555337207517,48.04637599735007,41.75238769692619,45.159774156671396,50.251827803707066,51.80275110516761,52.18335903305621,53.669584639650516,44.96767034430787,50.116452794481205,56.03854507030852,57.51881154447242,11.426474482578287,11.29732620703119,4.340100959356683,7.645645893478452,14.974967478066505,18.56120262958247,5.0444557996934085,5.0,4.0,5.0,5.0,6.0,Male,4986.278429395813,46539.42857142857, +1,2021.0,1,6091,45.64546272398853,46.23411771238269,39.580331651097495,43.25845701649444,48.74662726642156,50.54397325246857,50.924319770450005,52.683108496147106,41.54682260162193,48.29368229488137,55.44416529763444,57.01185845239983,12.565862914208504,12.392770559945808,5.484627890513935,8.882710139942624,16.202955374079426,19.652067122487516,5.148744048596289,5.0,4.0,5.0,6.0,6.0,Female,4973.203137225868,49281.57142857143, +1,2022.0,1,11990,46.179054206709246,46.54484455541899,41.58768319003643,44.190465737117684,48.61167545871907,50.214634385327635,51.33582263670399,52.53643935133975,44.453441163548824,49.00742995685996,54.99106063171307,56.54782252681209,12.202546671151357,12.12806677740104,5.113192112441769,8.485317849049814,15.867713525564866,19.137302785910805,5.054795663052544,5.0,4.0,5.0,5.0,6.0,Total,9920.923920276564,95239.57142857142, +1,2022.0,1,5902,47.011279468968574,47.451231966372234,42.48218468411369,45.21128592921063,49.362679113305106,50.794654669001055,51.98076191089878,53.0581285467714,45.79235135063528,49.93452051524801,55.38260599740256,56.84799769072629,11.596406547733714,11.561504738288267,4.520201241665037,7.886596212222753,15.177838623717653,18.53227099827084,4.992544900033887,5.0,4.0,5.0,5.0,6.0,Male,4979.750687227202,46303.71428571428, +1,2022.0,1,6088,45.37225501192354,45.618682247385465,40.95388995109886,43.46034216648184,47.77681367823123,49.2978450533557,50.71058748619472,51.94703705894068,43.14645952650217,48.151000336624705,54.576010687902894,56.137906774052155,12.79016805886664,12.735573001775554,5.812181494602758,9.095161785442725,16.43254524752819,19.666165798763846,5.115144546649145,5.0,5.0,5.0,5.0,6.0,Female,4941.173233049329,48935.857142857145, 2,2019.0,1,11918,47.6865926367756,49.459999,33.259998,41.869999,54.939999,57.73,51.691294706494276,54.799999,38.0,48.799999,57.75,59.889999,11.378670917939251,10.0,6.0,8.0,13.0,19.0,5.099009900990099,6.0,3.0,4.0,6.0,6.0,Total,9975.461941403433,95495.71428571429, 2,2019.0,1,5871,48.64592071134385,51.0,35.1520016,43.630001,55.59,58.150002,52.26375745065561,55.0,40.474001200000004,49.66,57.759998,59.889999,10.885368761710101,10.0,6.0,8.0,12.0,17.0,5.083801737353092,6.0,3.0,4.0,6.0,6.0,Male,5013.514160883202,46902.42857142857, 2,2019.0,1,6047,46.75518613342145,48.869999,32.200001,41.060001,54.369999,57.330002,51.13549368599314,54.549999,35.950001,47.779999,57.639999,59.91,11.857615346452787,11.0,6.0,8.0,14.0,20.0,5.11377542583099,6.0,3.0,4.0,6.0,6.0,Female,4961.947780520183,48593.28571428571, From 6c476e7811f4733729d2033911a4c1c5b20fab64 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 19:09:01 +0100 Subject: [PATCH 16/18] remove failing test --- .../simpaths/integrationtest/RunSimPathsIntegrationTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java index dec7e4fba..2cc972a14 100644 --- a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java +++ b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java @@ -54,6 +54,7 @@ void testRunSimulation() { "-e", "2022", "-r", "100", "-n", "2", + "-P", "root", "-g", "false" ); } @@ -81,10 +82,6 @@ void testVerifySimulationOutput() throws IOException { latestOutputDir.resolve("csv/Statistics31.csv"), Paths.get("src/test/java/simpaths/integrationtest/expected/Statistics31.csv") ); - compareFiles( - latestOutputDir.resolve("csv/HealthStatistics1.csv"), - Paths.get("src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv") - ); } void compareFiles(Path actualFile, Path expectedFile) throws IOException { From 6ab56af5ac47177c0052f5b81f249c6a7e916d9a Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 22:18:51 +0100 Subject: [PATCH 17/18] Revert "remove failing test" This reverts commit 6c476e7811f4733729d2033911a4c1c5b20fab64. --- .../simpaths/integrationtest/RunSimPathsIntegrationTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java index 2cc972a14..dec7e4fba 100644 --- a/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java +++ b/src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java @@ -54,7 +54,6 @@ void testRunSimulation() { "-e", "2022", "-r", "100", "-n", "2", - "-P", "root", "-g", "false" ); } @@ -82,6 +81,10 @@ void testVerifySimulationOutput() throws IOException { latestOutputDir.resolve("csv/Statistics31.csv"), Paths.get("src/test/java/simpaths/integrationtest/expected/Statistics31.csv") ); + compareFiles( + latestOutputDir.resolve("csv/HealthStatistics1.csv"), + Paths.get("src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv") + ); } void compareFiles(Path actualFile, Path expectedFile) throws IOException { From 6741ffd5ded028070e5a34948abe9636172fb7f5 Mon Sep 17 00:00:00 2001 From: Andy Baxter Date: Mon, 2 Jun 2025 23:10:19 +0100 Subject: [PATCH 18/18] corrected health statistics test file --- .../expected/HealthStatistics1.csv | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv index 727d87346..496694e8d 100644 --- a/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv +++ b/src/test/java/simpaths/integrationtest/expected/HealthStatistics1.csv @@ -1,25 +1,25 @@ run,time,id_HealthStatistics1,N,dhe_mcs_mean,dhe_mcs_median,dhe_mcs_p_10,dhe_mcs_p_25,dhe_mcs_p_75,dhe_mcs_p_90,dhe_pcs_mean,dhe_pcs_median,dhe_pcs_p_10,dhe_pcs_p_25,dhe_pcs_p_75,dhe_pcs_p_90,dhm_mean,dhm_median,dhm_p_10,dhm_p_25,dhm_p_75,dhm_p_90,dls_mean,dls_median,dls_p_10,dls_p_25,dls_p_75,dls_p_90,gender,qalys,wellbys, -1,2019.0,1,11912,47.6846827602495,49.459999,33.259998,41.880001,54.939999,57.73,51.7019543573706,54.799999,38.0,48.81250075,57.759998,59.889999,11.374664204163869,10.0,6.0,8.0,13.0,19.0,5.097968435191404,6.0,3.0,4.0,6.0,6.0,Total,9971.687780376675,95428.14285714286, -1,2019.0,1,5863,48.64184896849732,51.0,35.200001,43.650002,55.540001,58.150002,52.26975268630379,55.0,40.490002,49.689999,57.759998,59.889999,10.875660924441412,10.0,6.0,8.0,12.0,17.0,5.082551594746716,5.0,3.0,4.0,6.0,6.0,Male,5006.7171976368745,46827.0, -1,2019.0,1,6049,46.7569483448173,48.869999,32.18,41.07,54.369999,57.330002,51.15161519345359,54.560001,35.959999,47.84,57.700001,59.91,11.858323689866094,11.0,6.0,8.0,14.0,20.0,5.112911224995867,6.0,3.0,4.0,6.0,6.0,Female,4964.970582739763,48601.142857142855, -1,2020.0,1,11889,46.989597311998956,48.1393197784861,38.41687618863189,43.638667483934526,51.50017527366596,53.54493775221328,51.77924200925519,54.14503875614304,41.51348422582166,49.38345958217214,56.70955739565247,58.151056753040166,11.757394864347324,11.528492321343515,4.876438962574287,7.925414720517048,15.289139301859024,18.93162998331923,5.102699974766591,5.0,4.0,5.0,6.0,6.0,Total,9967.672528518131,95332.28571428571, -1,2020.0,1,5850,47.90904067711409,49.08642748128014,39.656096476736,44.808490149058045,52.11869343424933,53.97018354146365,52.39801195008723,54.545569061969985,43.366231690655965,50.27030225992552,56.91382992448003,58.256276254823575,11.189088564239633,11.016257353414257,4.404749431760246,7.483300775950306,14.528213486023558,18.041670193550353,5.069059829059829,5.0,4.0,5.0,6.0,6.0,Male,5003.401417525998,46599.142857142855, -1,2020.0,1,6039,46.09892937261742,47.217938328494846,37.51406720927416,42.7194981260683,50.723849966323996,52.993614777683476,51.179837446601184,53.68717000339239,39.4910297883255,48.29891817568651,56.48005400757043,58.01415302213644,12.307915125256365,11.970421869760605,5.314059972823787,8.473426423322502,15.973514616783456,19.722927497014442,5.1352872992217256,5.0,4.0,5.0,6.0,6.0,Female,4964.271110992084,48733.142857142855, -1,2021.0,1,11962,46.48969046140017,47.1398940507237,40.571936270660515,44.13546346897442,49.58889499471092,51.22896553712098,51.5422615453002,53.23190736195366,43.18842016036475,49.23106222755377,55.73171797179152,57.28066823192914,12.006646271330942,11.890630817787557,4.85750085250165,8.238568232651609,15.640077999654341,19.151214001624634,5.09755893663267,5.0,4.0,5.0,5.0,6.0,Total,9959.481566621638,95821.0, -1,2021.0,1,5871,47.36555337207517,48.04637599735007,41.75238769692619,45.159774156671396,50.251827803707066,51.80275110516761,52.18335903305621,53.669584639650516,44.96767034430787,50.116452794481205,56.03854507030852,57.51881154447242,11.426474482578287,11.29732620703119,4.340100959356683,7.645645893478452,14.974967478066505,18.56120262958247,5.0444557996934085,5.0,4.0,5.0,5.0,6.0,Male,4986.278429395813,46539.42857142857, -1,2021.0,1,6091,45.64546272398853,46.23411771238269,39.580331651097495,43.25845701649444,48.74662726642156,50.54397325246857,50.924319770450005,52.683108496147106,41.54682260162193,48.29368229488137,55.44416529763444,57.01185845239983,12.565862914208504,12.392770559945808,5.484627890513935,8.882710139942624,16.202955374079426,19.652067122487516,5.148744048596289,5.0,4.0,5.0,6.0,6.0,Female,4973.203137225868,49281.57142857143, -1,2022.0,1,11990,46.179054206709246,46.54484455541899,41.58768319003643,44.190465737117684,48.61167545871907,50.214634385327635,51.33582263670399,52.53643935133975,44.453441163548824,49.00742995685996,54.99106063171307,56.54782252681209,12.202546671151357,12.12806677740104,5.113192112441769,8.485317849049814,15.867713525564866,19.137302785910805,5.054795663052544,5.0,4.0,5.0,5.0,6.0,Total,9920.923920276564,95239.57142857142, -1,2022.0,1,5902,47.011279468968574,47.451231966372234,42.48218468411369,45.21128592921063,49.362679113305106,50.794654669001055,51.98076191089878,53.0581285467714,45.79235135063528,49.93452051524801,55.38260599740256,56.84799769072629,11.596406547733714,11.561504738288267,4.520201241665037,7.886596212222753,15.177838623717653,18.53227099827084,4.992544900033887,5.0,4.0,5.0,5.0,6.0,Male,4979.750687227202,46303.71428571428, -1,2022.0,1,6088,45.37225501192354,45.618682247385465,40.95388995109886,43.46034216648184,47.77681367823123,49.2978450533557,50.71058748619472,51.94703705894068,43.14645952650217,48.151000336624705,54.576010687902894,56.137906774052155,12.79016805886664,12.735573001775554,5.812181494602758,9.095161785442725,16.43254524752819,19.666165798763846,5.115144546649145,5.0,5.0,5.0,5.0,6.0,Female,4941.173233049329,48935.857142857145, -2,2019.0,1,11918,47.6865926367756,49.459999,33.259998,41.869999,54.939999,57.73,51.691294706494276,54.799999,38.0,48.799999,57.75,59.889999,11.378670917939251,10.0,6.0,8.0,13.0,19.0,5.099009900990099,6.0,3.0,4.0,6.0,6.0,Total,9975.461941403433,95495.71428571429, -2,2019.0,1,5871,48.64592071134385,51.0,35.1520016,43.630001,55.59,58.150002,52.26375745065561,55.0,40.474001200000004,49.66,57.759998,59.889999,10.885368761710101,10.0,6.0,8.0,12.0,17.0,5.083801737353092,6.0,3.0,4.0,6.0,6.0,Male,5013.514160883202,46902.42857142857, -2,2019.0,1,6047,46.75518613342145,48.869999,32.200001,41.060001,54.369999,57.330002,51.13549368599314,54.549999,35.950001,47.779999,57.639999,59.91,11.857615346452787,11.0,6.0,8.0,14.0,20.0,5.11377542583099,6.0,3.0,4.0,6.0,6.0,Female,4961.947780520183,48593.28571428571, -2,2020.0,1,11895,46.987655618877575,48.151237448947164,38.4056397322171,43.610411252842034,51.514947843019456,53.56360421595973,51.78685441622707,54.14503875614304,41.570828803431176,49.36274511590332,56.72006135860413,58.15662648010466,11.769316748317134,11.53547200625642,4.89003349373704,7.925211125955333,15.30128957274282,18.93096529768897,5.105254308532997,5.0,4.0,5.0,6.0,6.0,Total,9974.147427189124,95428.14285714286, -2,2020.0,1,5852,47.93179671207065,49.13313264766329,39.60168887322851,44.823877072249864,52.14261245419464,53.98337613842494,52.42956761990046,54.54924798178466,43.561269179539224,50.283707747853185,56.93619131845283,58.27274492613615,11.183043899667839,11.000226472030693,4.389529644522404,7.4769847545162795,14.521841237169262,18.050756988341043,5.074675324675325,5.0,4.0,5.0,6.0,6.0,Male,5009.3981560736065,46666.71428571428, -2,2020.0,1,6043,46.07335582119981,47.21428599240779,37.422085668427414,42.68139446837373,50.71816361238542,52.98236731430811,51.164455331683264,53.69184818273822,39.56232406912763,48.2773626920339,56.477489033673415,58.01653212813619,12.337059377854676,11.987014904191803,5.355821096457902,8.505432217000672,16.002459855913,19.71929973082456,5.134866788019195,5.0,4.0,5.0,6.0,6.0,Female,4964.749271115486,48761.42857142857, -2,2021.0,1,11999,46.50279427846029,47.16012853966993,40.5761952471103,44.14356725085487,49.60937891222656,51.23793999289799,51.556974255762725,53.23203757394876,43.405781450228005,49.237977262713486,55.70906115328272,57.2699725811176,12.033761264865674,11.93307118871323,4.830434946498378,8.254925144340925,15.654777483207098,19.23713096372461,5.100175014584549,5.0,4.0,5.0,5.0,6.0,Total,9994.199122706834,96166.71428571429, -2,2021.0,1,5894,47.41238639708121,48.09518506553709,41.83978069779761,45.17364056546063,50.283581691386274,51.81575245492448,52.22029612088281,53.64846418480209,45.13093435044965,50.189602173213366,56.041227189369515,57.52869965872664,11.415510180945889,11.29010440938875,4.290692225559505,7.588960438980336,14.99951789106338,18.622927670085325,5.050220563284697,5.0,4.0,5.0,5.0,6.0,Male,5011.480621792737,46775.142857142855, -2,2021.0,1,6105,45.62463933216135,46.226120143249254,39.54293188380232,43.24384109014866,48.69219669247521,50.522718521921185,50.916578011205964,52.692735374312264,41.64188122539541,48.22743795624237,55.433419908353926,56.970131395764824,12.630644457105454,12.506512271007017,5.531998971779491,8.969432958248376,16.225847874280767,19.76095409834243,5.148402948402948,5.0,4.0,5.0,6.0,6.0,Female,4982.718500914101,49391.57142857143, -2,2022.0,1,11948,46.19864349390396,46.54553561457014,41.632055000690386,44.18465412905864,48.63499971929575,50.22072589467866,51.361309482169986,52.521344779594344,44.59630672213333,49.04287326659228,54.98120310956911,56.55953144261586,12.201316761678802,12.186049227755921,5.104895971688017,8.488028042672298,15.858865297994148,19.098855092529835,5.060010043521928,5.0,4.0,5.0,5.0,6.0,Total,9892.660895381778,95003.85714285714, -2,2022.0,1,5884,47.064389511370415,47.48306797282776,42.61738696528468,45.21238932908183,49.42253583234093,50.80946417650887,52.035908426606746,53.021647853210595,46.058372257878304,50.01570443568624,55.35402164215845,56.86894371544204,11.577651201049198,11.615741363529466,4.476987331389441,7.822516109960954,15.144980634169656,18.479079443662823,5.002209381373215,5.0,4.0,5.0,5.0,6.0,Male,4971.922753237598,46251.857142857145, -2,2022.0,1,6064,45.35859574212747,45.61691728212066,40.95648103375535,43.46228130151936,47.6943448543034,49.28596461250856,50.70673491273332,51.97901816569896,43.163363373596745,48.13796688744382,54.57701488513729,56.13473790952146,12.806469822157743,12.735573001775554,5.797741927860734,9.099429682991039,16.45310035929062,19.6125769475795,5.116094986807388,5.0,5.0,5.0,5.0,6.0,Female,4920.738142144183,48752.0, \ No newline at end of file +1,2019.0,1,11898,47.31176500252107,49.35,32.26,41.45,54.79,58.05,51.69369894099909,55.0,37.79,48.4875,57.76,60.09,11.441166582618928,10.0,6.0,8.0,13.0,19.0,5.069087241553202,6.0,3.0,4.0,6.0,6.0,Total,9896.754777553848,94776.0, +1,2019.0,1,5856,48.564294740437276,50.99,34.786,43.63,55.36,58.15,52.25200307377025,55.0,40.038,49.66,57.57,59.7,10.75495218579235,10.0,6.0,7.0,12.0,17.0,5.080430327868853,5.0,3.0,5.0,6.0,6.0,Male,4987.215562312578,46751.57142857143, +1,2019.0,1,6042,46.097793776895195,48.28,30.61,39.8175,54.37,57.56,51.1525819265141,54.8,35.59,47.38,57.76,60.45,12.106256206554121,11.0,6.0,8.0,14.0,21.0,5.058093346573982,6.0,3.0,4.0,6.0,6.0,Female,4909.53921524132,48024.42857142857, +1,2020.0,1,11937,46.74610653137708,48.107436188328016,37.73335025826344,43.36599723275415,51.38169419476088,53.614387039137014,51.738960020000924,54.260826653873494,41.17881442080187,49.36173586350582,56.73760096786725,58.17833201360447,11.899170144767847,11.59959437041686,4.935146684036721,8.051891975144592,15.351529699059892,19.19956505500547,5.0822652257686185,5.0,4.0,5.0,6.0,6.0,Total,9965.602888130781,95333.85714285714, +1,2020.0,1,5868,47.84311609065639,49.14227421711047,39.503199156323994,44.907442787009735,52.031329038500175,54.00599506246491,52.38804693548592,54.56659461975053,43.037405308074106,50.33098410674175,56.898653754239234,58.32583848812859,11.25428797652068,10.871422635603551,4.444115677582998,7.555365981442911,14.63157298617667,18.270660056568595,5.060327198364008,5.0,4.0,5.0,6.0,6.0,Male,5012.103903505961,46662.0, +1,2020.0,1,6069,45.68542897430805,46.97345190328841,36.34465366241071,41.93699178201787,50.67040049054033,53.062802579136836,51.11137029845398,53.905109429208146,39.16825596996534,48.0499021888748,56.565436422832775,58.02288656747395,12.522694376646905,12.254795706933649,5.453208251023788,8.614841441252594,16.090935180624832,19.978259714251127,5.103476684791564,5.0,4.0,5.0,6.0,6.0,Female,4953.498984624907,48671.857142857145, +1,2021.0,1,11887,46.32797768420649,47.09690880535969,40.1145981551206,43.95723142952894,49.49465596452154,51.31007619369161,51.480837702282024,53.20258895898207,43.0223770360551,49.174949319696786,55.734516723126774,57.28519792159508,12.104419448987873,12.006398273882034,4.999668855705033,8.308742971943838,15.78147362122364,19.216672685899496,5.082611255993943,5.0,4.0,5.0,5.0,6.0,Total,9865.55124572884,94941.0, +1,2021.0,1,5844,47.30304904977259,48.05845740099847,41.51739564265043,45.13657925194597,50.20440605870659,51.876331261474334,52.137366725239815,53.67151747319319,44.524631894039025,50.18523764316333,56.007985988321565,57.45756284136764,11.518974100500305,11.36211719888184,4.5993192913495236,7.830132871195697,15.062912309869464,18.557921271094003,5.039185489390828,5.0,4.0,5.0,5.0,6.0,Male,4955.5657451156185,46277.0, +1,2021.0,1,6043,45.38501606574375,46.15887577696995,38.977068222402785,42.84251233452542,48.59767041803247,50.50833040048729,50.84592861570818,52.720840936122,41.554388410503215,48.13414138704007,55.43379073842458,57.065029838210044,12.670585693661264,12.662164423161373,5.4220989218530775,8.874344797244575,16.35108432954731,19.816463330337534,5.124606983286447,5.0,4.0,5.0,5.0,6.0,Female,4909.985500613229,48664.0, +1,2022.0,1,11974,46.07296001139765,46.481080945561324,41.322434734158136,44.019945459079196,48.58628527555146,50.22190994449539,51.263873704631195,52.53308314152351,44.140867421994294,48.96811948530281,55.0104688907039,56.60038274463394,12.22029042412555,12.084121863837392,5.270006520482727,8.451601082699366,15.768275273559118,19.439089741382293,5.051444797060297,5.0,4.0,5.0,5.0,6.0,Total,9883.202900807275,95049.42857142857, +1,2022.0,1,5883,46.96486276245372,47.427279443758884,42.38071718908458,45.13407617793869,49.39558689198433,50.838872744181295,51.93997189845573,53.11162421749029,45.390285354308425,49.84057320108012,55.373674261737236,56.808270893953626,11.605820752137216,11.534032398719837,4.682674799675123,7.905566205848183,15.229607112627615,18.664902625469256,4.999150093489716,5.0,4.0,5.0,5.0,6.0,Male,4957.992525217912,46215.71428571428, +1,2022.0,1,6091,45.21151461910341,45.5873911572895,40.503101186845626,43.24187703147859,47.685204182892484,49.2708262433789,50.61086341498005,51.890624927222675,42.85248670899738,48.09320623696662,54.55945328223035,56.30225474520619,12.813776728559512,12.64362896070736,5.876549869806882,9.086410344553926,16.424193444460315,19.969046677321924,5.1019537021835495,5.0,5.0,5.0,5.0,6.0,Female,4925.210375589374,48833.71428571428, +2,2019.0,1,11897,47.32166764730563,49.35,32.26,41.455,54.79,58.05,51.69889972261977,55.0,37.79,48.49,57.76,60.05,11.432125745986383,10.0,6.0,8.0,13.0,19.0,5.071866857190888,6.0,3.0,4.0,6.0,6.0,Total,9898.248674457383,94820.0, +2,2019.0,1,5858,48.57510071696836,50.995000000000005,34.936,43.665,55.36,58.15,52.248031751450775,55.0,39.998,49.66,57.57,59.7,10.752645954250598,10.0,6.0,7.0,12.0,17.0,5.081768521679754,5.0,3.0,5.0,6.0,6.0,Male,4989.392422200287,46779.857142857145, +2,2019.0,1,6039,46.105802285146694,48.28,30.61,39.84,54.37,57.57,51.16622619638983,54.8,35.63,47.41,57.76,60.45,12.091240271568141,11.0,6.0,8.0,14.0,21.0,5.0622619639013084,6.0,3.0,4.0,6.0,6.0,Female,4908.856252257153,48040.142857142855, +2,2020.0,1,11932,46.757567924601666,48.11056724571695,37.73219659703955,43.394635524511614,51.41147665400951,53.619231282215395,51.73720521469689,54.26588515527794,41.159720920492255,49.39220396238098,56.736064025123824,58.15278833296875,11.878818500107132,11.575001037790162,4.905728549439197,8.008120256186428,15.369689902252157,19.170387398014395,5.084730137445525,5.0,4.0,5.0,6.0,6.0,Total,9962.204142616913,95340.14285714286, +2,2020.0,1,5872,47.8437844177972,49.14801700969113,39.49596752160863,44.84649734774179,52.050660985276764,54.04237678319415,52.37924138956398,54.5656155283704,42.96948325538356,50.3755717154077,56.902058638282604,58.313884933380734,11.248226330418378,10.857734325096114,4.399762654128009,7.506081052094719,14.653655309319818,18.313565089541644,5.058242506811989,5.0,4.0,5.0,6.0,6.0,Male,5014.2343054639905,46674.57142857143, +2,2020.0,1,6060,45.705049236805266,46.983765216391575,36.34470864075474,41.95985199924462,50.67741970377684,53.03833306585735,51.11508699376952,53.908361021320744,39.14638790662377,48.072344096532355,56.562642569057836,58.00932540564332,12.489847744399468,12.214625392858416,5.440387218341498,8.592163681077864,16.050728312183733,19.90062856072975,5.110396039603961,5.0,4.0,5.0,6.0,6.0,Female,4947.969837153003,48665.57142857143, +2,2021.0,1,11881,46.32622527912301,47.09497610523006,40.05947644545569,43.958063999010676,49.50334746453922,51.315015188220194,51.47067378460413,53.213255710430374,42.909462371535675,49.20114247237976,55.74351402766207,57.30674456121603,12.110902712068222,11.993271401369714,5.0527046545700935,8.294402987330578,15.758243694335311,19.254880548975102,5.085683023314536,5.0,4.0,5.0,5.0,6.0,Total,9858.581685411149,94950.42857142857, +2,2021.0,1,5836,47.29706916294303,48.043758879901276,41.430035194717604,45.164249054070254,50.23326851052582,51.89777744251232,52.12630137678541,53.65671380218599,44.49042918601003,50.18721803726345,56.03551850904965,57.47692306086028,11.525623408093264,11.35113397201646,4.583389180615049,7.821584586203622,15.023848395712912,18.65965025144318,5.039753255654558,5.0,4.0,5.0,5.0,6.0,Male,4947.337454393743,46218.857142857145, +2,2021.0,1,6045,45.38894737904459,46.14824414373982,38.95162827090601,42.83285560735115,48.60162294303578,50.501752066501986,50.83771387923257,52.70949301419916,41.47445237714434,48.12603583440368,55.39248468280116,57.07391751100191,12.675946552928039,12.59164259569165,5.565575994548882,8.878938709854292,16.357336363494568,19.834242071957682,5.130024813895782,5.0,4.0,5.0,5.0,6.0,Female,4911.244231017409,48731.57142857143, +2,2022.0,1,11987,46.06227471980685,46.465772848900365,41.25859916496268,44.01256059166152,48.59452723982879,50.218118419547075,51.25947825535327,52.530645739839095,44.18179256342942,48.96680300445372,55.026196699557644,56.602417412895136,12.243135031495632,12.138586281889701,5.263404778915223,8.472011536031214,15.791625301570704,19.476066146254972,5.048886293484609,5.0,4.0,5.0,5.0,6.0,Total,9891.874497755569,95104.42857142857, +2,2022.0,1,5900,46.95173150422378,47.41494202944854,42.34535038737586,45.11557879670025,49.37219301543008,50.841212288772425,51.93951218920456,53.109424931160596,45.409872824178606,49.83699196367226,55.40308067882124,56.81171880805857,11.61558850392787,11.560515010871995,4.578652391932894,7.828896815208619,15.205355329381788,18.763454183484495,4.992203389830508,5.0,4.0,5.0,5.0,6.0,Male,4971.3727651013,46284.857142857145, +2,2022.0,1,6087,45.20014312328022,45.552011024325395,40.51422230131691,43.232112688788135,47.66654959732524,49.25939452323317,50.60033578620308,51.87678558228551,42.84283514639184,48.093281706969194,54.56187356323672,56.32429303266544,12.851402570948437,12.695148183429831,5.92518547381245,9.160032701216783,16.442194192642404,19.919060293720886,5.103827829801216,5.0,5.0,5.0,5.0,6.0,Female,4920.501732654285,48819.57142857143, \ No newline at end of file