ImperialCollegeLondon / covid19model

Code for modelling estimated deaths and cases for COVID19.
MIT License
944 stars 271 forks source link

Total_infected_table.csv gets wrong confidence interval #94

Closed leonardo-calcagno closed 4 years ago

leonardo-calcagno commented 4 years ago

The confidence interval of infected population as reportes by the total_infected_table.csv is different from the one you can compute from the base-forecast-plot.csv I ran the base model for European countries, with data up to 30 April 2020 (neither debug nor full). The total_infected_table intervals is as follows

Capture d’écran 2020-04-30 à 20 09 05

Meanwhile, when I take country population and cumulated estimated cases on base_forecast_plot.csv, I get the following result

Capture d’écran 2020-04-30 à 20 09 57

The middle value is the same, but the minimum and maximum ones differ. I assume the bug happens when computing the total_infected_table, but I did not find it yet.

s-mishra commented 4 years ago

Hi @leonardo-calcagno, The calculation in the toal infected cases table is correct. However, the way cumulative cases/deaths upper and lower bounds are calculated in the plot code is wrong. Thanks for pointing that out. We never use the cumulative lower and upper bounds so we missed this. The mean is not different as averaging doesn't get affected but CI do if you just sum over summary stats.; which is not done in the total-infected table but done in plotting code.

Long story short total-infected is correct, problem is in how cumulative counts was did in plotting codes. Howeever, as we don't use those values to plot anything none of the reporting is incorrect.

s-mishra commented 4 years ago

closed by removing it now 0264dc8