ImperialCollegeLondon / covid19model

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

Discrepancy between implementation and paper? #34

Closed torfjelde closed 4 years ago

torfjelde commented 4 years ago

I'm currently trying to reproduce the model in another PPL and I'm slightly confused when comparing the model and code.

In the paper (p. 20) you can find the following: image while in the code we have https://github.com/ImperialCollegeLondon/covid19model/blob/5c756a69f9d73e28ffe37a15b6cccc157dcf5160/stan-models/base.stan#L67-L68 https://github.com/ImperialCollegeLondon/covid19model/blob/5c756a69f9d73e28ffe37a15b6cccc157dcf5160/stan-models/base.stan#L34 which means the code is implementing Exponential(0.03) and Exponential(1 / τ) rather than Exponential(0.03) and Exponential(τ) as specified in the paper (or with inverse parameters, depending on which parameterisation you're using in the paper).

So I'm wondering if this is a mistake in the code or just a typo in the paper?:)

Also, from the above snippet from the paper, it seems to me that y[m] should be a random vector of length num_impute or N0 (6 in paper) for each m, while in the code all the imputed values seem to be the same value: https://github.com/ImperialCollegeLondon/covid19model/blob/5c756a69f9d73e28ffe37a15b6cccc157dcf5160/stan-models/base.stan#L39 Is this correct?

Thanks!

(Btw, really appreciate you open-sourcing this!)

s-mishra commented 4 years ago

Hi @torfjelde, thanks for pointing this out. There is a typo in the paper. It should have been exponential(1/tau). Also yes all imputed values are same for all N0 day but it is specific to a country by virtue of y being a vector of length M (where M is the total number of countries)

torfjelde commented 4 years ago

Aight :+1: Thanks for the reply!:)