terminological / uk-covid-datatools

Data tools for loading and processing covid data
MIT License
2 stars 2 forks source link

Multiplier on Rt uncertainty and Rt window #1

Open seabbs opened 3 years ago

seabbs commented 3 years ago

Hi @robchallen,

Just been reading your preprint (nice work 😄 ).

I was just wondering how you set the Rt uncertainty and the Rt window for your SPI-M submissions mentioned here:

https://github.com/terminological/uk-covid-datatools/blob/bcc2ce774a7fc4d19f8e70542ec4ab84ab228468/vignettes/current-rt-export.R#L29

I couldn't find it mentioned in your preprint or code?

Also just two small points: the code link on the preprint server 404s and the truncation you mention in the preprint using the "formal" method is a weakness in the back calculation implementation used in the surveillance package (which also has some stability issues) as it does nothing about future unobserved cases.

Looking forward to reading through your work in more detail!

Sam

P.S if you would like to have a zoom sometime it would be great to explore potential collaborations.

robchallen commented 3 years ago

Hi Sam.

Everything a bit in flux :-) not sure the code is quite ready for review, I'll investiage that link issue. I've been trying to triangulate 2 preprints and get the citations and code lined up... Needs a big tidy up.

For the SPIM submissions: At the moment window is 14 but this does change. I used to do 7 and 28 and I'm going to shift to something that is data driven. I'm using a set of empirical serial interval distributions which I've created from a resampling process this is described here.https://www.medrxiv.org/content/10.1101/2020.11.17.20231548v1. They are not in a sensible format for sharing but I'm getting to that. I'm going to put them up as a set of discrete PDFs. If you want to dig the code is in the R/SerialIntervalProvider.R but it could be (a lot) clearer.

Zoom good. I'll send you an email.

BTW I'm working on a reimplementation of EpiEstim that has support for different approaches to windowing, priors and combining bootstraps. It's in Java but with an R interface. Largely working but so far undocumented.

seabbs commented 3 years ago

No problem Rob - ah I thought the papers had been submitted so it was all wrapped up.

Ah right I see - have you seen the one day ahead (or M day ahead) optimisation approach we took with EpiNow - that seemed to produce nice results. I know Kris Parag is doing something similar and has advanced it to a forwards/backwards optimisation process. What about the uncertainty magnification?

For EpiNow2 all the distributions are passed in as priors to stan so we need distributions on the mean etc rather than empirical samples but I will take a look. On that note are you interested in adding your GT and incubation period estimates to EpiNow2? It would be great to let users have some other choices. If so the it could be added to here and then extracted by users in a typical work flow (like this). That link may be of interest as the 5th example down shows the results of a novel non-parameteric back-calculation approach that accounts for truncation and uncertainty in input (with Rt then calculated as in EpiEstim but within stan) vs the other methods that assume a generative model for Rt. The nice thing about that approach (as I am sure you have found) is that it is about 100 times faster than the gaussian process method.

:+1:

Sounds great - will enjoy putting it through its paces when its ready. Java seems like a good choice.

kdpenner commented 3 years ago

They are not in a sensible format for sharing but I'm getting to that. I'm going to put them up as a set of discrete PDFs.

Commenting here to say I look forward to using the empirical PDFs. Congrats on a well written paper, I'm not an epidemiologist but I followed it almost entirely.

robchallen commented 3 years ago

Thanks both, I've put up some files (in the master branch) with the outputs in machine readable form:

serial interval discrete pdfs N.B. @seabbs this is what I'm using.

generation interval discrete pdfs

parameterised generation intervals N.B. @seabbs this is what I think you would use for EpiNow2.

and one or two details about them here:

https://github.com/terminological/uk-covid-datatools/tree/master/vignettes/serial-interval

seabbs commented 3 years ago

Thanks Rob,

Unfortunately not as we do everything in model so need prior distributions and not samples. Not a problem though.

Looking forward to catching up and hearing more about your approach and extension plans.

Sam

robchallen commented 3 years ago

The distributions are up there also.

On Sun, 22 Nov 2020, 09:33 Sam Abbott, notifications@github.com wrote:

Thanks Rob,

Unfortunately not as we do everything in model so need prior distributions and not samples. Not a problem though.

Looking forward to catching up and hearing more about your approach and extension plans.

Sam

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/terminological/uk-covid-datatools/issues/1#issuecomment-731721359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6SWIGFBNC4BKJN44SBKMDSRDLILANCNFSM4T4UGQYA .