Skip to content

Commit 750a3b6

Browse files
committed
markdown source builds
Auto-generated via `{sandpaper}` Source : c9ccb33 Branch : main Author : Andree Valle Campos <avallecam@gmail.com> Time : 2024-11-21 08:43:23 +0000 Message : add pending edit suggestions to commit from review #56 (comment)
1 parent 078e50c commit 750a3b6

File tree

5 files changed

+1951
-44
lines changed

5 files changed

+1951
-44
lines changed

BF_measles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ the SEIR model with interventions using the `{epidemics}` package.
616616

617617
## Contacts Reduction Model
618618

619-
Reducing contact by a certain percentage, say (20%), impacts the
620-
transmission rate $( \beta )$. This reduction can be achieved through
619+
Reducing contact by a certain percentage impacts the
620+
contact rate. This reduction can be achieved through
621621
measures such as quarantine, limiting public gatherings, and regular
622622
screening in healthcare settings. To include such interventions in the
623623
baseline SEIR model, the `{epidemics}` package provides an object called

config.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#------------------------------------------------------------
2+
# Values for this lesson.
3+
#------------------------------------------------------------
4+
5+
# Which carpentry is this (swc, dc, lc, or cp)?
6+
# swc: Software Carpentry
7+
# dc: Data Carpentry
8+
# lc: Library Carpentry
9+
# cp: Carpentries (to use for instructor training for instance)
10+
# incubator: The Carpentries Incubator
11+
carpentry: 'epiverse-trace'
12+
13+
# Overall title for pages.
14+
title: 'Scenario modelling for outbreak analytics with R'
15+
16+
# Date the lesson was created (YYYY-MM-DD, this is empty by default)
17+
created:
18+
19+
# Comma-separated list of keywords for the lesson
20+
keywords: 'epidemic models, interventions'
21+
22+
# Life cycle stage of the lesson
23+
# possible values: pre-alpha, alpha, beta, stable
24+
life_cycle: 'pre-alpha'
25+
26+
# License of the lesson materials (recommended CC-BY 4.0)
27+
license: 'CC-BY 4.0'
28+
29+
# Link to the source repository for this lesson
30+
source: 'https://github.com/epiverse-trace/tutorials-late'
31+
32+
# Default branch of your lesson
33+
branch: 'main'
34+
35+
# Who to contact if there are any issues
36+
contact: 'andree.valle-campos@lshtm.ac.uk'
37+
38+
# Navigation ------------------------------------------------
39+
#
40+
# Use the following menu items to specify the order of
41+
# individual pages in each dropdown section. Leave blank to
42+
# include all pages in the folder.
43+
#
44+
# Example -------------
45+
#
46+
# episodes:
47+
# - introduction.md
48+
# - first-steps.md
49+
#
50+
# learners:
51+
# - setup.md
52+
#
53+
# instructors:
54+
# - instructor-notes.md
55+
#
56+
# profiles:
57+
# - one-learner.md
58+
# - another-learner.md
59+
60+
# Order of episodes in your lesson
61+
episodes:
62+
- simulating-transmission.Rmd
63+
- model-choices.Rmd
64+
- modelling-interventions.Rmd
65+
- compare-interventions.Rmd
66+
67+
# Information for Learners
68+
learners:
69+
70+
# Information for Instructors
71+
instructors:
72+
73+
# Learner Profiles
74+
profiles:
75+
76+
# Customisation ---------------------------------------------
77+
#
78+
# This space below is where custom yaml items (e.g. pinning
79+
# sandpaper and varnish versions) should live
80+
81+
varnish: epiverse-trace/varnish@epiversetheme
82+
# this is carpentries/sandpaper#533 in our fork so we can keep it up to date with main
83+
sandpaper: epiverse-trace/sandpaper@patch-renv-github-bug

files/hands-on.tex

Lines changed: 117 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
\pagestyle{fancy}
66
\fancyfoot[R]{\thepage} % Centered page number in footer
77
\fancyfoot[C]{\textbf{License:} CC-BY.\textbf{Copyright:} Andree \& Degoot, 2024 }
8+
\usepackage{booktabs} % to render table
89
\usepackage{tikz}
910
\usetikzlibrary{arrows.meta, positioning}
1011
\usepackage{amsmath}
@@ -14,10 +15,10 @@
1415
\maketitle
1516

1617
\section{Introduction}
17-
This practical aims to assess your understanding of the fundamental
18-
principles of mathematical modeling while guiding you in constructing models using
18+
This practical aims to assess your understanding of the fundamental
19+
principles of mathematical modeling while guiding you in constructing models using
1920
a simple SEIR framework for infectious disease outbreaks.\\
20-
21+
2122
\textbf{Note: Please fill in the blanks.}
2223

2324
\section{SEIR Model}
@@ -26,95 +27,100 @@ \section{SEIR Model}
2627

2728
\begin{itemize}
2829
\item \( S \) stands for \underline{\hspace{2cm}}, meaning \underline{\hspace{6cm}}.
29-
The parameter that explains the transition from (\( S \)) compartment
30+
The parameter that explains the transition from (\( S \)) compartment
3031
to (\( E \)) compartment is \underline{\hspace{6cm}}.
31-
\item \(E\) stands for \underline{\hspace{2cm}}, meaning that it can
32-
\underline{\hspace{4cm}}.
33-
32+
\item \(E\) stands for \underline{\hspace{2cm}}, meaning that it can
33+
\underline{\hspace{4cm}}.
34+
3435
The rate that explains the transition from (\( E \)) to (\( I \)) is the rate of \underline{\hspace{1cm}}.
35-
36-
\item \( I \) stands for \underline{\hspace{2cm}}, meaning that it can
37-
\underline{\hspace{3cm}}.
38-
The rate that explains the transition from (\( I \)) to (\( R \)) is the rate of \underline{\hspace{6cm}}.
39-
36+
37+
\item \( I \) stands for \underline{\hspace{2cm}}, meaning that it can
38+
\underline{\hspace{4cm}}.
39+
The rate that explains the transition from (\( I \)) to (\( R \)) is the rate of \underline{\hspace{1cm}}.
40+
4041
\item \( R \) stands for \underline{\hspace{3cm}}. This compartment includes those who have ceased to be infectious and acquire immunity against infection, regardless of the clinical course.
4142
\end{itemize}
4243

4344
\section{\( R_0 \)}
44-
\( R_0 \) helps project the potential
45+
\( R_0 \) helps project the potential
4546
size of an epidemic and calculate the herd immunity threshold.
46-
It is defined as the average number of \underline{\hspace{2cm}} secondary cases
47-
generated from a primary case in a completely
48-
\underline{\hspace{3cm}} population.
47+
It is defined as the average number of \underline{\hspace{2cm}} secondary cases
48+
generated from a primary case in a completely
49+
\underline{\hspace{3cm}} population.
4950

5051
\section{\( R_t \)}
51-
\( R_t \)
52-
helps monitor the progress of the epidemic
53-
When the population is no longer \underline{\hspace{2cm}}, the instantaneous
54-
reproduction number \( R_t \) is used. This is defined as the average number
55-
of s\underline{\hspace{2cm}} in a population composed of
52+
\( R_t \)
53+
helps monitor the progress of the epidemic.
54+
When the population is no longer \underline{\hspace{2cm}}, the instantaneous
55+
reproduction number \( R_t \) is used. This is defined as the average number
56+
of s\underline{\hspace{2cm}} in a population composed of
5657
\underline{\hspace{2cm}} and non-\underline{\hspace{2cm}} individuals at time \( t \).
5758

5859
\section{A Diagram for Measles outbreak}
5960

60-
Below is a typical SEIR model with demography (births and deaths). This is a simple
61+
Below is a typical SEIR model with demography (births and deaths). This is a simple
6162
model applicable to person-to-person infections in a homogeneously mixing population.
62-
Please carefully observe the model and examine the interactions with the equations
63+
Please carefully observe the model and examine the interactions with the equations
6364
in section \ref{eqs}. Use color codes or arrows to relate the diagram to the equations.
6465

6566

6667
\begin{center}
6768
\begin{tikzpicture}[
68-
node distance=2cm,
69+
node distance=2cm,
6970
every node/.style={fill=blue!10, draw, minimum size=1cm, text centered},
7071
arrow/.style={-Stealth, thick}
7172
]
72-
73+
7374
% Nodes
7475
\node [circle, fill=green!75](S) {$S$};
7576
\node [circle, fill=orange!75](E) [right=of S] { $E$};
7677
\node [circle, fill=red!75](I) [right=of E] {$I$};
7778
\node [circle, fill=blue!75](R) [right=of I] {$R$};
78-
79+
7980
% Arrows for transitions
8081
\draw[arrow] (S) -- node[above, draw=none] {$\beta S \frac{I}{N}$} (E);
81-
\draw[arrow] (E) -- node[above, draw=none] {$\sigma E$} (I);
82+
\draw[arrow] (E) -- node[above, draw=none] {$\alpha E$} (I);
8283
\draw[arrow] (I) -- node[above, draw=none] {$\gamma I$} (R);
83-
84+
8485
% Natural birth and death rates
8586
\draw[arrow] (-2,0.0) -- node[above, draw=none] {$\Lambda N$} (S);
8687
\draw[arrow] (S) -- +(0,-1.2) node[below, draw=none] {$\mu$};
8788
\draw[arrow] (E) -- +(0,-1.2) node[below, draw=none] {$\mu$ };
8889
\draw[arrow] (I) -- +(0,-1.2) node[below, draw=none] {$\mu$ };
8990
\draw[arrow] (R) -- +(0,-1.2) node[below, draw=none] {$\mu$};
90-
91+
9192
\end{tikzpicture}
9293
\end{center}
9394

9495
Where:
9596
\begin{itemize}
9697
\item \( \beta \): Transmission rate
97-
\item \( \sigma \): Rate of progression from exposed to infectious
98+
\item \( \alpha \): Infectiousness rate, or rate of progression from exposed to infectious
9899
\item \( \gamma \): Recovery rate
99100
\item \( \mu \): Death rate (natural death rate)
100101
\item \( N \): Total population size, \( N = S + E + I + R \).
101102
\end{itemize}
102103

103-
The parameter $\beta$ is derived from the multiplication of $p$
104-
and $c$, where $p$ is the probability of transmission during contact, and $c$
105-
is the contact rate, defined as the average number of contacts per unit of time.\\
104+
The parameter $\beta$, defined as the average rate at which infectious individuals can infect susceptibles,
105+
is derived from the multiplication of $p$
106+
and $c$, where $p$ is the probability of transmission during contact, and $c$
107+
is the contact rate, defined as the average number of contacts per unit of time.\\
108+
109+
If a transmission rate $\beta$ equals 3, it means
110+
each infectious individual causes 3 new infections per day
111+
in a fully susceptible population.\\
106112

107113
Model parameters are often (but not always) specified as rates.
108114
The rate at which an event occurs is the inverse of the average time until that event.
109115
For example, in the SEIR model, the recovery rate $\gamma$ is the inverse of the average infectious period.\\
110116

111117
Values of these rates can be determined from the natural history of the disease.
112-
For example, if people are on average infectious for 8 days, then in the model,
118+
For example, if people are on average infectious for 8 days, then in the model,
113119
1/8 of currently infectious people would recover each day
114120
(i.e. the rate of recovery, $\gamma=1/8=0.125$).
115121

116122
\section{Equations}\label{eqs}
117-
Note that in the diagram, arrows entering compartments are expressed as positive
123+
Note that in the diagram, arrows entering compartments are expressed as positive
118124
terms in the equations, while arrows exiting compartments are represented with negative terms.
119125
Based on the above diagram,deduce the following equations that describe this system:
120126

@@ -123,30 +129,93 @@ \section*{Compartment Equations}
123129
\begin{itemize}
124130
\item \textbf{S compartment:}
125131
\[
126-
\frac{dS}{dt} =
132+
\frac{dS}{dt} =
127133
\]
128-
134+
129135
\item \textbf{E compartment:}
130136
\[
131-
\frac{dE}{dt} =
137+
\frac{dE}{dt} =
132138
\]
133139
\item \textbf{I compartment:}
134140
\[
135141
\frac{dI}{dt} = \
136142
\]
137-
143+
138144
\item \textbf{R compartment:}
139145
\[
140146
\frac{dR}{dt} =
141147
\]
142148
\end{itemize}
143149

150+
\section{Parameters for the Measles outbreak}
151+
A parameter within a transmission model
152+
corresponds to a biological or social property of a dynamic system
153+
for a specific context.
154+
In this section we will give the elements to feed the parameters
155+
of a SEIR model for a Measles outbreak in Burkina Faso.
156+
\begin{itemize}
157+
\item The average latent period (or pre-infectious) for measles is
158+
around 8 days (Masters et al., 2023).
159+
\item The average infectious period lasts for 5 days (Masters et al., 2023).
160+
\item For measles the basic reproduction number typically ranges
161+
from 12 to 18, or even more (Fiona et al., 2017).
162+
\item A single infectious case is introduced into the population.
163+
\item The entire population, except for this one case, is initially susceptible.
164+
This assumption simplifies the model and allows us to explore the spread of
165+
infection in the absence of immunity. Although real populations typically
166+
have some immunity due to vaccination or prior infection.
167+
Also, no individuals are exposed or recovered at this moment.
168+
\item The population of Burkina Faso is approximately $N\approx 22.67$ million.
169+
\item The age structure of Burkina Faso is characteristic of a young
170+
population, with a majority of the population being under 25 years old.
171+
According to recent estimates (United Nations, 2023;
172+
Central Intelligence Agency, 2023); World Bank, 2023),
173+
the age structure is broken down as follows:
174+
175+
\begin{itemize}
176+
\item $[0\to15)$ years: $\sim 44 \, (43-45)$\% of the population
177+
\item $[15\to 25)$ years: $\sim 19.5 \, (19-20)$\%
178+
\item $[25\to 55)$ years: $\sim 29 \, (28-30)$\%
179+
\item $[55\to 65)$ years: $\sim 5 \, (3-5)$\%
180+
\item $65+$ years : $\sim 2.5 \, (2-3)$\%
181+
\end{itemize}
182+
183+
\end{itemize}
184+
\section{Table of parameters}
185+
Please fill in the table below with the parameters described above.
186+
Additionally, please note that we will do the simulation for 120 days.
187+
% Please add the following required packages to your document preamble:
188+
% \usepackage{booktabs}
189+
\begin{table}[htb]
190+
\centering
191+
\addtolength{\leftskip} {-2cm}
192+
\addtolength{\rightskip}{-2cm}
193+
\begin{tabular}{@{}lll@{}}
194+
\toprule
195+
Parameter & Value & Definition \\ \midrule
196+
bf\_pop & \underline{\hspace{1cm}} & Population size \\
197+
S/N & \underline{\hspace{1cm}} & Proportion of Susceptibles \\
198+
E/N & \underline{\hspace{1cm}} & Proportion of Exposed \\
199+
I/N & \underline{\hspace{1cm}} & Proportion of Infectious \\
200+
R/N & \underline{\hspace{1cm}} & Proportion of Recovered \\
201+
V/N & \underline{\hspace{1cm}} & Proportion of Vaccinated \\
202+
r0 & \underline{\hspace{1cm}} & Basic reproduction number \\
203+
latent\_period & \underline{\hspace{1cm}} & Time between becoming infected and the onset of infectiousness (in days) \\
204+
infectious\_period & \underline{\hspace{1cm}} & Time between the onset and end of infectious viral shedding (in days) \\
205+
transmission\_rate & \underline{\hspace{1cm}} & Rate at which infectious individuals can infect susceptibles (r0/infectious\_period) \\
206+
infectiousness\_rate & \underline{\hspace{1cm}} & Rate of progression from exposed to infectious (1/latent\_period) \\
207+
recovery\_rate & \underline{\hspace{1cm}} & Rate of progression from infectious to recovered (1/infectious\_period) \\
208+
time\_end & \underline{\hspace{1cm}} & Maximum number of timesteps over which to run the model (in days) \\
209+
increment & \underline{\hspace{1cm}} & The size of the time increment (in days) \\ \bottomrule
210+
\end{tabular}
211+
\end{table}
212+
144213
\section{Computing $R_0$}
145214
The expression for the basic reproduction number ($R_0$) in the above system is given by:
146215

147216
\begin{equation*} R_0 = \frac{\mu}{(\mu + \alpha)} \frac{\beta}{(\mu + \gamma)}. \end{equation*}
148217

149-
To calculate the $R_0$ value for given parameter values, write an R function
218+
To calculate the $R_0$ value for given parameter values, write an R object
150219
called Measles$R_0$ that implements this formula. The function will use the following parameter values:
151220

152221
\begin{itemize}
@@ -156,4 +225,11 @@ \section{Computing $R_0$}
156225
\item $\beta = 1.8$ (transmission rate)
157226
\end{itemize}
158227
Then compute the final size of such epidemic.
159-
\end{document}
228+
229+
\section{About this document}
230+
We adapted this material from "Practical: building a simple compartmental model for Zika" by Zulma Cucunubá, Pierre Nouvellet, and José M. Velasco-España, 2024-01-10 (V.1.0.3.).
231+
License: CC-BY 4.0 by the authors.
232+
For more details, visit: https://epiverse-trace.github.io/tutorials-late/LICENSE.html
233+
234+
235+
\end{document}

md5sum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"episodes/modelling-interventions.Rmd" "92be2434ff4fd8fd79eb981fc45687a3" "site/built/modelling-interventions.md" "2024-11-21"
1010
"episodes/compare-interventions.Rmd" "2d9b19604352386139e3527d4a6e5918" "site/built/compare-interventions.md" "2024-11-21"
1111
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2024-11-21"
12-
"learners/BF_measles.Rmd" "b52966318d82c3aad50bb22e520c0d79" "site/built/BF_measles.md" "2024-11-21"
12+
"learners/BF_measles.Rmd" "bee0009c85c3366fd9c254fe55faa4eb" "site/built/BF_measles.md" "2024-11-21"
1313
"learners/reference.md" "3c3b0a87a98f91231d47f5a2e24ad27d" "site/built/reference.md" "2024-11-21"
1414
"learners/setup.md" "84c16abddfc207bfb445fdd69d4f36a9" "site/built/setup.md" "2024-11-21"
1515
"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2024-11-21"

0 commit comments

Comments
 (0)