Big table

Median and UI intervals for:

  • Number of RCTs relevant to burden, in total, per region
  • Number of patients enrolled in RCTs relevant to the burden, in total, per region
  • Number of RCTs and number of patients per region per disease
  • Local proportions within regions

In [1]:
library(data.table)

In [2]:
sms <- list.files("/media/igna/Elements/HotelDieu/Cochrane/MappingRCTs_vs_Burden/Replicates/Metrics_over_repl/")

In [3]:
dis <- as.numeric(substr(sms,25,nchar(sms)-4))
dis


  1. 0
  2. 1
  3. 10
  4. 12
  5. 13
  6. 14
  7. 15
  8. 16
  9. 17
  10. 18
  11. 19
  12. 2
  13. 20
  14. 22
  15. 23
  16. 24
  17. 25
  18. 26
  19. 3
  20. 4
  21. 5
  22. 6
  23. 7
  24. 8
  25. 9

In [4]:
Mgbd <- read.table("../Data/27_gbd_groups.txt")

In [5]:
data_f <- data.frame()

for(k in dis[dis!=0]){

DF <- fread(paste(c("/media/igna/Elements/HotelDieu/Cochrane/MappingRCTs_vs_Burden/Replicates/Metrics_over_repl/Metrics_over_replicates_",
                    as.character(k),".txt"),collapse=""))

data <- DF[Dis=="dis",][,lapply(.SD,function(x){quantile(x,probs=c(0.025,0.5,0.975))}),
                    by=c("Region"),
                    .SDcols=c("RCTs","Patients")]
dataprop <- DF[,lapply(.SD[Dis=="dis",]/.SD[Dis=="all",],function(x){100*quantile(x,probs=c(0.025,0.5,0.975))}),
                    by=c("Region"),
                    .SDcols=c("RCTs","Patients")]

df <- data.frame(cbind(cbind(unique(data$Region),as.character(Mgbd$x[k])),
      matrix(data$RCTs,ncol=3,byrow=TRUE),
      matrix(data$Patients,ncol=3,byrow=TRUE),
      matrix(dataprop$RCTs,ncol=3,byrow=TRUE),
      matrix(dataprop$Patients,ncol=3,byrow=TRUE)))
    
names(df) <- c("Region","Disease",
               paste(paste("Nb","RCTs",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Nb","Patients",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Prop","RCTs",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Prop","Patients",sep="_"),c("low","med","up"),sep="_"))

data_f <- rbind(data_f,df)
}

In [6]:
table(data_f$Disease=="Congenital anomalies")


FALSE  TRUE 
  207     9 

In [7]:
#all diseases
DF <- fread(paste(c("/media/igna/Elements/HotelDieu/Cochrane/MappingRCTs_vs_Burden/Replicates/Metrics_over_repl/Metrics_over_replicates_",
                    as.character(0),".txt"),collapse=""))

data <- DF[,lapply(.SD,function(x){quantile(x,probs=c(0.025,0.5,0.975))}),
                    by=c("Region"),
                    .SDcols=c("RCTs","Patients")]

df <- data.frame(cbind(cbind(unique(data$Region),"All"),
      matrix(data$RCTs,ncol=3,byrow=TRUE),
      matrix(data$Patients,ncol=3,byrow=TRUE),
      matrix(NA,nrow=length(unique(data$Region)),ncol=6)))
    
names(df) <- c("Region","Disease",
               paste(paste("Nb","RCTs",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Nb","Patients",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Prop","RCTs",sep="_"),c("low","med","up"),sep="_"),
               paste(paste("Prop","Patients",sep="_"),c("low","med","up"),sep="_"))

data_f <- rbind(data_f,df)

In [8]:
write.table(data_f,"../Data/RCTs_and_Patients_Nb_local_prop_median_UI_per_region_and_disease.txt")

In [9]:
data_f


RegionDiseaseNb_RCTs_lowNb_RCTs_medNb_RCTs_upNb_Patients_lowNb_Patients_medNb_Patients_upProp_RCTs_lowProp_RCTs_medProp_RCTs_upProp_Patients_lowProp_Patients_medProp_Patients_up
1Central Europe, Eastern Europe, and Central AsiaTuberculosis 4 17 28 817.791035280509 3727.45887445887 8286.37821455813 0.0670184629223417 0.279881461969048 0.465039030061452 0.0541345253732852 0.246996228187276 0.548102268596756
2High-income Tuberculosis 28 95 186 4760.52142857143 20935.8779220779 80181.1191734 0.04456973410046330.152 0.298837432345686 0.02461451167538080.106212756460855 0.408072232458222
3Latin America and CaribbeanTuberculosis 8 29 42 2031.4689484127 41578.255952381 46855.1901044703 0.185393444249661 0.67421141343607 0.985567832207902 0.25044366594425 4.89484230548107 5.74768206602598
4North Africa and Middle EastTuberculosis 4 17 31 426.4375 2930.46428571429 4985.14201868919 0.050657984871941 0.214646464646465 0.393272107025709 0.0509666269158626 0.351318357907269 0.598363560953588
5South Asia Tuberculosis 11 40 56 3184.94642857143 14501.0103479853 23036.5803571428 0.24519372262736 0.8831971737690441.26012776852171 0.1715347922852040.7813390179105591.28564993265724
6Southeast Asia, East Asia and OceaniaTuberculosis 15 53 76 5566.83035714286 28046.521031746 41850.471984127 0.169275419396122 0.603575902516798 0.872978293733491 0.17204138884611 0.869588012581335 1.32455313091434
7Sub-Saharian AfricaTuberculosis 32 105 143 26077.3766666667 348533.348809524 490081.25436508 1.42492163779064 4.58756065284517 6.22541706134815 0.818396709662252 10.0117895103758 14.5069875713714
8All Tuberculosis 91 298 454 66723.05 452171 649434 0.1067711511416240.3519942335415670.5377488439077570.2123856961685051.4356640298352 2.07318820327828
9Non-HI Tuberculosis 66 217 304 57307.0123809524 428351.40620155 604073.611783425 0.2337274094307040.76530612244898 1.0724506487047 0.5016511224877863.63649616241897 5.17492400006109
10Central Europe, Eastern Europe, and Central AsiaHepatitis 74 114 145 7715.30616512343 12548.4220964972 22183.6594418 1.2136600664145 1.86610907774073 2.38450926540375 0.514768325705959 0.839246898086557 1.48736113196973
11High-income Hepatitis 412.975 628.5 910 98535.1793825832 169869.332450747 308290.018507962 0.6692878878296221.01787605124043 1.47072393601537 0.5077631664322220.8703947175540441.57873226460582
12Latin America and CaribbeanHepatitis 35 56 77 8390.10083446677 24088.154095927 31737.2008954347 0.828343142214968 1.31857781963739 1.81734503400777 1.00659027164541 2.87637169476625 3.83825981372682
13North Africa and Middle EastHepatitis 43 68 106 3656.24030029857 6233.357932318 10681.58046102 0.53810510071966 0.859617235504793 1.33847098254008 0.445491467659216 0.756232922118722 1.29672302622227
14South Asia Hepatitis 40 62 86 8188.72029577937 14953.1342308834 52628.6003086945 0.8936448516780731.39424202512127 1.93060176416044 0.4375330706214390.8113771087593082.78726336881155
15Southeast Asia, East Asia and OceaniaHepatitis 127 191 241 43573.8174995897 173801.210232777 202476.30722682 1.46456975143553 2.20751801389092 2.79582555793653 1.3549048302371 5.3679274837805 6.42497149040165
16Sub-Saharian AfricaHepatitis 5 11 21 926.947023809524 3222.13496259488 75099.685 0.217957521088451 0.46908315565032 0.934164239461674 0.0263581494289545 0.0930646016741352 2.12936969258321
17All Hepatitis 602 913 1300 211246.5 400936 598267.3 0.7198322275213091.08896665725719 1.54853360044985 0.6753621687787491.28344680200113 1.91797573095832
18Non-HI Hepatitis 267 404 540 89168.4212870673 234307.105418378 340665.245467171 0.9525251318465551.43529668109585 1.92490859834954 0.7681513298914691.99778768377513 2.90740193579868
19Central Europe, Eastern Europe, and Central AsiaNeoplasms 1138 1232 1308 183827.211836229 226895.654396867 246204.497880263 17.3245030951206 18.5720730741276 19.5881092636764 11.4541672552595 13.8342928877313 14.9528258858498
20High-income Neoplasms 8802.975 9501 10059.025 4062208.216989 4556668.092008134939833.0917347813.121248118677 14.089178916948 14.875012663949 19.425583132019 21.496217068483523.1318144906128
21Latin America and CaribbeanNeoplasms 545.975 593 633 56239.636179842 64651.5727531692 75926.6519682964 11.8077701618096 12.766870530672 13.5845055739137 6.14207294372643 7.06517357795253 8.34176599259177
22North Africa and Middle EastNeoplasms 568 620 665 44745.8958794888 59436.7408077354 65244.0343887164 6.51818621249279 7.09600161501474 7.60721685780729 4.96915431770923 6.53677101875267 7.2543103038017
23South Asia Neoplasms 543 591 631 67889.703462734497834.7917805781152512.65266063711.243773601810112.171982236576512.96880744886473.344511435552754.767929816717767.59309223277874
24Southeast Asia, East Asia and OceaniaNeoplasms 1854 2004 2125 441358.128719971 674856.763484969 725858.689941082 19.9678972712681 21.3612619345251 22.4966119914398 13.1891677872728 19.1707034808613 20.9669823598856
25Sub-Saharian AfricaNeoplasms 182 201 218 23579.8379819 35124.8077750845 141795.319949187 7.33495597552072 8.08341475391418 8.75502008032129 0.610566847142436 0.911547609343251 3.69961560110894
26All Neoplasms 11147.975 12024 12728.025 5095632.85 5686771.5 6152196.2 12.232980802053613.129935720361 13.868582299023115.134153792013516.72065867709 17.9977481146424
27Non-HI Neoplasms 3572.975 3858 4088.025 900394.0370115021149422.103060291300220.1498914511.668619381684512.532896210609113.25261710847957.087131680268678.9399139252005710.1210658102694
28Central Europe, Eastern Europe, and Central AsiaCardiovascular and circulatory diseases 681 767 858.025 280599.351921757 324455.267480318 367715.98116672 11.1421013103449 12.5363490106336 13.9805949773587 19.1576313877163 21.7597016118534 24.4373903566291
29High-income Cardiovascular and circulatory diseases7101 7959 8901.05 2724964.91643023 3114279.31836519 3554723.84155324 11.5998265883491 12.947106559978 14.4304363419511 14.1431238374785 16.0797392448512 18.2829788192143
30Latin America and Caribbean Cardiovascular and circulatory diseases446 509 575 94039.2028577901 112597.351070667 155117.007583547 10.5471587303295 11.9455120182578 13.4783970330764 11.3335047510722 13.5710261644395 18.489573534549
196Sub-Saharian AfricaNeonatal disorders 21 46 102 24032.7296063976 169632.414205531 367055.401546708 0.926722719894912 2.04347826086956 4.45360454486091 0.699210948974975 4.81462581508111 10.3108609532856
197All Neonatal disorders638.95 1424 3612.79999999999 317800.45 779939 1655367.85 0.764590766452948 1.69948090685226 4.26012587577822 1.02160321469577 2.50025046101065 5.28274605941703
198Non-HI Neonatal disorders248 530 1247.05 145158.315350602 398018.290162006 789106.153197559 0.884084533491047 1.88828543682336 4.38891752702681 1.26216981915223 3.40537025497647 6.72949685485927
199Central Europe, Eastern Europe, and Central AsiaNutritional deficiencies 38 75 132 7087.87668553057 17473.545323274 35666.8678843683 0.611569118252429 1.22521360631952 2.15469345998663 0.471012418571894 1.16523029003696 2.38146919584535
200High-income Nutritional deficiencies433 830 1444.025 88142.1077522116 192777.842895108 439904.988281275 0.700668184504674 1.34184660536221 2.33562403251808 0.450350614834347 0.983833605827001 2.23851178684879
201Latin America and CaribbeanNutritional deficiencies 33 65 108 7918.37962402182 19801.544527086 36870.1254202695 0.766831767015252 1.52254808748352 2.54418899932266 0.962341005254684 2.38030131212012 4.40671283138598
202North Africa and Middle EastNutritional deficiencies 59 116 200 7235.69709544978 17365.9551795188 28602.2953293863 0.746530986954376 1.46075002084669 2.51512636678602 0.881989235183836 2.10402128763192 3.47114622901864
203South Asia Nutritional deficiencies66 124 182 40387.7036821143 106015.480811218 186644.55117233 1.49979223490372 2.79881675060028 4.08342630204339 2.26280590863048 5.83839900588143 10.2753484178475
204Southeast Asia, East Asia and OceaniaNutritional deficiencies 53 105 191 22325.1917162698 98468.5717954978 162530.774697926 0.610846732182581 1.21416760154535 2.19080294048595 0.710854465914014 3.04432525008589 5.07120884543755
205Sub-Saharian Africa Nutritional deficiencies50 93 131 56520.7328867478 115724.299266604 262523.188908829 2.21929508549929 4.13376274830183 5.76669457481341 1.62869187733395 3.3183308875102 7.52558134571771
206All Nutritional deficiencies677.975 1279 2138 281711.425 568439 983125.125 0.806362587337069 1.52370395983894 2.54448695551136 0.909011440071932 1.81704078040081 3.14076289365824
207Non-HI Nutritional deficiencies280 526 824 176518.269558159 366835.344079135 603667.296588944 1.00319109477991 1.86585102294944 2.922051700565 1.52391053296193 3.14661291117365 5.16538198113286
208Central Europe, Eastern Europe, and Central AsiaSexually transmitted diseases excluding HIV 1 24 749.049999999999 166.875803571429 5929.17827112827 182459.186835163 0.0165261940175178 0.400407670277349 11.8303974788526 0.0110481010551772 0.394729798573915 11.8976053344826
209High-income Sexually transmitted diseases excluding HIV53 380 8690.17499999997 22857.5318452381 175032.136396577 2827324.65798773 0.0862962836769168 0.61265064335957 13.5176398570119 0.11661247004485 0.892661430616718 13.9412886680823
210Latin America and Caribbean Sexually transmitted diseases excluding HIV4 30 574.025 566.3 8363.06279963138 116884.073604101 0.0943157111994775 0.702967822555451 12.8959200052413 0.0674929274135377 1.00490243915955 13.5860670546079
211North Africa and Middle East Sexually transmitted diseases excluding HIV9 62 1141.15 1255.96791871921 9784.32448064027 126780.337072547 0.116935155618113 0.775686673448627 13.7622244576364 0.150206226249769 1.18411104724781 14.5437344554034
212South Asia Sexually transmitted diseases excluding HIV2 25 624.124999999998 363.3125 7205.37192982456 321071.850485355 0.046866688242362 0.555161645697876 13.4156663365741 0.0197391501879189 0.392177927889733 16.3114886343986
213Southeast Asia, East Asia and Oceania Sexually transmitted diseases excluding HIV7 52 1162.05 2571.975 27110.8425371729 455596.186551868 0.0800732097918097 0.591651152057004 12.9089563486742 0.0795510923542207 0.840509549941607 13.6813361376645
214Sub-Saharian Africa Sexually transmitted diseases excluding HIV2 14 292.099999999999 260 12502.3809036658 494810.454359185 0.0856155224764216 0.635824151538218 12.462278057799 0.00741987864823555 0.358673597075859 13.6430043866867
215All Sexually transmitted diseases excluding HIV78 535 11855.275 35272.1 259527 4427139.675 0.0937486969405685 0.636242710504873 13.5760997575811 0.111549239924856 0.827887986175145 13.4567086636888
216Non-HI Sexually transmitted diseases excluding HIV28 185 3874.325 9593.4795676794 76582.2552523824 1678073.14798159 0.0992194611234593 0.654218440356294 13.2150211944388 0.082193341661143 0.654420890871998 13.5457787568265
217Central Europe, Eastern Europe, and Central AsiaAll 5767.975 6005 6206 1410252.68192944 1484634.7634048 1545138.42728806 NA NA NA NA NA NA
218High-income All 58034.95 60631 62973.075 17965002.738132818964732.766993719913082.6031464NA NA NA NA NA NA
219Latin America and CaribbeanAll 3960 4135 4288 722593.839865011 797066.090539088 846449.76662953 NA NA NA NA NA NA
220North Africa and Middle EastAll 7520.975 7863 8176 728226.625801279 771648.020121715 843574.472180716 NA NA NA NA NA NA
221South Asia All 4145 4343 4517 1557591.679865691833915.301979792141590.444162 NA NA NA NA NA NA
222Southeast Asia, East Asia and OceaniaAll 8087 8448 8763 2649547.45322001 2951844.43388339 3256999.37057224 NA NA NA NA NA NA
223Sub-Saharian AfricaAll 2119 2213 2294 2827975.53465084 3265227.67385529 3642624.48396278 NA NA NA NA NA NA
224All All 78661.775 82179 85358.2 28545370.47530082791 31513723.075NA NA NA NA NA NA
225Non-HI All 26404.975 27564 28597.075 10376596.342702511117752.087440911813323.0799087NA NA NA NA NA NA

In [ ]: