Giter Club home page Giter Club logo

Comments (9)

BlackEdder avatar BlackEdder commented on June 12, 2024 2

The vignette includes a couple of simple code examples to compare the two approaches. I noticed a couple of differences in the implementation that might be good to think about.

  • There are some naming differences, particularly demo_grp vs demography_group
  • The form of the contact matrix used is different in both packages. For SEIR-V it is not needed to rescale the contact matrix, presumably because it does so internally. In finalsize this is needed. Would be good if we can think of a way to unify this.
  • Is there a general way to know the proportion of the population vaccinated in the vaccine calendar? It did not seem to be equal to nu times the number of days the vaccination programme is happening?

from epidemics.

BlackEdder avatar BlackEdder commented on June 12, 2024 1

WIP: https://github.com/epiverse-trace/epidemics/tree/finalsize_vignette

from epidemics.

adamkucharski avatar adamkucharski commented on June 12, 2024 1

Have had a look through, and useful to see them side-by-side to understand structure/naming etc. A few additional thoughts:

  • If including as vignette, would be good to distinguish what it adds beyond the existing compartmental comparison in finalsize.
  • Perhaps an obvious one is alignment in how different aspects are defined. Perhaps too much refactoring to get full alignment, would be nice if possible to unify parameters so easier to use in the other model.
  • Another would be the difference in speed, particularly if sampling over many realisations of R0 (as discussed in finalsize and issue #106)
  • There's also quite a lot of wrangling code required to compare, so could be useful to have this vignette as more of a guide to help users decide which is preferable, e.g. if you want to easily calculate overall size, and do multiple realisations, finalsize gets you there much faster and potentially more accurately, because it's based on analytical solution. Whereas any temporal questions have to be addressed with epidemics?

from epidemics.

pratikunterwegs avatar pratikunterwegs commented on June 12, 2024 1

Thanks - we do have epidemic_size() that calculates size at any point in the simulation, but I'll put in some functions for the peak specifically.

from epidemics.

BlackEdder avatar BlackEdder commented on June 12, 2024 1

The vignette includes a couple of simple code examples to compare the two approaches. I noticed a couple of differences in the implementation that might be good to think about.

Thanks @BlackEdder, will you keep working on this vignette or should I take this further and make a PR?

Might be most efficient if you would be willing to take this further. Agreed that it would be good to explain in the text, what the main differences are between the two packages. I would hazard that final size is faster, but if you need dynamics over time and/or interventions/vaccinations that happen over time, you should use the epidemics package.

from epidemics.

pratikunterwegs avatar pratikunterwegs commented on June 12, 2024

The vignette includes a couple of simple code examples to compare the two approaches. I noticed a couple of differences in the implementation that might be good to think about.

Thanks @BlackEdder, will you keep working on this vignette or should I take this further and make a PR?

There are some naming differences, particularly demo_grp vs demography_group

Thanks - maybe 'demo_group' is a good compromise between the two packages, and between clarity and brevity. That said {finalsize} is on CRAN so perhaps adopting 'demo_grp' in {epidemics} is safer than changing it in both packages.

The form of the contact matrix used is different in both packages. For SEIR-V it is not needed to rescale the contact matrix, presumably because it does so internally. In finalsize this is needed. Would be good if we can think of a way to unify this.

Yes, it is scaled internally using .prepare_args_default(). This could be a good time to take another look at the {contactmatrix} package we had been discussing?

Is there a general way to know the proportion of the population vaccinated in the vaccine calendar? It did not seem to be equal to nu times the number of days the vaccination programme is happening?

I had not really thought about it, but I can convert it to an issue and a relevant test for correctness.

from epidemics.

pratikunterwegs avatar pratikunterwegs commented on June 12, 2024

Have had a look through, and useful to see them side-by-side to understand structure/naming etc. A few additional thoughts:

If including as vignette, would be good to distinguish what it adds beyond the existing compartmental comparison in finalsize.

Perhaps an obvious one is alignment in how different aspects are defined. Perhaps too much refactoring to get full alignment, would be nice if possible to unify parameters so easier to use in the other model.

Another would be the difference in speed, particularly if sampling over many realisations of R0 (as discussed in finalsize and issue accepts R as a distribution or samples #106)

There's also quite a lot of wrangling code required to compare, so could be useful to have this vignette as more of a guide to help users decide which is preferable, e.g. if you want to easily calculate overall size, and do multiple realisations, finalsize gets you there much faster and potentially more accurately, because it's based on analytical solution. Whereas any temporal questions have to be addressed with epidemics?

Thanks @adamkucharski - I think being able to answer the temporal questions, and the effect of interventions etc is probably the key aspect, but others are good to mention too.

Speaking of temporal questions, would it be useful to have helper functions that help get the timing and size of the epidemic peak (optionally by age group)?

from epidemics.

adamkucharski avatar adamkucharski commented on June 12, 2024

Yep, size in particular often useful as output metric, particularly for healthcare requirements, deaths etc. (e.g. Table 2 in early COVID modelling) and tables in Roadmap analysis.

from epidemics.

pratikunterwegs avatar pratikunterwegs commented on June 12, 2024

Okay thanks, will do.

from epidemics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.