-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
full review pre-trial 03 #19
Conversation
Co-authored-by: Andree Valle Campos <[email protected]>
following suggestion in epiverse-trace/tutorials#119 (comment)
|
|
||
**Mathematical Modelling** : [Introduction to infectious disease models](https://doi.org/10.1038/s41592-020-0856-2), [state variables](../learners/reference.md#state), [model parameters](../learners/reference.md#parsode), [initial conditions](../learners/reference.md#initial), [ordinary differential equations](../learners/reference.md#ordinary). | ||
|
||
**Epidemic theory** : [Transmission](https://doi.org/10.1155/2011/267049), [Reproduction number](https://doi.org/10.3201/eid2501.171901). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Epidemic theory** : [Transmission](https://doi.org/10.1155/2011/267049), [Reproduction number](https://doi.org/10.3201/eid2501.171901). | |
**Epidemic theory** : [Transmission](https://doi.org/10.1155/2011/267049), [ and reproduction number](https://doi.org/10.3201/eid2501.171901). |
|
||
Learners should familiarise themselves with following concept dependencies before working through this tutorial: | ||
|
||
**Mathematical Modelling** : [Introduction to infectious disease models](https://doi.org/10.1038/s41592-020-0856-2), [state variables](../learners/reference.md#state), [model parameters](../learners/reference.md#parsode), [initial conditions](../learners/reference.md#initial), [ordinary differential equations](../learners/reference.md#ordinary). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Mathematical Modelling** : [Introduction to infectious disease models](https://doi.org/10.1038/s41592-020-0856-2), [state variables](../learners/reference.md#state), [model parameters](../learners/reference.md#parsode), [initial conditions](../learners/reference.md#initial), [ordinary differential equations](../learners/reference.md#ordinary). | |
**Mathematical Modelling** : [Introduction to infectious disease models](https://doi.org/10.1038/s41592-020-0856-2), [state variables](../learners/reference.md#state), [model parameters](../learners/reference.md#parsode), [initial conditions](../learners/reference.md#initial), [ and ordinary differential equations](../learners/reference.md#ordinary). |
## Simulating disease spread | ||
|
||
To simulate infectious disease trajectories, we must first select a mathematical model to use. | ||
There is a library of models to choose from in `epidemics`. Models in `epidemics` are prefixed with `model` and suffixed by the name of infection (e.g. Ebola) or a different identifier (e.g. default), and whether the model has a R or [C++](../learners/reference.md#cplusplus) code base. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good to link the reader with the documentation of {epidemics}
for further details.
library(dplyr) | ||
library(tidyverse) | ||
library(DiagrammeR) | ||
library(webshot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
library(webshot) | |
library(tracetheme) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, we use {webshot} to print the Diagrammer. See this to-keep
issue epiverse-trace/tutorials#98
color = intervention_type, | ||
linetype = intervention_type | ||
) + | ||
stat_summary( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stat_summary( | |
ggplot2::stat_summary( |
geom = "line", | ||
linewidth = 1 | ||
) + | ||
scale_y_continuous( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scale_y_continuous( | |
ggplot2::scale_y_continuous( |
scale_y_continuous( | ||
labels = scales::comma | ||
) + | ||
labs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
labs( | |
ggplot2::labs( |
episodes/modelling-interventions.Rmd
Outdated
x = "Simulation time (days)", | ||
y = "Individuals" | ||
) + | ||
theme_bw( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theme_bw( | |
ggplot2::theme_bw( |
@avallecam, I enjoyed reading this tutorials and suggest a number of changes to be made. Below are my general remarks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the term preinfectious is used across the episodes. Is there a preference to use preinfectious
over latent
period?
episodes/simulating-transmission.Rmd
Outdated
To create our population object, we call the function `population()` specifying a name, the contact matrix, the demography vector and the initial conditions. | ||
|
||
```{r population} | ||
uk_population <- population( | ||
name = "UK", | ||
contact_matrix = contact_matrix, | ||
demography_vector = demography_vector, | ||
initial_conditions = initial_conditions | ||
) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To create our population object, we call the function `population()` specifying a name, the contact matrix, the demography vector and the initial conditions. | |
```{r population} | |
uk_population <- population( | |
name = "UK", | |
contact_matrix = contact_matrix, | |
demography_vector = demography_vector, | |
initial_conditions = initial_conditions | |
) | |
``` | |
To create our population object, from the `{epidemics}` package, we call the function `population()`, specifying a name, the contact matrix, the demography vector and the initial conditions. | |
```{r population} | |
uk_population <- epidemics::population( | |
name = "UK", | |
contact_matrix = contact_matrix, | |
demography_vector = demography_vector, | |
initial_conditions = initial_conditions | |
) |
episodes/simulating-transmission.Rmd
Outdated
- `infectiousness_rate` = $\alpha$, | ||
- `recovery_rate` = $\gamma$, | ||
|
||
We will simulate a strain of influenza with pandemic potential with $R_0=1.46$, a preinfectious period of 3 days and infectious period of 7 days. Therefore our inputs will be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one is clearer? latent
period or preinfectious
period?
We will simulate a strain of influenza with pandemic potential with $R_0=1.46$, a preinfectious period of 3 days and infectious period of 7 days. Therefore our inputs will be: | |
We will simulate a strain of influenza with pandemic potential with $R_0=1.46$, a preinfectious period of 3 days and infectious period of 7 days. | |
- `preinfectious_period <- 3.0` | |
- `infectious_period <- 7.0` | |
- `basic_reproduction <- 1.46` | |
Therefore our inputs will be: |
episodes/simulating-transmission.Rmd
Outdated
- `transmission_rate = 1.46 / 7.0`, | ||
- `infectiousness_rate = 1.0 / 3.0`, | ||
- `recovery_rate = 1.0 / 7.0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consisteny with the callout box bellow
- `transmission_rate = 1.46 / 7.0`, | |
- `infectiousness_rate = 1.0 / 3.0`, | |
- `recovery_rate = 1.0 / 7.0`. | |
- `infectiousness_rate = 1/preinfectious_period`, | |
- `recovery_rate = 1/infectious_period`, | |
- `transmission_rate = basic_reproduction*recovery_rate`. |
Co-authored-by: Abdoelnaser M Degoot <[email protected]>
Co-authored-by: Abdoelnaser M Degoot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brief link edits
episodes/modelling-interventions.Rmd
Outdated
|
||
There are two intervention types for `model_default()`. Rate interventions on model parameters (`transmission_rate` $\beta$, `infectiousness_rate` $\sigma$ and `recovery_rate` $\gamma$) and contact matrix reductions `contacts`. | ||
|
||
To implement both contact and rate interventions in the same simulation they must be passed as a list e.g. `intervention = list(transmission_rate = mask_mandate, contacts = close_schools)`. But if there are multiple interventions that target contact rates, these must be passed as one `contacts` input. See the [vignette on modelling overlapping interventions](https://epiverse-trace.github.io/epidemics/articles/multiple_interventions.html) for more detail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To implement both contact and rate interventions in the same simulation they must be passed as a list e.g. `intervention = list(transmission_rate = mask_mandate, contacts = close_schools)`. But if there are multiple interventions that target contact rates, these must be passed as one `contacts` input. See the [vignette on modelling overlapping interventions](https://epiverse-trace.github.io/epidemics/articles/multiple_interventions.html) for more detail. | |
To implement both contact and rate interventions in the same simulation they must be passed as a list e.g. `intervention = list(transmission_rate = mask_mandate, contacts = close_schools)`. But if there are multiple interventions that target contact rates, these must be passed as one `contacts` input. See the [vignette on modelling overlapping interventions](https://epiverse-trace.github.io/epidemics/articles/modelling_multiple_interventions.html) for more detail. |
closing as redirected to main in #29 |
This PR aims to collect edit suggestions before trial 03.
Rendered website: https://epiverse-trace.github.io/tutorials-late/
We encourage in-line specific changes in the files changed tab (read GitHub how-to guide steps 5 to 7)