You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/superspreading-simulate.Rmd
+3-10Lines changed: 3 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -299,26 +299,19 @@ Now we are prepared to use the `simulate_chains()` function from `{epichains}` t
299
299
300
300
```{r,message=FALSE,warning=FALSE,eval=FALSE}
301
301
epichains::simulate_chains(
302
-
303
-
# simulation controls
304
302
n_chains = 1,
305
303
statistic = "size",
306
-
307
-
# offspring
308
304
offspring_dist = rnbinom,
309
305
mu = mers_offspring["mean"],
310
306
size = mers_offspring["dispersion"],
311
-
312
-
# generation
313
307
generation_time = function(x) generate(x = serial_interval, times = x)
314
-
315
308
)
316
309
```
317
310
318
311
`simulate_chains()` requires three sets of arguments as a minimum:
319
312
320
-
- simulation controls (`n_chains` and `statistic`),
321
-
- offspring distribution (`offspring_dist` and required distribution parameters), and
313
+
-**simulation controls** (`n_chains` and `statistic`),
314
+
-**offspring distribution** (`offspring_dist` and required distribution parameters), and
322
315
- generation time (`generation_time`).
323
316
324
317
In the lines above, we described how to specify the offspring distribution and generation time. The **simulation controls** include at least two arguments:
@@ -406,7 +399,7 @@ The argument `t0` defines the start time of each initial case per chain.
406
399
One example of using iteration is available in the `{epichains}` vignette on [Projecting infectious disease incidence: a COVID-19 example](https://epiverse-trace.github.io/epichains/articles/projecting_incidence.html). The aim is to simulate the importation of 13 cases during different moments in time.
0 commit comments