Skip to content

Commit c0843ad

Browse files
committed
differences for PR #249
1 parent 94a5f70 commit c0843ad

9 files changed

+30
-11
lines changed
10.4 KB
Loading
4.71 KB
Loading
16.3 KB
Loading
5.82 MB
Loading
-10.5 KB
Loading

md5sum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"episodes/delays-functions.Rmd" "44567c40c9ecf6de5387668753328cf3" "site/built/delays-functions.md" "2025-10-17"
1010
"episodes/create-forecast.Rmd" "cc408a17d67fd9429a308b723ad17952" "site/built/create-forecast.md" "2025-10-17"
1111
"episodes/severity-static.Rmd" "22c2a1c522e4bd4a1f4291df17ac38cb" "site/built/severity-static.md" "2025-10-20"
12-
"episodes/superspreading-estimate.Rmd" "6295d858f39b668451318a5daabafc43" "site/built/superspreading-estimate.md" "2025-10-24"
12+
"episodes/superspreading-estimate.Rmd" "75f53bcea81f5ff753b95e85b25fa1a7" "site/built/superspreading-estimate.md" "2025-10-24"
1313
"episodes/superspreading-simulate.Rmd" "e7fedcad27065f7df8465759ab4dd799" "site/built/superspreading-simulate.md" "2025-10-17"
1414
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2025-10-17"
1515
"learners/intro-cfr-adjust-delays.Rmd" "87d00768a1c2daedc4303f0889472349" "site/built/intro-cfr-adjust-delays.md" "2025-10-17"

network.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

superspreading-estimate.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,35 @@ exercises: 2
2424

2525
::::::::::::::::::::::::::::::::::::: prereq
2626

27-
## Prerequisites
28-
2927
Learners should familiarise themselves with following concept dependencies before working through this tutorial:
3028

3129
**Statistics**: common probability distributions, particularly Poisson and negative binomial.
3230

3331
**Epidemic theory**: The reproduction number, R.
3432

33+
**R packages installed**: `{epicontacts}`, `{fitdistrplus}`, `{superspreading}`, `{outbreaks}`, `{tidyverse}`.
34+
3535
:::::::::::::::::::::::::::::::::
3636

37+
:::::::::: spoiler
38+
39+
Install packages if their are not already installed
40+
41+
42+
``` r
43+
# if {pak} is not installed, run: install.packages("pak")
44+
pak::pak("epicontacts")
45+
pak::pak("fitdistrplus")
46+
pak::pak("superspreading")
47+
pak::pak("outbreaks")
48+
pak::pak("tidyverse")
49+
```
50+
51+
If you have any error message,
52+
go to the [main setup page](../learners/setup.md#software-setup).
53+
54+
::::::::::
55+
3756
## Introduction
3857

3958
<!-- we know -->
@@ -105,7 +124,7 @@ With the argument `directed = TRUE` we configure a directed graph. These directi
105124
epicontacts::vis_epicontacts(epi_contacts)
106125
```
107126

108-
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-4-1.png" style="display: block; margin: auto;" />
127+
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-5-1.png" style="display: block; margin: auto;" />
109128

110129
::::::::::::::::::::::::::: spoiler
111130

@@ -254,15 +273,15 @@ all_secondary_cases %>%
254273
)
255274
```
256275

257-
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-8-1.png" style="display: block; margin: auto;" />
276+
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-9-1.png" style="display: block; margin: auto;" />
258277

259278
The number of secondary cases can be used to _empirically_ estimate the **offspring distribution**, which is the number of secondary _infections_ caused by each case. One candidate statistical distribution used to model the offspring distribution is the **negative binomial** distribution with two parameters:
260279

261280
- **Mean**, which represents the $R_{0}$, the average number of (secondary) cases produced by a single individual in an entirely susceptible population, and
262281

263282
- **Dispersion**, expressed as $k$, which represents the individual-level variation in transmission by single individuals.
264283

265-
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-9-1.png" style="display: block; margin: auto;" />
284+
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-10-1.png" style="display: block; margin: auto;" />
266285

267286
From the histogram and density plot, we can identify that the offspring distribution is highly skewed or **overdispersed**. In this framework, the superspreading events (SSEs) are not arbitrary or exceptional, but simply realizations from the right-hand tail of the offspring distribution, which we can quantify and analyse ([Lloyd-Smith et al., 2005](https://www.nature.com/articles/nature04153)).
268287

@@ -335,7 +354,7 @@ ebola_secondary %>%
335354
)
336355
```
337356

338-
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-10-1.png" style="display: block; margin: auto;" />
357+
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-11-1.png" style="display: block; margin: auto;" />
339358

340359
From a visual inspection, the distribution of secondary cases for the Ebola data set in `ebola_sim_clean` shows an skewed distribution with secondary cases equal or lower than 6. We need to complement this observation with a statistical analysis to evaluate for overdispersion.
341360

@@ -388,7 +407,7 @@ From the number secondary cases distribution we estimated a dispersion parameter
388407

389408
We can overlap the estimated density values of the fitted negative binomial distribution and the histogram of the number of secondary cases:
390409

391-
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-13-1.png" style="display: block; margin: auto;" />
410+
<img src="fig/superspreading-estimate-rendered-unnamed-chunk-14-1.png" style="display: block; margin: auto;" />
392411

393412
:::::::::::::::::::: callout
394413

webshot.png

-604 KB
Loading

0 commit comments

Comments
 (0)