Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified input/reg_RMSE.xlsx
Binary file not shown.
3 changes: 0 additions & 3 deletions src/main/java/simpaths/data/ManagerRegressions.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ public static double getRmse(RegressionName regression) {
case WagesFemalesNE -> {
code = "Wages_FemalesNE";
}
case ChildcareC1b -> {
code = "C1b";
}
default -> {
throw new InvalidParameterException("RMSE requested for unrecognised regression equation");
}
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/simpaths/model/BenefitUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -4669,9 +4669,7 @@ private void updateChildcareCostPerWeek(int year, int age) {
if (statInnovations.getDoubleDraw(0) < prob) {

double score = Parameters.getRegChildcareC1b().getScore(this, Regressors.class);
double rmse = Parameters.getRMSEForRegression("C1b");
double gauss = Parameters.getStandardNormalDistribution().inverseCumulativeProbability(statInnovations.getDoubleDraw(1));
xChildCareWeek = Math.exp(score + rmse * gauss);
xChildCareWeek = Math.exp(score);
double costCap = childCareCostCapWeekly();
if (costCap > 0.0 && costCap < getChildcareCostPerWeek()) {
xChildCareWeek = costCap;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/simpaths/model/decisions/Expectations.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ private double evalChildcareCostWeekly() {

double probFormalChildCare = Parameters.getRegChildcareC1a().getProbability(benefitUnitProxyThisPeriod, BenefitUnit.Regressors.class);
double logChildcareCostScore = Parameters.getRegChildcareC1b().getScore(benefitUnitProxyThisPeriod, BenefitUnit.Regressors.class);
double logChildcareRSME = ManagerRegressions.getRmse(RegressionName.ChildcareC1b);
childcareCostWeekly = Math.exp(logChildcareCostScore + logChildcareRSME*logChildcareRSME/2.0) * probFormalChildCare;
childcareCostWeekly = Math.exp(logChildcareCostScore) * probFormalChildCare;
}
return childcareCostWeekly;
}
Expand Down
Loading