Skip to content

Commit

Permalink
voila
Browse files Browse the repository at this point in the history
  • Loading branch information
twallema committed Oct 28, 2023
1 parent 1a00ac5 commit 91b6d6d
Show file tree
Hide file tree
Showing 16 changed files with 1,022 additions and 467 deletions.
848 changes: 424 additions & 424 deletions data/QALY_model/interim/long_COVID/average_QALY_losses_per_age_SMR100.csv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
hospitalisation,age_group,mean,sd,lower,upper
Non-hospitalised,"[0, 12)",0.7007124662772034,0.2676912904450194,0.1446688395996455,1.2374509097821997
Non-hospitalised,"[12, 18)",0.609550025791266,0.2307455402974724,0.13015702617116243,1.0711273600608555
Non-hospitalised,"[18, 25)",0.5472661243309876,0.20545721591422927,0.12030042947052276,0.9576558295055875
Non-hospitalised,"[25, 35)",0.47465585736838384,0.17591197706866557,0.10888503109152997,0.8255804945064931
Non-hospitalised,"[35, 45)",0.3977512473373117,0.14453627828744953,0.09688757296976598,0.6859527881533536
Non-hospitalised,"[45, 55)",0.32682507723255017,0.11554034596386943,0.08588718156447123,0.5573644862611579
Non-hospitalised,"[55, 65)",0.2624121785837585,0.08920200449110868,0.07590138445487413,0.4406110423625363
Non-hospitalised,"[65, 75)",0.20023682318940064,0.06382021086756653,0.0662144076375496,0.32780289613229696
Non-hospitalised,"[75, 85)",0.141685422937724,0.03998552576581599,0.05701776661961077,0.22139184019910954
Non-hospitalised,"[85, 120)",0.09445396182231887,0.020845220226073012,0.04962486217670849,0.135414209316056
Hospitalised (no IC),"[0, 12)",1.9225870437049741,0.7822975992767989,0.4872214309311447,3.486041636906913
Hospitalised (no IC),"[12, 18)",1.6763918112374891,0.6816772305432514,0.42834977958554127,3.0355564582089087
Hospitalised (no IC),"[18, 25)",1.5047472849323487,0.6107415832980412,0.38792585125095397,2.7206365332176645
Hospitalised (no IC),"[25, 35)",1.300234964504839,0.5251968407343157,0.340542022810944,2.3443486641289497
Hospitalised (no IC),"[35, 45)",1.0781736449561836,0.4310396407916119,0.2900368440295111,1.934483990845256
Hospitalised (no IC),"[45, 55)",0.8695128091498024,0.34167870526612704,0.24323044729902252,1.5484648158099321
Hospitalised (no IC),"[55, 65)",0.6795415010815067,0.2602229631293996,0.200636153319262,1.1969179352299937
Hospitalised (no IC),"[65, 75)",0.4986331658305124,0.1832095200625048,0.15964356047215597,0.8627041997756654
Hospitalised (no IC),"[75, 85)",0.3321890686706806,0.11324870373713247,0.12367913078022028,0.5561158458241988
Hospitalised (no IC),"[85, 120)",0.20126536006528772,0.059126432818673406,0.09491924095022707,0.31575781459724483
Hospitalised (IC),"[0, 12)",3.024719489978397,1.0265548261377537,1.1975394639057406,5.077234121740847
Hospitalised (IC),"[12, 18)",2.631690667216445,0.8949009906302372,1.0401437579925896,4.427929652353256
Hospitalised (IC),"[18, 25)",2.3575421238665304,0.8019216326839035,0.9319236000199507,3.970603305357227
Hospitalised (IC),"[25, 35)",2.0307290374024936,0.6895877818528608,0.8048830149924033,3.4198755188631735
Hospitalised (IC),"[35, 45)",1.6756689154984816,0.5657026367693686,0.6692431871735698,2.814837650229509
Hospitalised (IC),"[45, 55)",1.3418966725132067,0.4479726602066601,0.5433797098745519,2.2414408005705626
Hospitalised (IC),"[55, 65)",1.0380081617077674,0.34065155397873,0.42898254727283214,1.7188213642104697
Hospitalised (IC),"[65, 75)",0.7487133941045105,0.2392868131804628,0.3190531699034124,1.2241831892977466
Hospitalised (IC),"[75, 85)",0.4827007436300753,0.1473242397457434,0.21656875487067243,0.7740071717211945
Hospitalised (IC),"[85, 120)",0.27360665752397645,0.07614177654185664,0.1359744985210216,0.4242051228165759
Non-hospitalised (no AD),"[0, 12)",0.06022375220009922,0.0029368162500658934,0.05411813168099017,0.06586791859253233
Non-hospitalised (no AD),"[12, 18)",0.06019953136034096,0.002936816250065892,0.05409391084123191,0.06584369775277407
Non-hospitalised (no AD),"[18, 25)",0.06017475524798904,0.0029368162500658943,0.054069134728879996,0.06581892164042216
Non-hospitalised (no AD),"[25, 35)",0.06013712087633692,0.0029368162500658917,0.05403150035722789,0.06578128726877004
Non-hospitalised (no AD),"[35, 45)",0.0600861321108908,0.0029368162500658934,0.05398051159178175,0.0657302985033239
Non-hospitalised (no AD),"[45, 55)",0.06002785731596969,0.0029368162500658926,0.05392223679686064,0.0656720237084028
Non-hospitalised (no AD),"[55, 65)",0.05996583279069703,0.0029368162500658934,0.05386021227158799,0.06560999918313015
Non-hospitalised (no AD),"[65, 75)",0.05989757960355838,0.0029368162500658934,0.053791959084449344,0.06554174599599151
Non-hospitalised (no AD),"[75, 85)",0.059824835301914,0.002936816250026131,0.05371921478288762,0.06546900169427071
Non-hospitalised (no AD),"[85, 120)",0.059734550320283034,0.002936085041335324,0.05363044997902952,0.06537731142774374
Non-hospitalised,"[0, 12)",,,,
Non-hospitalised,"[12, 18)",,,,
Non-hospitalised,"[18, 25)",,,,
Non-hospitalised,"[25, 35)",,,,
Non-hospitalised,"[35, 45)",,,,
Non-hospitalised,"[45, 55)",,,,
Non-hospitalised,"[55, 65)",,,,
Non-hospitalised,"[65, 75)",,,,
Non-hospitalised,"[75, 85)",,,,
Non-hospitalised,"[85, 120)",,,,
Hospitalised (no IC),"[0, 12)",,,,
Hospitalised (no IC),"[12, 18)",,,,
Hospitalised (no IC),"[18, 25)",,,,
Hospitalised (no IC),"[25, 35)",,,,
Hospitalised (no IC),"[35, 45)",,,,
Hospitalised (no IC),"[45, 55)",,,,
Hospitalised (no IC),"[55, 65)",,,,
Hospitalised (no IC),"[65, 75)",,,,
Hospitalised (no IC),"[75, 85)",,,,
Hospitalised (no IC),"[85, 120)",,,,
Hospitalised (IC),"[0, 12)",,,,
Hospitalised (IC),"[12, 18)",,,,
Hospitalised (IC),"[18, 25)",,,,
Hospitalised (IC),"[25, 35)",,,,
Hospitalised (IC),"[35, 45)",,,,
Hospitalised (IC),"[45, 55)",,,,
Hospitalised (IC),"[55, 65)",,,,
Hospitalised (IC),"[65, 75)",,,,
Hospitalised (IC),"[75, 85)",,,,
Hospitalised (IC),"[85, 120)",,,,
Non-hospitalised (no AD),"[0, 12)",,,,
Non-hospitalised (no AD),"[12, 18)",,,,
Non-hospitalised (no AD),"[18, 25)",,,,
Non-hospitalised (no AD),"[25, 35)",,,,
Non-hospitalised (no AD),"[35, 45)",,,,
Non-hospitalised (no AD),"[45, 55)",,,,
Non-hospitalised (no AD),"[55, 65)",,,,
Non-hospitalised (no AD),"[65, 75)",,,,
Non-hospitalised (no AD),"[75, 85)",,,,
Non-hospitalised (no AD),"[85, 120)",,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
hospitalisation,age_group,mean,sd,lower,upper
Non-hospitalised,"[0, 12)",0.668462419110261,0.2582313828457331,0.2036324547925269,1.2266842634252282
Non-hospitalised,"[12, 18)",0.5798944237428355,0.22187795956279144,0.18094233731503914,1.0596337319588378
Non-hospitalised,"[18, 25)",0.5190581364867876,0.1968431158317833,0.16537131828772747,0.9447050484446313
Non-hospitalised,"[25, 35)",0.44763489426351,0.16736730072686784,0.1471094089416646,0.8092417221722648
Non-hospitalised,"[35, 45)",0.37120795187222455,0.13572307883109985,0.12759033988719307,0.6642768756212402
Non-hospitalised,"[45, 55)",0.3002411506332599,0.10627491577506192,0.10947793400313126,0.5297938114190412
Non-hospitalised,"[55, 65)",0.23622082675172743,0.07971458883081076,0.0929959256939798,0.4084045703816341
Non-hospitalised,"[65, 75)",0.17618743525018343,0.05486694992256693,0.07783840424384207,0.29459863667090785
Non-hospitalised,"[75, 85)",0.12206526711280687,0.03255206915706073,0.06381993641723875,0.1920038620032939
Non-hospitalised,"[85, 120)",0.08103127670002823,0.015751336483312568,0.05284996746867399,0.1150524706145426
Hospitalised (no IC),"[0, 12)",1.8980894392621346,0.7267827620017653,0.6207356011360611,3.4240096409038068
Hospitalised (no IC),"[12, 18)",1.6478459932072107,0.6300813814747115,0.546874783644301,2.9726944049100523
Hospitalised (no IC),"[18, 25)",1.472820461853593,0.5617587044599202,0.49489406166793193,2.654800869057853
Hospitalised (no IC),"[25, 35)",1.2634184870428975,0.47914425110921366,0.4321870750253125,2.272532748393311
Hospitalised (no IC),"[35, 45)",1.0346805795675365,0.3878601694223998,0.3623500214659087,1.8514667391139488
Hospitalised (no IC),"[45, 55)",0.8193694351258769,0.30129304663868833,0.2966104797693478,1.4529560947554594
Hospitalised (no IC),"[55, 65)",0.6252626513069367,0.22328391548470894,0.23728421113389478,1.0937858217247964
Hospitalised (no IC),"[65, 75)",0.44562604115188553,0.15161325700772058,0.18080980173221772,0.7631334746039069
Hospitalised (no IC),"[75, 85)",0.28685503228783793,0.08900307321463005,0.13044941001272536,0.4732435233307565
Hospitalised (no IC),"[85, 120)",0.16891493919738063,0.04328019853546922,0.09158887797754195,0.2612073485364238
Hospitalised (IC),"[0, 12)",2.9237322020738303,0.9793705841671974,1.2107236313271368,4.999388921316399
Hospitalised (IC),"[12, 18)",2.531638312858393,0.8497821429058505,1.0519529833728634,4.331883645375432
Hospitalised (IC),"[18, 25)",2.257562381291156,0.757962284073033,0.9411960051611258,3.8628058096578908
Hospitalised (IC),"[25, 35)",1.9298543316512762,0.6466155391861154,0.8090419079356348,3.2987897263962442
Hospitalised (IC),"[35, 45)",1.5721185906351458,0.5232154765316691,0.6651014247066298,2.679412531598891
Hospitalised (IC),"[45, 55)",1.2355267693612049,0.40597563326945363,0.5298650819811873,2.094388339582217
Hospitalised (IC),"[55, 65)",0.9320835477121102,0.3003429071567427,0.40793600939386565,1.56709365027751
Hospitalised (IC),"[65, 75)",0.6511568673099988,0.2034594772850809,0.2948885959200651,1.0807438310262218
Hospitalised (IC),"[75, 85)",0.4027184979804148,0.1189921363368849,0.1936167990895866,0.6530541829319151
Hospitalised (IC),"[85, 120)",0.21808592502322638,0.057238589088626377,0.11680411982667387,0.33711143404710353
Non-hospitalised (no AD),"[0, 12)",0.06014137527980275,0.002961992425985527,0.05453426633193338,0.06582908835826626
Non-hospitalised (no AD),"[12, 18)",0.06011715444004468,0.002961992425985527,0.054510045492175314,0.0658048675185082
Non-hospitalised (no AD),"[18, 25)",0.06009237832769276,0.0029619924259855273,0.05448526937982339,0.06578009140615626
Non-hospitalised (no AD),"[25, 35)",0.06005474395604065,0.0029619924259855278,0.054447635008171284,0.06574245703450415
Non-hospitalised (no AD),"[35, 45)",0.06000375519059451,0.002961992425985528,0.054396646242725145,0.06569146826905803
Non-hospitalised (no AD),"[45, 55)",0.059945480395673406,0.002961992425985528,0.05433837144780404,0.06563319347413692
Non-hospitalised (no AD),"[55, 65)",0.05988345587040076,0.002961992425985525,0.054276346922531395,0.06557116894886428
Non-hospitalised (no AD),"[65, 75)",0.05981520268326211,0.0029619924259855247,0.054208093735392746,0.06550291576172562
Non-hospitalised (no AD),"[75, 85)",0.05974245826449364,0.0029619924191818985,0.05413534932950368,0.06543017132989262
Non-hospitalised (no AD),"[85, 120)",0.05963967771162379,0.0029605970042578026,0.05403521032407272,0.06532471125642572
2 changes: 1 addition & 1 deletion notebooks/analysis/woldmuyn_long_COVID.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@
lower = np.quantile(total,0.025)
upper = np.quantile(total,0.975)

QALY_table[total_label]['Total'] = f'{mean:.0f}\n({lower:.0f};{upper:.0f})'
QALY_table[total_label]['Total'] = f'{mean:.0f}\n({lower:.0f}; {upper:.0f})'

QALY_table.to_csv(os.path.join(result_folder,f'Long_COVID_summary_SMR{SMR*100:.0f}.csv'))
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def QALY_loss_func(t,tau,p_AD,age,QoL_after):
beta = QoL_Belgium_func(age+t/12)-QoL_after
return prevalence_func(t,tau,p_AD) * max(0,beta)

draws = 300
draws = 500

# Pre-allocate new multi index series with index=hospitalisation,age,draw
multi_index = pd.MultiIndex.from_product([hospitalisation_groups+['Non-hospitalised (no AD)'],np.arange(draws),LE_table.index.values],names=['hospitalisation','draw','age'])
Expand Down Expand Up @@ -346,7 +346,7 @@ def QALY_loss_func(t,tau,p_AD,age,QoL_after):
# integrate QALY_loss_func from 0 to LE (OPM: kan ook discreet)
QALY_loss = quad(QALY_loss_func,0,LE,args=(tau,p_AD,age,QoL_after))[0]/12
average_QALY_losses_per_age.iloc[idx] = QALY_loss

print('\n(4.2) Bin average QALY loss per age to age groups\n')

# bin data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
,Non-hospitalised (no AD),Non-hospitalised (AD),Cohort,ICU,Deaths,Total (no AD),Total (AD)
0-12,"8270
(7280;9352)","90236
(14582;157711)","1794
(432;3082)","73
(20;140)","0
(0;0)","10136
(8429;11889)","92079
(16423;159442)"
12-18,"4599
(4054;5177)","43563
(7403;75963)","792
(191;1351)","158
(43;277)","254
(125;416)","5804
(4968;6680)","44756
(8526;77025)"
18-25,"3739
(3248;4278)","31716
(5667;54786)","861
(209;1480)","147
(40;256)","0
(0;0)","4748
(3934;5613)","32712
(6479;55825)"
25-35,"6593
(5730;7541)","48277
(9210;82875)","2210
(539;3785)","319
(83;546)","1358
(841;1959)","10480
(8406;12473)","52132
(12573;86823)"
35-45,"8483
(7444;9686)","51582
(10766;87745)","2620
(666;4434)","606
(164;1020)","2981
(2129;3902)","14689
(12072;16967)","57748
(16660;93621)"
45-55,"8186
(7102;9419)","40321
(9461;67807)","3804
(1002;6433)","1231
(356;2044)","6784
(4865;8396)","20005
(16666;23280)","52078
(20886;79521)"
55-65,"4783
(4088;5562)","18573
(4998;30583)","3069
(866;5172)","1398
(411;2330)","12027
(10026;14919)","21277
(17736;24985)","35015
(21034;48394)"
65-75,"1786
(1486;2126)","5186
(1670;8394)","3366
(1100;5565)","1738
(575;2832)","24676
(22406;27343)","31566
(27673;35399)","34910
(29820;40108)"
75-85,"507
(392;630)","1024
(417;1650)","1976
(764;3156)","610
(223;993)","22990
(20883;25499)","26084
(23459;28960)","26575
(23632;29661)"
85+,"278
(215;346)","375
(206;556)","621
(301;956)","41
(18;71)","7839
(7043;8729)","8779
(7932;9755)","8870
(7957;9836)"
Total,"47225
(41067;54111)","330853
(64709;566318)","21113
(6043;35368)","6321
(1913;10391)","78909
(72366;85375)","153568
(134389; 173180)","436876
(166479; 673679)"
Binary file not shown.
Binary file modified results/QALY_model/direct_QALYs/prepocessing/LE_SMR100.pdf
Binary file not shown.
Binary file not shown.
Binary file modified results/QALY_model/direct_QALYs/prepocessing/QALY_D_SMR100.pdf
Binary file not shown.
Binary file not shown.
Binary file modified results/QALY_model/direct_QALYs/prepocessing/QoL_Belgium_fit.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 91b6d6d

Please sign in to comment.