epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Show better seed management in Ebola vignette #163

Closed pratikunterwegs closed 4 months ago

pratikunterwegs commented 6 months ago

This issue is to request better seed management for comparisons across scenarios in the Ebola virus disease vignette. The code currently shows seed resetting using set.seed() for each intervention scenario. A better way to use the same seed for comparable model runs with and without interventions (or with different parameter sets) is to use withr::with_preserved_seed() (or withr::with_seed() as appropriate).