epiforecasts / EpiNow

Estimate Realtime Case Counts and Time-varying Epidemiological Parameters
https://epiforecasts.io/EpiNow
Other
33 stars 17 forks source link

Compatibility with RECON packages #75

Closed thibautjombart closed 4 years ago

thibautjombart commented 4 years ago

Opening this to discuss potential for making the package RECON-friendly (dare I say "RECONpatible"?). I suspect there is some duplication across EpiNow, EpiEstim, earlyR, incidence, projections etc. and we can probably manage better inter-operability.

Inputs

One avenue for this would be being able to handle incidence objects as inputs for estimates of R / r / doubling time / halving times.

As it stands, incidence::fit() will use log-linear models for estimating r and doubling/halving times. This is far from perfect as discussed in this issue. Longer term changes to incidence were planning on re-focussing the package to do data handling and graphs, and migrate estimates or R/r to a separate package. I need to say we were also considering changing the internal object representation using [tsibble](https://github.com/tidyverts/tsibble) in the background (rather than handling pre-computed counts, which are not time-consuming and could just be re-computed every time it is needed).

Outputs

Maybe more relevant for packages doing forecasting, but projections::project implements forecasting using a branching process (Poisson / NegBin) with time-varying R. It also provides a simple general-purpose S3 class for storing forecasting (projections objects), with some routines for merging (merge_projections) or adding (+ or merge_add_projections) forecasts and some plotting.

Let me know what you think?

seabbs commented 4 years ago

Hi @thibautjombart,

Sorry for the glacially slow response on this.

We are about to depreciate EpiNow in favour of EpiNow2 which has quite a different methodology to this package.

Most of the internal calculations are now stan so potentially less overlap than there was. Something that may be of general interest is that the package is designed to do date of infection estimates with internal handling of reporting issues (i.e weekly reporting effects + overdispersion). Combined with a lot of flexibility in the temporal variation of Rt estimates (i.e fully non-linear, breakpoints, piecewise linear, piecewise constant and constant) this may be of interest as an internal tool in some RECON packages (i.e earlyR). EpiNow2 should be on CRAN sometime in the next week if interested in using.

In terms of incorporating other packages into EpiNow2 we are trying to keep dependencies as low as possible so this would probably be better suited for a companion package.

Thanks

Sam

seabbs commented 4 years ago

Pinging @tjtnew in case interested.

TimTaylor commented 4 years ago

Cheers; will have a dig around