labmetcalf / mada-rt

1 stars 0 forks source link

EpiNow -> EpiNow2 #1

Open seabbs opened 4 years ago

seabbs commented 4 years ago

Hi,

This is some really nice work!

Just a note that we are in the process of depreciating EpiNow in favour of a new package EpiNow2. The aim of the new implementation is to better handle back-calculation to date of infection and to move all estimation into a single Stan model (reducing the run time and code complexity). We have also focussed quite a bit on user experience so hopefully, it should be easier to work with. The practical impact of switching should be a sharper inferred infection curve and therefore higher Rt estimates (when Rt > 1) and lower Rt esitmates (when Rt < 1), faster run times and reduced uncertainty (reduced due to a more robust method not due to fewer sources of uncertainty being included).

Very happy to answer any questions on the new implementation (docs are still in dev I am afraid) or deal with any issues that come up (ideally in an issue).

Thanks,

Sam

P.S Dashboard is really great stuff.

New package: https://epiforecasts.io/EpiNow2/

Example implementation (note this may soon be merged into master - when this happens this link will 404): https://github.com/epiforecasts/covid-global/blob/epinow2/R/update_cases.R

mrajeev08 commented 4 years ago

Hi Sam,

Thanks so much for pointing us to the new package, and for all the work that you all are doing generally! We will work on porting over the code to EpiNow2 and will submit an issue if we run into anything...thanks again!

Cheers, Mal

seabbs commented 4 years ago

Sounds great! Happy to help if you run into any issues.

mrajeev08 commented 3 years ago

Hi @seabbs , 

I know you must be quite swamped at the moment, but we (myself and @fidyras and @bennyrice) would love your advice if you have the time.

I never did get around to updating the pipeline to EpiNow2, and Madagascar actually stopped reporting daily data in October. They're now experiencing a second surge and since March 2021 have released new daily data. They're keen to have some short-term forecasts at the national and subnational level, so we're trying to get this pipeline back up. 

I have got it working with EpiNow2 (see code here and fig here), but we're trying to grapple with the greater uncertainty in the case forecasts and inconsistent (sometimes faster, sometimes slower) runtimes at the regional level when compared to EpiNow.

It seems like poking around the epiforecasts.io website, the uncertainty part is generally an issue for countries with lower/sparser case counts (this is what the forecasts for Mada look like at the moment)?

The other issue I had is with run times which generally are a bit unpredictable. I know that you can set the max_time arg, but I hadn't really figured out how to have the code handle the timeouts gracefully and how to interpret the results given that some chains failed to converge. 

So for the meantime, we're still using the old EpiNow package and its doing a pretty good job at least in giving us reasonable case forecasts that we can report with uncertainty to our Malagasy public health colleagues (see here for the most recent results). Do you have any thoughts on continuing to use the old package? I realize that it's deprecated and won't be maintained, so it will likely break in the future, but I was thinking of setting up a docker pipeline with the R version EpiNow was last built against to get around this. Or if you have any alternative suggestions for packages, resources on how to tune EpiNow2 to generate more reasonable estimates at low case counts/deal with runtimes, or generally advise against estimating below a certain case threshold (we've been limiting to regions where at least 50 cases have been reported)--really any input would be very welcome!

Thanks in advance for your time!

Best, Mal