generated from carpentries/workbench-template-rmd
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-generated via {sandpaper} Source : 969a11b Branch : main Author : Amanda Minter <[email protected]> Time : 2023-10-31 15:37:33 +0000 Message : Late task tutorials (#34) * Created late task 1 episode file * Draft questions. objectives and section titles * Added notes on lesson content and provisional model equations * More lesson content to Model structures section * Outlines of remaining sections added * Edits to model structure section * Minor updates to model structures * Edits to introduction section * Add content to and reorder model parameters section * Added example plot to introduction * Minor edit to text * Add initial conditions section Added text and code to initial conditions section and updated initial plot to have same initial conditions * Reorder of sections * Updated text to introduction * Add generating trajectories section Added content to generating trajectories, which details specifying the initial conditions, demography vector and running the model * Added contact matrix section * Edits to tutorial content Content edits and reordering of some text * Changed naming of tutorial Updated name to simulating_transmission to better reflect tutorial content * Remove references from Rmd Citations have been changed to hyperlinks, so references no longer needed in Rmd header * Add file for `model_choices.Rmd` * Additions and edits to tutorial objectives * Update model_choices.Rmd Added tutorial content on all sections for Choosing a model * Update model_choices.Rmd Add 'Coming soon' to incomplete sections * Add uncertainty section Added section on how to account for uncertainty in R0 for influenza example * Fix typo * Add Comparing interventions tutorial * Remove default lesson * Update model_choices.Rmd Updated challenge outline to address #27 and to include Carpentries hint structure * Add glossary and add terms to `simulating_transmission` Glossary added in response to #24, additional transmission types added to `simulating_transmission` tutorial * Hide messages in output Fixes #26 for `simulating_transmission` and `compare_scenarios` * Update package and function notation Fixes #25 for current tutorials * Fix typo * Add function to view model names Fixes #23 * Add callout for exposed, infected, infectious Fixes #20 * Add instructor notes to tutorials Address #17 * Add concept dependencies to tutorials Addresses #19 * Add flow diagram of model equations Fixes #21 * Add definitions of outbreak and epidemic Added to `model_choices` tutorial and relevant definitions added to glossary * Add challenge to `model_choices` tutorial Fixes #14 * Remove reference to epidemic versus outbreak Keep tutorial content on the types of model used for epidemic versus outbreak analysis, but remove exact reference to epidemic and outbreak model types * Update intervention functions * Restructure tutorials Split `compare_interventions` into two tutorials : `modelling_interventions` and `compare_interventions` * Update outline of `compare_interventions` * Fix typo in ODE equations * Add section on mask wearing and vaccination Updates to school closure section as well as added sections on mask wearing and vaccination * typo and minor rephrase * Add updated ebola model definition * Update filenames Updating filenames to be consistent with the default naming of episodes from `create_episode` * Add to glossary terms Incubation period and latent period * Updates to parameter values used in Covid-19 example * Add greek letters to flow diagrams Fixes #29 * Remove reference to model library * Add flow diagrams to challenged answer * Add section on Vacamole model description * Add pak installation to setup chunks * Revert "Remove default lesson" This reverts commit 6eadba4. * Update config.yaml * Update renv.lock * Revert "Revert "Remove default lesson"" This reverts commit 8089e4c. * Revert "Update config.yaml" This reverts commit 4f2a8e1. * Update config.yaml * Fix typos * Fix typos * Style code * Improve figures * Remove {DiagrammeR} error message display * Move contact matrix definition * Colour nodes of vaccination classes * Fix typo * Rephrase documentation description * Update episodes/model-choices.Rmd Co-authored-by: Pratik Gupte <[email protected]> * Change title * Fix typo * Update title `model_choices.Rmd` * Fix typo * Add section on outcomes of interest * Update uncertainty section Updated code to run multiple model simulations to be the same as vignette and replaced {data.table} functions with `stat_summary()` stay within Tidyverse * update axis labels size * Add baseline trajectories to intervention figures * Minor rephrasing * Add details to effect of mask wearing calculation * Add resource links to concept dependencies * Add further detail to glossary definitions --------- Co-authored-by: rozeggo <[email protected]> Co-authored-by: Andree Valle Campos <[email protected]> Co-authored-by: Pratik Gupte <[email protected]>
- Loading branch information
1 parent
1e7cb1d
commit 237d7bb
Showing
20 changed files
with
1,042 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
title: 'Comparing public health outcomes of interventions' | ||
teaching: 45 # teaching time in minutes | ||
exercises: 30 # exercise time in minutes | ||
|
||
--- | ||
|
||
|
||
|
||
:::::::::::::::::::::::::::::::::::::: questions | ||
|
||
- How can I quantify the effect of an intervention? | ||
|
||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
::::::::::::::::::::::::::::::::::::: objectives | ||
|
||
- Understand how to compare intervention scenarios | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
::::::::::::::::::::::::::::::::::::: prereq | ||
|
||
## Prerequisites | ||
+ Complete tutorials 'Simulating transmission' and 'Modelling interventions' | ||
|
||
This tutorial has the following concept dependencies: | ||
|
||
**Outbreak response** : [Intervention types](https://www.cdc.gov/nonpharmaceutical-interventions/). | ||
::::::::::::::::::::::::::::::::: | ||
|
||
|
||
## Introduction | ||
|
||
In this tutorial we will compare intervention scenarios against each other. To quantify the effect of the intervention we need to compare our intervention scenario to a counter factual scenario. The *counter factual* is the scenario in which nothing changes, often referred to as the 'do nothing' scenario. The counter factual scenario may include no interventions, or if we are investigating the potential impact of an additional intervention in the later stages of an outbreak there may be existing interventions in place. | ||
|
||
We must also decide what our *outcome of interest* is to make comparisons between intervention and counter factual scenarios. The outcome of interest can be: | ||
|
||
+ a model outcome, e.g. number of infections or hospitalisations, | ||
+ a metric such as the epidemic peak time or size, | ||
+ a measure that uses the model outcomes such as QALY/DALYs. | ||
|
||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor | ||
|
||
In this tutorial we introduce the concept of the counter factual and how to compare scenarios (counter factual versus intervention) against each other. | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
## Vacamole model | ||
|
||
The Vacamole model is a deterministic model based on a system of ODEs in [Ainslie et al. 2022]( https://doi.org/10.2807/1560-7917.ES.2022.27.44.2101090). The model consists of 11 compartments, individuals are classed as one of the following: | ||
|
||
+ susceptible, $S$, | ||
+ partial vaccination ($V_1$), fully vaccination ($V_2$), | ||
+ exposed, $E$ and exposed while vaccinated, $E_V$, | ||
+ infectious, $I$ and infectious while vaccinated, $I_V$, | ||
+ hospitalised, $H$ and hospitalised while vaccinated, $H_V$, | ||
+ dead, $D$, | ||
+ recovered, $R$. | ||
|
||
The diagram below describes the flow of individuals through the different compartments. | ||
|
||
<img src="fig/compare-interventions-rendered-unnamed-chunk-1-1.png" style="display: block; margin: auto;" /> | ||
|
||
See `?epidemics::epidemic_vacamole` for detail on how to run the model. | ||
|
||
## Comparing scenarios | ||
|
||
*Coming soon* | ||
|
||
## Challenge | ||
|
||
*Coming soon* | ||
|
||
<!-- ::::::::::::::::::::::::::::::::::::: challenge --> | ||
|
||
<!-- ## The effect of vaccination on COVID-19 hospitalisations --> | ||
|
||
|
||
|
||
<!-- ::::::::::::::::: hint --> | ||
|
||
<!-- ### HINT --> | ||
|
||
|
||
<!-- :::::::::::::::::::::: --> | ||
|
||
|
||
<!-- ::::::::::::::::: solution --> | ||
|
||
<!-- ### SOLUTION --> | ||
|
||
|
||
|
||
|
||
|
||
<!-- ::::::::::::::::::::::::::: --> | ||
|
||
|
||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::: --> | ||
|
||
|
||
|
||
::::::::::::::::::::::::::::::::::::: keypoints | ||
|
||
- The counter factual scenario must be defined to make comparisons | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
"file" "checksum" "built" "date" | ||
"CODE_OF_CONDUCT.md" "549f00b0992a7743c2bc16ea6ce3db57" "site/built/CODE_OF_CONDUCT.md" "2023-10-26" | ||
"LICENSE.md" "14377518ee654005a18cf28549eb30e3" "site/built/LICENSE.md" "2023-10-26" | ||
"config.yaml" "80a78c3157b1d5386b1f3d4b31af8562" "site/built/config.yaml" "2023-10-26" | ||
"index.md" "d45b8843b661f7f6d628b6b57447b6c5" "site/built/index.md" "2023-10-26" | ||
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2023-10-26" | ||
"episodes/template.Rmd" "92e77eb5db496386f0615931ea7ab6dc" "site/built/template.md" "2023-10-26" | ||
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2023-10-26" | ||
"learners/reference.md" "0ef3f430a2e376da0ed761e0a6175755" "site/built/reference.md" "2023-10-26" | ||
"learners/setup.md" "b3c6bfa13fd687f926bb1a3e772a2516" "site/built/setup.md" "2023-10-26" | ||
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-10-26" | ||
"renv/profiles/lesson-requirements/renv.lock" "041a36f31a7ff43f4ba9fdfbb679a96e" "site/built/renv.lock" "2023-10-26" | ||
"CODE_OF_CONDUCT.md" "549f00b0992a7743c2bc16ea6ce3db57" "site/built/CODE_OF_CONDUCT.md" "2023-10-31" | ||
"LICENSE.md" "14377518ee654005a18cf28549eb30e3" "site/built/LICENSE.md" "2023-10-31" | ||
"config.yaml" "ba8182fefb4b3a156058872157fb2d7d" "site/built/config.yaml" "2023-10-31" | ||
"index.md" "d45b8843b661f7f6d628b6b57447b6c5" "site/built/index.md" "2023-10-31" | ||
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2023-10-31" | ||
"episodes/simulating-transmission.Rmd" "9c915400856003c134ca46edd1c52d87" "site/built/simulating-transmission.md" "2023-10-31" | ||
"episodes/model-choices.Rmd" "113c11e0dccc812744f685df84733fdf" "site/built/model-choices.md" "2023-10-31" | ||
"episodes/modelling-interventions.Rmd" "01eff78117bf3f53015154ca9b961651" "site/built/modelling-interventions.md" "2023-10-31" | ||
"episodes/compare-interventions.Rmd" "d594dc0466f735d14ccbcc7b2a9d56ef" "site/built/compare-interventions.md" "2023-10-31" | ||
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2023-10-31" | ||
"learners/reference.md" "451e0fd931938d38cf92a313192c1cdb" "site/built/reference.md" "2023-10-31" | ||
"learners/setup.md" "b3c6bfa13fd687f926bb1a3e772a2516" "site/built/setup.md" "2023-10-31" | ||
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-10-31" | ||
"renv/profiles/lesson-requirements/renv.lock" "da153090a3bb8fe62bcd300c69550054" "site/built/renv.lock" "2023-10-31" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
--- | ||
title: 'Choosing an appropriate model' | ||
teaching: 10 # teaching time in minutes | ||
exercises: 20 # exercise time in minutes | ||
|
||
--- | ||
|
||
|
||
|
||
|
||
:::::::::::::::::::::::::::::::::::::: questions | ||
|
||
- How do I choose a model for my task? | ||
|
||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
::::::::::::::::::::::::::::::::::::: objectives | ||
|
||
- Learn how to access the model library in `epidemics` | ||
- Understand the model requirements for a question | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
::::::::::::::::::::::::::::::::::::: prereq | ||
|
||
## Prerequisites | ||
+ Complete tutorial 'Simulating transmission' | ||
::::::::::::::::::::::::::::::::: | ||
|
||
|
||
## Introduction | ||
|
||
Using mathematical models in outbreak analysis does not necessarily require developing a new model. There are existing models for different infections, interventions and transmission patterns which can be used to answer new questions. In this tutorial, we will learn how to choose an existing model to generate predictions for a given scenario. | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: instructor | ||
|
||
The focus of this tutorial is understanding existing models to decide if they are appropriate for a defined question. | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
### Choosing a model | ||
|
||
When deciding whether an existing model can be used, we must consider : | ||
|
||
+ What is the infection/disease of interest? | ||
|
||
A model may already exist for your study disease, or there may be a model for an infection that has the same transmission pathways and epidemiological features that can be used. | ||
|
||
+ Do we need a deterministic or stochastic model? | ||
|
||
Model structures differ for whether the disease has pandemic potential or not. When predicted numbers of infection are small, stochastic variation in output can have an effect on whether an outbreak takes off or not. Outbreaks are usually smaller in magnitude than epidemics, so its often appropriate to use a stochastic model to characterise the uncertainty in the early stages of the outbreak. Epidemics are larger in magnitude than outbreaks and so a deterministic model is suitable as we have less interest in the stochastic variation in output. | ||
|
||
+ What is the outcome of interest? | ||
|
||
The outcome of interest can be a feature of a mathematical model. It may be that you are interested in the predicted numbers of infection through time, or in a specific outcome such as hospitalisations or cases of severe disease. | ||
|
||
+ Will any interventions be modelled? | ||
|
||
Finally, interventions such as vaccination may be of interest. A model may or may not have the capability to include the impact of different interventions on different time scales (continuous time or at discrete time points). We will discuss interventions in detail in the next tutorial. | ||
|
||
### Available models | ||
|
||
The R package `epidemics` contains functions to run existing models. | ||
For details on the models that are available, see the package [vignettes](https://epiverse-trace.github.io/epidemics/articles). To learn how to run the models in R, read the documentation using `?epidemics::epidemic_ebola`. Remember to use the 'Check model equation' questions to help your understanding of an existing model. | ||
|
||
::::::::::::::::::::::::::::::::::::: checklist | ||
### Check model equations | ||
|
||
- How is transmission modelled? e.g. direct or indirect, airborne or vector-borne | ||
- What interventions are modelled? | ||
- What state variables are there and how do they relate to assumptions about infection? | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
|
||
|
||
## Challenge | ||
|
||
::::::::::::::::::::::::::::::::::::: challenge | ||
|
||
## What model? | ||
|
||
You have been asked to explore the variation in numbers of infected individuals in the early stages of an Ebola outbreak. | ||
|
||
Which of the following models would be an appropriate choice for this task: | ||
|
||
+ `epidemic_default` | ||
|
||
+ `epidemic_ebola` | ||
|
||
::::::::::::::::: hint | ||
|
||
### HINT | ||
|
||
Consider the following questions: | ||
|
||
::::::::::::::::::::::::::::::::::::: checklist | ||
|
||
+ What is the infection/disease of interest? | ||
+ Do we need a deterministic or stochastic model? | ||
+ What is the outcome of interest? | ||
+ Will any interventions be modelled? | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
|
||
:::::::::::::::::::::: | ||
|
||
|
||
::::::::::::::::: solution | ||
|
||
### SOLUTION | ||
|
||
|
||
+ What is the infection/disease of interest? **Ebola** | ||
+ Do we need a deterministic or stochastic model? **A stochastic model would allow us to explore variation in the early stages of the outbreak** | ||
+ What is the outcome of interest? **Number of infections** | ||
+ Will any interventions be modelled? **No** | ||
|
||
#### `epidemic_default` | ||
|
||
A deterministic SEIR model with age specific direct transmission. | ||
|
||
<img src="fig/model-choices-rendered-diagram-1.png" style="display: block; margin: auto;" /> | ||
|
||
|
||
The model is capable of predicting an Ebola type outbreak, but as the model is deterministic, we are not able to explore stochastic variation in the early stages of the outbreak. | ||
|
||
|
||
#### `epidemic_ebola` | ||
|
||
A stochastic SEIHFR (Susceptible, Exposed, Infectious, Hospitalised, Funeral, Removed) model that was developed specifically for infection with Ebola. | ||
|
||
<img src="fig/model-choices-rendered-unnamed-chunk-1-1.png" style="display: block; margin: auto;" /> | ||
|
||
|
||
|
||
As this model is stochastic, it is the most appropriate choice to explore how variation in numbers of infected individuals in the early stages of an Ebola outbreak. | ||
|
||
|
||
::::::::::::::::::::::::::: | ||
|
||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
|
||
|
||
::::::::::::::::::::::::::::::::::::: keypoints | ||
|
||
- Existing models can be used for new questions | ||
- Check that a model has appropriate assumptions about transmission, outbreak potential, outcomes and interventions | ||
:::::::::::::::::::::::::::::::::::::::::::::::: |
Oops, something went wrong.