epiverse-trace / epichains

Methods for simulating and analysing the sizes and lengths of infectious disease transmission chains from branching process models
https://epiverse-trace.github.io/epichains/
Other
6 stars 2 forks source link

Integration with ringbp #6

Closed adamkucharski closed 11 months ago

adamkucharski commented 1 year ago

The simulation functions in this package are a useful illustration of branching dynamics, and effectively a subset of the more complex functionality in ringbp. It could therefore be useful to have some alignment in functions, e.g. so the estimates of k can be passed to the scenario_sim() function in ringbp, perhaps in combination with parameters from epiparameter. It may make sense to do this via a pull request to ringbp, rather than just handling all the formatting in this package.

jamesmbaazam commented 11 months ago

ringbp simulates outbreaks with assumptions that are heavily tied to COVID-19. Upon further discussion, it's been agreed that {epichains} will provide simple generic outbreak simulation functionalities that can be customized by the user to their scenarios. {epichains} is also going to serve as the engine for other packages like simulist and superspreading. There are plans to supply {epichains} models to epidemics to simulate intervention scenarios in a modular way.

For now, we have provided a vignette that demonstrates how to simulate interventions with {epichains} here.

This issue will be closed for now and reopened when it becomes necessary down the line to combine these two packages.

adamkucharski commented 11 months ago

{ringbp} is pretty flexible given appropriate parameters (as it in part emerged from an Ebola ring vaccination model). But main difference is that it tracks timing of events within chains (e.g. delay infection-to-onset of symptoms, delay onset-to-isolation, onset-to-tracing of contacts etc.), whereas in {epichains} I believe these have to be defined across the whole process at the start?

That vignette is useful for getting some broad intuition about population vs individual control (and nice complement to the analytical functions here: https://epiverse-trace.github.io/superspreading/articles/epidemic_risk.html). But I think we would ideally have a scenario model that can account for timings (whether in {epichains}, {epidemics} or another package).

In particular, many of the policy questions around outbreaks that can potenitaly be controlled via contact tracing focus on two main factors: delays in the infection and control process, and detection of infections/contacts in the transmission chain. So would need ability to input these parameters if want a tool that can be applied to outbreaks like Ebola/marburg, pandemic flu/coronavirus, mpox etc.

jamesmbaazam commented 11 months ago

Thanks @adamkucharski. All good inputs. Just took another quick look at {ringbp} to align with your thoughts and you're right that it provides a good way to track processes, which is a key difference with {epichains}.

But I think we would ideally have a scenario model that can account for timings (whether in {epichains}, {epidemics} or another package).

The scenario model is a good enhancement but this is where I'm not sure where it would sit. There's been talks of remitting such sugar functionalities to packages like {scenarios} and {epidemics}. I'm not sure here.

I'm looping in @sbfnk for comments.

sbfnk commented 11 months ago

The model in ringbp is flexible but the implementation is currently not as some of the parameters are hardcoded, see https://github.com/epiforecasts/ringbp/issues/59 for a couple of examples.

I've stripped out the paper code so that's now a standalone package that could be developed further for a more general use case.