epiverse-trace / epichains

[Under active development] 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
5 stars 2 forks source link

Clarify what `n_chains > 1` means in context of susceptible depletion vs `lapply()` over `simulate_chains()` with `n_chains > 1` #270

Closed jamesmbaazam closed 5 days ago

jamesmbaazam commented 2 months ago

From the MSc training this week, it seems it is still not clear what n_chains means in the context of susceptible depletion when n_chains > 1. @sbfnk and I have had a similar discussion here https://github.com/epiverse-trace/epichains/pull/242#issuecomment-2100488897.

The current approach uses option 1 from the linked comment above, which I'll transfer here with some minor edits to the column names and emphasis in square brackets:

The simulations (n_chains) are replicates of the same situation [simulation]. The population size/depletion of susceptibles affects each of the n_chains separately, and the stat_max affects each independently. This is what we want if using the simulations for inference (i.e. for estimation in the likelihood function) and is the existing setup.

The current documentation of ?simulate_chains says

"It generates independent transmission chains starting with a single case per chain, using a simple branching process model (See details for definition of "chains" and assumptions). Offspring for each chain are generated with an offspring distribution, and an optional generation time distribution function.

The individual chain simulations are controlled by customisable stopping criteria, including a threshold chain size or length, and a generation time cut off. The function also optionally accepts population related inputs such as the population size (defaults to Inf) and percentage of the population initially immune (defaults to 0)."

There is a bit more information on the <epichains> object here in relation to an <epicontacts> object that can probably surfaced a bit more:

An <epichains> object contains multiple independent chains with their own unique infectee ids, so this does not work out of the box with make_epicontacts() unless you use a subset chain.

Tagging @avallecam @joshwlambert @Degoot-AM for feedback on how this can be clarified further in the context of the current documentation. Are there aspects of this that can be clarified further/consolidated/etc? It might mean moving some explanations from the Getting Started Vignette to the function documentation or vice versa.