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/regression_files/reg_RMSE.xlsx
Binary file not shown.
Binary file modified input/regression_files/reg_wealth_financial.xlsx
Binary file not shown.
33 changes: 33 additions & 0 deletions src/main/java/simpaths/model/BenefitUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -2538,6 +2538,20 @@ public enum Variables {
Liwwh_Male_66,
LnDispInc,
LnDispInc_sq,
Age20to24_LnDispInc,
Age25to29_LnDispInc,
Age30to34_LnDispInc,
Age35to39_LnDispInc,
Age40to44_LnDispInc,
Age45to49_LnDispInc,
Age50to54_LnDispInc,
Age55to59_LnDispInc,
Age60to64_LnDispInc,
Age65to69_LnDispInc,
Age70to74_LnDispInc,
Age75to79_LnDispInc,
Age80plus_LnDispInc,
ReferenceAdultStudent,
MaleEduH_1,
MaleEduH_10,
MaleEduH_2,
Expand Down Expand Up @@ -2673,6 +2687,7 @@ public enum Variables {
YdsesC54,
YdsesC55,
Year,
YearFrom2015,
Year2009,
Year2010,
Year2011,
Expand Down Expand Up @@ -4052,6 +4067,20 @@ public double getDoubleValue(Enum<?> variableID) {
throw new RuntimeException("request for parameter LnDispInc without specifying yDispMonth");
return Math.pow(Math.log(Math.max(yDispMonth, 1.0)),2.0);
}
case Age20to24_LnDispInc, Age25to29_LnDispInc, Age30to34_LnDispInc,
Age35to39_LnDispInc, Age40to44_LnDispInc, Age45to49_LnDispInc,
Age50to54_LnDispInc, Age55to59_LnDispInc, Age60to64_LnDispInc,
Age65to69_LnDispInc, Age70to74_LnDispInc, Age75to79_LnDispInc,
Age80plus_LnDispInc -> {
// FW1a adds an income slope to each existing age-band intercept.
// Under 20 is the baseline slope; quadratic curvature stays common.
String ageVariable = variableID.name().replace("_LnDispInc", "");
return getDoubleValue(Variables.valueOf(ageVariable)) * getDoubleValue(Variables.LnDispInc);
}
case ReferenceAdultStudent -> {
// Use the same reference adult as the consumption age regressors.
return Les_c4.Student.equals(getRefPerson().getLabC4()) ? 1.0 : 0.0;
}
case MaleEduM_10 -> {
return (getMale() != null && getMale().getLabourSupplyWeekly().equals(Labour.TEN) && getMale().getEduHighestC4().equals(Education.Medium)) ? 1. : 0.;
}
Expand Down Expand Up @@ -4182,6 +4211,10 @@ public double getDoubleValue(Enum<?> variableID) {
case Year -> {
return (Parameters.isFixTimeTrend && getYear() >= Parameters.timeTrendStopsIn) ? Parameters.timeTrendStopsIn : getYear();
}
case YearFrom2015 -> {
// Matches Stata's centred trend, including the existing trend freeze.
return getDoubleValue(Variables.Year) - 2015.0;
}
case Year2009 -> {
return (getYear() == 2009) ? 1. : 0.;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ run,time,id_DemographicStatistics,demMarried18to29Share,demMarried30to54Share,de
1,2019.0,1,0.2119546547578152,0.6774992262457443,0.6043081245609927,0.2631398144967365,0.9653358093469514,0.07867010067899789,2911.0,6462.0,4271.0
1,2020.0,1,0.41941135248773653,0.7690869429728887,0.6558741905642923,0.31289418360196214,0.9839513867248364,0.08048103607770583,2854.0,6418.0,4324.0
1,2021.0,1,0.4362676056338028,0.7826964895930413,0.656797995900706,0.3429577464788732,0.961789375582479,0.08517421999544524,2840.0,6438.0,4391.0
1,2022.0,1,0.3944986072423398,0.7634308716519586,0.6542902422458682,0.3774373259052925,0.9134540950611549,0.09350237717908082,2872.0,6459.0,4417.0
1,2022.0,1,0.394508168230796,0.7634957463263727,0.653375623017671,0.37504344803614875,0.9138437741686002,0.09265971907566833,2877.0,6465.0,4414.0
2,2019.0,1,0.21229817931982137,0.6779398076326404,0.6032379164711403,0.26382686362074886,0.9655600372323921,0.07860159549507273,2911.0,6446.0,4262.0
2,2020.0,1,0.42040673211781204,0.7703611067687979,0.6587393211729393,0.3155680224403927,0.9837423792402689,0.08173631955668437,2852.0,6397.0,4331.0
2,2021.0,1,0.43400211193241817,0.7795765877957659,0.6609051626108711,0.337909186906019,0.959838107098381,0.08528542187855356,2841.0,6424.0,4397.0
2,2022.0,1,0.3917130919220056,0.7633209417596035,0.6564695218672105,0.36664345403899723,0.9200743494423792,0.0940403353727623,2872.0,6456.0,4413.0
2,2022.0,1,0.3922594142259414,0.7634191746819733,0.6580557443915703,0.36541143654114366,0.9190195470058952,0.09426693859052798,2868.0,6446.0,4413.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ run,time,id_HealthStatistics,healthDsbl18to29Share,healthDsbl30to54Share,healthD
1,2019.0,1,0.04809343868086568,0.08635097493036212,0.0660266916413018,3.6602542081758846,3.4648715567935624,3.0852259424022477
1,2020.0,1,0.04590049053959355,0.09660330320972266,0.06406105457909343,3.546601261387526,3.359613586787161,3.053654024051804
1,2021.0,1,0.038028169014084505,0.0970798384591488,0.06649965839216579,3.5024647887323943,3.2882882882882885,2.9521749032111138
1,2022.0,1,0.04213091922005571,0.10527945502399752,0.06361784016300656,3.3760445682451254,3.215513237343242,2.9040072447362464
1,2022.0,1,0.04310045185957595,0.10471771075019334,0.06320797462618939,3.3740006951685784,3.2136117556071153,2.9046216583597646
2,2019.0,1,0.04809343868086568,0.0862550418864412,0.0656968559361802,3.661284781861903,3.4668011169717654,3.0863444392304085
2,2020.0,1,0.0455820476858345,0.09535719868688448,0.06257215423689678,3.5546984572230014,3.362513678286697,3.0491803278688523
2,2021.0,1,0.036606828581485396,0.09480074719800748,0.06504434841937685,3.4973600844772967,3.296232876712329,2.9563338639981804
2,2022.0,1,0.04700557103064067,0.1008364312267658,0.061862678450033994,3.371518105849582,3.2145291201982653,2.906412871062769
2,2022.0,1,0.04602510460251046,0.10083772882407695,0.061182868796736914,3.3702928870292888,3.2142413900093083,2.906412871062769
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
run,time,id_LabourStatistics,labEmpShare,labEmpToNotEmpShare,labNotEmpToEmpShare,labUnempShare,labWorkFullTime18to29Share,labWorkFullTime30to54Share,labWorkFullTime55to74Share,labWorkPartTime18to29Share,labWorkPartTime30to54Share,labWorkPartTime55to74Share
1,2019.0,1,0.7126739685415465,0.0,0.0,0.158939306596393,0.5565097904500171,0.6857010213556175,0.2858815265745727,0.10133974579182412,0.14562055091303003,0.09482556778272068
1,2020.0,1,0.7259651153178474,0.07562834072557717,0.44666666666666666,0.1460692733735637,0.4954449894884373,0.755687129947024,0.34620721554116557,0.13524877365101612,0.08818946712371455,0.057816836262719704
1,2021.0,1,0.7536779814251664,0.027614505933237218,0.37360801781737196,0.11259965480397797,0.5010563380281691,0.7781919850885368,0.360054657253473,0.15704225352112677,0.09490525007766387,0.07310407652015487
1,2022.0,1,0.7599413298565841,0.03187671522060376,0.29036827195467424,0.10845827900912647,0.49268802228412256,0.7753522217061465,0.37514149875481095,0.17479108635097493,0.10140888682458585,0.08082408874801902
1,2021.0,1,0.7536779814251664,0.027725407563491185,0.3741648106904232,0.11259965480397797,0.5014084507042254,0.7777260018639329,0.3602823958096106,0.1563380281690141,0.09537123330226778,0.07310407652015487
1,2022.0,1,0.7597069597069597,0.03196539719379681,0.29178470254957506,0.10834350834350834,0.4907890163364616,0.7749419953596288,0.37471681014952424,0.17587765033020508,0.10177880897138437,0.08155867693701857
2,2019.0,1,0.7126474713307482,0.0,0.0,0.1585677749360614,0.5568533150120234,0.6860068259385665,0.28554669169404034,0.10099622122981793,0.14551659944151413,0.09408728296574378
2,2020.0,1,0.7250745279894004,0.07609067091923909,0.44467318579516213,0.14657171248757866,0.4926367461430575,0.7572299515397842,0.3458785499884553,0.13569424964936885,0.08675941847741128,0.05679981528515354
2,2021.0,1,0.7539689068026652,0.02690383546414675,0.3695532266960838,0.11293904746236735,0.5019359380499824,0.7778642590286425,0.3600181942233341,0.15874692009855684,0.09604607721046077,0.07095747100295656
2,2022.0,1,0.7598043212392989,0.03213870387990274,0.2938689217758985,0.10990623726049735,0.48746518105849584,0.7752478314745973,0.3759347382732835,0.17931754874651812,0.10176579925650557,0.07840471334692953
2,2021.0,1,0.7539689068026652,0.02690383546414675,0.37010479867622725,0.11293904746236735,0.5022879267863428,0.7777085927770859,0.36024562201501026,0.15769095388947554,0.09620174346201743,0.0711848987946327
2,2022.0,1,0.7603886031512777,0.032554698234858896,0.2980085348506401,0.10931504612621439,0.4895397489539749,0.774433757368911,0.37548153183775207,0.1806136680613668,0.10254421346571517,0.0790845230002266
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
run,time,id_WealthIncomeStatistics,statInvestLoss18to29Avg,statInvestLoss30to54Avg,statInvestLoss55to74Avg,statSIndexP50,statYDispGrossOfLosses18to29Avg,statYDispGrossOfLosses30to54Avg,statYDispGrossOfLosses55to74Avg,statYHhDispEquivNatGini,statYInvest18to29Avg,statYInvest30to54Avg,statYInvest55to74Avg,statYLabWeeklyPerWorker18to29Avg,statYLabWeeklyPerWorker30to54Avg,statYLabWeeklyPerWorker55to74Avg,statYMktNatGini,statYPens18to29Avg,statYPens30to54Avg,statYPens55to74Avg,wealth18to29Avg,wealth30to54Avg,wealth55to74Avg,yEmployedEarningsP20,yEmployedEarningsP40,yEmployedEarningsP60,yEmployedEarningsP80,yHhDispEquivP50,yHhQuintilesC5P20,yHhQuintilesC5P40,yHhQuintilesC5P60,yHhQuintilesC5P80,yLabFceEarningsP20,yLabFceEarningsP40,yLabFceEarningsP60,yLabFceEarningsP80
1,2019.0,1,0.0,0.0,0.0,0.0,1098.3619822396215,1659.0317891410793,1522.3926171014346,0.0,0.0,0.0,0.0,395.13042709203506,566.9991878868162,487.2743556874287,0.0,0.0,0.0,0.0,14788.277425041762,179671.46899293957,297472.45000012836,11497.444084641429,18506.172624107145,26144.305492414285,38420.89577607858,16048.5576,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
1,2020.0,1,-250.7488411029527,-328.52812800727696,-762.1198505665782,0.0,1307.3119010178075,1941.3838747128084,2068.4123000004356,0.0,-250.7488411029527,-328.52812800727696,-762.1198505665782,425.84127825543123,643.3286046985605,543.2464470741508,0.0,0.2580110975379803,8.228551113280265,388.1515219185641,19665.43171307161,190923.72950161409,318579.2573834327,10423.380815659611,17528.457823676694,27074.14468509112,43365.68237995348,11385.98054646562,-5.955783258644075,5.70197923247809,7.418462500489933,8.201946603951265,79.92384204585235,887.4637819299685,1682.4925524476525,3046.8137726571863
1,2021.0,1,-36.68756007817177,-517.9741693028336,-474.1743951732273,0.0,1308.6779125027945,2512.3739926606486,2498.318395617464,0.0,82.3352896148895,-311.29517223174184,31.554844044978324,417.5567714410715,647.5848293342482,520.1240387265273,0.0,0.5849264137883765,8.676252951895004,361.22206239561865,24888.824311751294,238575.78509438183,380975.22088567866,9751.195791039347,17214.130801200638,26338.780615047886,43586.217763426255,17098.12595948333,6.282728145686912,7.404898055813944,8.01953375458997,8.554481213360386,689.4713221320721,1424.7060369005446,2283.4874064516766,3771.9971899033226
1,2022.0,1,-0.4890385202415654,-0.6175983395229478,-0.16872530202047192,0.0,1342.8815919772696,3220.1586055786543,2868.6368368117614,0.0,201.4163827025984,3237.957451587501,3635.0081103129764,416.31281942018035,640.9411425706578,522.4438525538973,0.0,0.2295824309220035,7.356505184850107,322.2761213635668,24485.684898902036,217365.18431530372,384895.0635175582,9586.632266175575,16616.49975851708,26169.479002616128,42267.36406762688,17689.35650657962,6.675818615152003,7.528208324163545,8.0613859766916,8.586128671926126,790.1406349717676,1491.6106577142205,2369.601879308474,3883.7744529063953
1,2020.0,1,-250.7488411029527,-328.52812800727696,-762.1198505665782,0.0,1307.3119010178075,1941.3838747128084,2068.4123000004356,0.0,-250.7488411029527,-328.52812800727696,-762.1198505665782,425.84127825543123,643.3286046985605,543.2464470741508,0.0,0.2580110975379803,8.228551113280265,388.1515219185641,20253.729354243365,190849.65904412942,318117.39379962336,10423.380815659611,17528.457823676694,27074.14468509112,43365.68237995348,11385.98054646562,-5.955783258644075,5.70197923247809,7.418462500489933,8.201946603951265,79.92384204585235,887.4637819299685,1682.4925524476525,3046.8137726571863
1,2021.0,1,-37.015838791649216,-579.8636805032824,-514.5168240939524,0.0,1311.658114843149,2573.6026897842435,2537.979009511179,0.0,83.39924671901379,-371.65055030528947,-9.941845228995463,418.3817800356049,647.6680387493873,520.567319769875,0.0,0.5849264137883765,8.676252951895004,361.22206239561865,26281.302561841854,242714.46816493702,384253.9611595054,9783.134202114947,17221.329603750677,26333.09198062594,43594.67292336701,17136.370929563793,6.282655961741195,7.40557552551278,8.018055697238193,8.554725802060752,690.364374669642,1425.9679982438136,2283.447499472534,3772.2368169515516
1,2022.0,1,-0.4775388677015336,-0.5997286605649887,-0.1660715640209267,0.0,1340.1344119847204,3310.2589680285414,2928.0707509986246,0.0,204.55470844455527,3515.6089744754854,3884.973261120413,414.99873832300136,641.5809151114466,521.841497994903,0.0,0.2291834346916907,7.349677801847926,322.49515814745683,26285.833406504364,231329.7500097538,396127.6784047258,9568.519399003922,16580.274055759728,26178.92667947928,42266.99714782604,17709.178669879024,6.678815100457701,7.528715111115655,8.0650445502503,8.5900180384411,785.6007923133773,1490.5084364598026,2375.925128747765,3883.058933256573
2,2019.0,1,0.0,0.0,0.0,0.0,1098.3549517548865,1660.4279555229555,1523.8390765899653,0.0,0.0,0.0,0.0,395.554917209919,567.3590978050611,488.6361413475094,0.0,0.0,0.0,0.0,14848.479668022597,180279.78637938178,298618.0568016762,11518.71286347,18523.15623358286,26144.90110037143,38385.89565308573,16068.192000000001,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
2,2020.0,1,-251.44853207303862,-327.5163848247718,-765.8910514294679,0.0,1313.0876472585383,1938.145675146225,2076.122274153027,0.0,-251.44853207303862,-327.5163848247718,-765.8910514294679,427.1597751776355,642.7577520844819,550.9098190909464,0.0,0.2680109421529793,8.229506463232132,388.604887168888,19738.26579621087,191001.87181937727,321124.09222432907,10462.499647595689,17570.993151163577,27117.55336464533,43596.770540150035,11402.656686917799,-5.964979880372034,5.714758904785886,7.421765226785345,8.208225367394723,77.21236525922397,890.1476100108384,1694.0879450686514,3067.939917282307
2,2021.0,1,-36.62420661988649,-608.304051467683,-358.5894845357523,0.0,1313.7331877924257,2600.6436017033643,2393.1664386792813,0.0,82.30364461866606,-397.7608985383392,150.76948054731454,417.75259802529683,646.898004928068,524.9825506015943,0.0,0.5637411780655305,8.303709304997756,363.02713557049464,24002.453992000355,242887.53294619726,378892.4757826235,9723.901702426965,17169.961707796203,26356.400807496528,43907.78381605853,17107.091229364036,6.303371440453282,7.408502559403067,8.02442396197474,8.563907765653155,686.951233222443,1424.8537948263267,2296.811166991709,3829.8019327967563
2,2022.0,1,-0.507976230597884,-0.6284670815577966,-0.190654892928645,0.0,1326.624225188659,3225.6676425335086,2869.756584758877,0.0,202.48414676631998,3511.0042645500757,3016.479829252969,406.50905607556535,638.3357760543789,523.9444925535469,0.0,0.6579750403410656,6.809227198472103,325.42383169340553,23158.241447775097,224540.84392181353,378963.7137527624,9515.420618950966,16568.318397693467,26023.034757176858,42379.12694974829,17682.778892519746,6.674225077093719,7.509050626633911,8.0731158933846,8.59282179021714,785.1324476454662,1483.091501769883,2372.9396165114435,3884.1276201117776
2,2020.0,1,-251.44853207303862,-327.5163848247718,-765.8910514294679,0.0,1313.0876472585383,1938.145675146225,2076.122274153027,0.0,-251.44853207303862,-327.5163848247718,-765.8910514294679,427.1597751776355,642.7577520844819,550.9098190909464,0.0,0.2680109421529793,8.229506463232132,388.604887168888,20331.9564225529,190924.8903109714,320640.2048370646,10462.499647595689,17570.993151163577,27117.55336464533,43596.770540150035,11402.656686917799,-5.964979880372034,5.714758904785886,7.421765226785345,8.208225367394723,77.21236525922397,890.1476100108384,1694.0879450686514,3067.939917282307
2,2021.0,1,-36.95695939194427,-673.4713884395934,-410.54292979063,0.0,1317.5023032823108,2664.921300830438,2443.4559661561384,0.0,83.43498802630762,-461.3191951490834,97.62600965772089,418.7378434101851,647.2917433279545,525.2313299619132,0.0,0.5637411780655305,8.303709304997756,363.02713557049464,25391.451146483054,247196.68214369428,382855.5427898394,9736.733863913556,17187.472388658127,26343.764573731576,44041.75042902999,17125.424393503192,6.292717413591005,7.405701059781297,8.023567646432612,8.562852736353621,687.0077749518179,1426.0464484510055,2295.9689555167233,3837.9571463275083
2,2022.0,1,-0.4988955022159949,-0.5707540692045535,-0.1878862573337276,0.0,1332.6871694904623,3381.2174232601224,3146.105767513779,0.0,207.2053114160848,3987.4238450418407,3458.0007046602254,405.1074951294256,637.9354415176269,524.921114923114,0.0,0.6588927182215971,6.819790690868119,325.42383169340553,24968.50992935619,238183.172218754,391446.65695303713,9537.948122968119,16549.23386825755,26015.41842601896,42398.17394780925,17738.344700329362,6.675686302118199,7.509325947935047,8.07660422532203,8.596816260751885,785.5136251279536,1484.2050801982614,2377.110739875384,3877.966926902728
Loading
Loading