Skip to content
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

Late task tutorials #34

Merged
merged 90 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2b87659
Created late task 1 episode file
amanda-minter Aug 28, 2023
ec99476
Draft questions. objectives and section titles
amanda-minter Aug 28, 2023
18eee59
Added notes on lesson content and provisional model equations
amanda-minter Aug 28, 2023
e0c569e
More lesson content to Model structures section
amanda-minter Aug 28, 2023
745c9d0
Outlines of remaining sections added
amanda-minter Aug 29, 2023
9c2981f
Edits to model structure section
amanda-minter Aug 29, 2023
dd5b69a
Minor updates to model structures
amanda-minter Aug 29, 2023
a8ae924
Edits to introduction section
amanda-minter Aug 29, 2023
89bffd7
Add content to and reorder model parameters section
amanda-minter Aug 29, 2023
8e4605b
Added example plot to introduction
amanda-minter Aug 29, 2023
095e2ef
Minor edit to text
amanda-minter Aug 31, 2023
cc1b9da
Add initial conditions section
amanda-minter Sep 4, 2023
b8e50f1
Reorder of sections
amanda-minter Sep 4, 2023
c71e2e0
Updated text to introduction
amanda-minter Sep 4, 2023
f87db2f
Add generating trajectories section
amanda-minter Sep 4, 2023
3b3afd1
Added contact matrix section
amanda-minter Sep 5, 2023
4a894b6
Edits to tutorial content
amanda-minter Sep 7, 2023
d131cb4
Changed naming of tutorial
amanda-minter Sep 7, 2023
102f50d
Remove references from Rmd
amanda-minter Sep 7, 2023
7e46cdd
Add file for `model_choices.Rmd`
amanda-minter Sep 7, 2023
daa2599
Additions and edits to tutorial objectives
amanda-minter Sep 11, 2023
0ea5a62
Update model_choices.Rmd
amanda-minter Sep 12, 2023
34dbd6f
Update model_choices.Rmd
amanda-minter Sep 14, 2023
aa755eb
Add uncertainty section
amanda-minter Sep 18, 2023
b43c56f
Fix typo
amanda-minter Sep 18, 2023
2f4447c
Add Comparing interventions tutorial
amanda-minter Sep 18, 2023
6eadba4
Remove default lesson
amanda-minter Sep 18, 2023
09a7dce
Update model_choices.Rmd
amanda-minter Sep 21, 2023
d68418b
Add glossary and add terms to `simulating_transmission`
amanda-minter Sep 21, 2023
6b6be6e
Hide messages in output
amanda-minter Sep 21, 2023
519647e
Update package and function notation
amanda-minter Sep 21, 2023
9fca2cc
Fix typo
amanda-minter Sep 21, 2023
1eb97a0
Add function to view model names
amanda-minter Sep 21, 2023
9996cb7
Add callout for exposed, infected, infectious
amanda-minter Sep 21, 2023
d9486b0
Add instructor notes to tutorials
amanda-minter Sep 21, 2023
df2babb
Add concept dependencies to tutorials
amanda-minter Sep 21, 2023
616daa3
Add flow diagram of model equations
amanda-minter Sep 25, 2023
188e3c9
Add definitions of outbreak and epidemic
amanda-minter Sep 25, 2023
d311cbc
Add challenge to `model_choices` tutorial
amanda-minter Sep 25, 2023
8b48c53
Remove reference to epidemic versus outbreak
amanda-minter Sep 25, 2023
0885bbc
Update intervention functions
amanda-minter Sep 26, 2023
94ab127
Restructure tutorials
amanda-minter Sep 26, 2023
9b6c61a
Update outline of `compare_interventions`
amanda-minter Sep 28, 2023
725d39a
Fix typo in ODE equations
amanda-minter Sep 28, 2023
ae5a2fe
Add section on mask wearing and vaccination
amanda-minter Sep 28, 2023
51a8a71
typo and minor rephrase
rozeggo Oct 5, 2023
a53d94a
Add updated ebola model definition
amanda-minter Oct 9, 2023
7edd058
Update filenames
amanda-minter Oct 9, 2023
70123d0
Add to glossary terms
amanda-minter Oct 9, 2023
b483e11
Updates to parameter values used in Covid-19 example
amanda-minter Oct 9, 2023
6f43ba7
Add greek letters to flow diagrams
amanda-minter Oct 16, 2023
e73f8c1
Remove reference to model library
amanda-minter Oct 19, 2023
cece258
Add flow diagrams to challenged answer
amanda-minter Oct 19, 2023
40724f4
Add section on Vacamole model description
amanda-minter Oct 19, 2023
f016ed8
Add pak installation to setup chunks
amanda-minter Oct 23, 2023
8089e4c
Revert "Remove default lesson"
amanda-minter Oct 23, 2023
4f2a8e1
Update config.yaml
amanda-minter Oct 23, 2023
b39c432
Merge branch 'main' into late_task_1
amanda-minter Oct 23, 2023
7e39c3f
Update renv.lock
amanda-minter Oct 23, 2023
cce2ecd
Revert "Revert "Remove default lesson""
amanda-minter Oct 23, 2023
a8704df
Revert "Update config.yaml"
amanda-minter Oct 23, 2023
0e8c090
Merge branch 'main' into late_task_1
amanda-minter Oct 23, 2023
0171687
Merge branch 'main' into late_task_1
avallecam Oct 24, 2023
16c6de7
Update config.yaml
amanda-minter Oct 26, 2023
f8c3fb1
Merge branch 'late_task_1' of https://github.com/epiverse-trace/tutor…
amanda-minter Oct 26, 2023
14495a7
Merge branch 'main' into late_task_1
avallecam Oct 26, 2023
90081ff
Fix typos
amanda-minter Oct 30, 2023
161fd23
Fix typos
amanda-minter Oct 30, 2023
1c36ed5
Style code
amanda-minter Oct 30, 2023
6a3a17d
Improve figures
amanda-minter Oct 30, 2023
dd16d15
Remove {DiagrammeR} error message display
amanda-minter Oct 30, 2023
ebbb662
Move contact matrix definition
amanda-minter Oct 30, 2023
16719b8
Colour nodes of vaccination classes
amanda-minter Oct 30, 2023
37cbbcd
Fix typo
amanda-minter Oct 30, 2023
cd4857f
Rephrase documentation description
amanda-minter Oct 30, 2023
40103a9
Update episodes/model-choices.Rmd
amanda-minter Oct 30, 2023
d81fc2b
Change title
amanda-minter Oct 30, 2023
9b9559f
Fix typo
amanda-minter Oct 30, 2023
512acbe
Update title `model_choices.Rmd`
amanda-minter Oct 30, 2023
fb73435
Fix typo
amanda-minter Oct 30, 2023
c7dec14
Add section on outcomes of interest
amanda-minter Oct 30, 2023
8b504b8
Merge branch 'main' into late_task_1
avallecam Oct 30, 2023
e2c2aeb
Update uncertainty section
amanda-minter Oct 30, 2023
5319cc0
update axis labels size
amanda-minter Oct 30, 2023
f839a5b
Add baseline trajectories to intervention figures
amanda-minter Oct 30, 2023
d66aa0f
Minor rephrasing
amanda-minter Oct 30, 2023
4142d86
Add details to effect of mask wearing calculation
amanda-minter Oct 30, 2023
d9457b8
Add resource links to concept dependencies
amanda-minter Oct 30, 2023
c4adebd
Merge branch 'main' into late_task_1
avallecam Oct 30, 2023
b057f86
Add further detail to glossary definitions
amanda-minter Oct 31, 2023
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
5 changes: 5 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ contact: '[email protected]' #FIXME

# Order of episodes in your lesson
episodes:
- simulating-transmission.Rmd
- model-choices.Rmd
- modelling-interventions.Rmd
- compare-interventions.Rmd

# Information for Learners
learners:
Expand All @@ -74,4 +78,5 @@ profiles:
# This space below is where custom yaml items (e.g. pinning
# sandpaper and varnish versions) should live

sandpaper: 'carpentries/sandpaper#533'

167 changes: 167 additions & 0 deletions episodes/compare-interventions.Rmd
amanda-minter marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: 'Comparing public health outcomes of interventions'
teaching: 45 # teaching time in minutes
exercises: 30 # exercise time in minutes

---

```{r setup, echo= FALSE, message = FALSE, warning = FALSE}
require(ggplot2)
require(pak)
pak::pak("epiverse-trace/epidemics")
library(epidemics)
```

:::::::::::::::::::::::::::::::::::::: 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.
amanda-minter marked this conversation as resolved.
Show resolved Hide resolved

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.

```{r, echo = FALSE, message = FALSE}
DiagrammeR::grViz("digraph{
# graph statement
#################
graph [layout = dot,
rankdir = LR,
overlap = true,
fontsize = 10]

# nodes
#######
node [shape = square,
fixedsize = true
width = 1.3]

S
E
Ev [label = 'E@_{V}', style = filled, fillcolour = 'gray']
I
Iv [label = 'I@_{V}', style = filled, fillcolour = 'gray']
H
Hv [label = 'H@_{V}', style = filled, fillcolour = 'gray']
D
R
V1 [label = 'V@_{1}', style = filled, fillcolour = 'gray']
V2 [label = 'V@_{2}', style = filled, fillcolour = 'gray']


# edges
#######
S -> E [label = ' infection (β) ']
S -> V1 [label = ' vaccination (ν1)']
V1 -> E [label = ' infection (β)']
V1 -> V2 [label = ' vaccination\n(second dose) (ν2)']
V2 -> Ev [label = ' infection (β)']
Ev -> Iv [label = ' onset of \ninfectiousness (α) ']
E -> I [label = ' onset of \ninfectiousness (α) ']
I -> H [label = ' hospitalisation (η)']
Iv -> Hv [label = ' hospitalisation (η@_{V})']
I -> D [label = ' death (ω)']
I -> R [label = ' recovery (γ)']
Iv -> D [label = ' death (ω@_{V})']
Iv -> R [label = ' recovery (γ)']
Hv -> D [label = ' death (ω@_{V})']
Hv -> R [label = ' recovery (γ)']
H -> D [label = ' death (ω)']
H -> R [label = ' recovery (γ)']

subgraph {
rank = same; S; V1;V2;
}
}")
```

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

::::::::::::::::::::::::::::::::::::::::::::::::
Loading