Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions episodes/modelling-interventions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,22 @@ To get an age-stratified plot, keep the default `by_group = TRUE` and then add `

:::::::::::::::::::::

:::: checklist

### How to write each intervention type

In `{epidemics}` different interventions require different functions, arguments, and R class objects: integers, matrices, or lists.

| Intervention | Function | `type` | `reduction` or `nu` | Argument in `model_default()` |
|---|---|---|---|---|
| Reduce rate | intervention() | "rate" | reduction = 0.163 | intervention = **list**(transmission_rate = `<intervention>`) |
| Reduce contacts | intervention() | "contacts" | reduction = **matrix**(c(0.5, 0.01, 0.01)) | intervention = **list**(contacts = `<intervention>`) |
| Vaccination | **vaccination()** | --- | nu = **matrix**(c(0.01, 0.01, 0.01)) | vaccination = `<intervention>` |

The `list()` class object helps accepting multiple consecutive or overlapping interventions in the same simulation.

::::

:::::::::::::::::::::: instructor

Stop the livecoding.
Expand Down
3 changes: 3 additions & 0 deletions episodes/simulating-transmission.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ transmission_rate <- basic_reproduction / infectious_period
```

::::::::::::::::::::::::::::::::::::: callout

### The basic reproduction number $R_0$

The basic reproduction number, $R_0$, for the SEIR model is:

$$ R_0 = \frac{\beta}{\gamma}.$$
Expand All @@ -370,6 +372,7 @@ Therefore, we can rewrite transmission rate $\beta$ as:

$$ \beta = R_0 \gamma.$$

If you need a recap, read about the ratio $\beta/\gamma$ in this two-page paper by [Bjørnstad et al., 2020](https://www.nature.com/articles/s41592-020-0822-z).

::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down
Loading