You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/superspreading-estimate.Rmd
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,9 @@ epi_contacts %>%
158
158
159
159
But this output only contains the number of secondary cases for reported infectors in the contact data, not for **all** the individuals in the whole `<epicontacts>` object.
160
160
161
-
Instead, from `{epicontacts}` we can use the function `epicontacts::get_degree()`. The argument `type = "out"` get the **out-degree** of each **node** in the contact network from the `<epicontacts>` class object. In a directed network, the out-degree is the number of outgoing edges (infectees) emanating from a node (infector) ([Nykamp DQ, accessed: 2025](https://mathinsight.org/definition/node_degree)). Also, the argument `only_linelist = TRUE` include individuals in contacts and linelist data frames.
161
+
Instead, from `{epicontacts}` we can use the function `epicontacts::get_degree()`. The argument `type = "out"` gets the **out-degree** of each **node** in the contact network from the `<epicontacts>` class object. In a directed network, the out-degree is the number of outgoing edges (infectees) emanating from a node (infector) ([Nykamp DQ, accessed: 2025](https://mathinsight.org/definition/node_degree)).
162
+
163
+
Also, the argument `only_linelist = TRUE` will only include individuals in the linelist data frame. During outbreak investigations, we expect a registry of **all** the observed infected individuals in the linelist data. However, anyone not linked with a potential infector or infectee will not appear in the contact data. Thus, the argument `only_linelist = TRUE` will protect us against missing this later set of individuals when counting the number of secondary cases caused by all the observed infected individuals. They will appear in the `<integer>` vector output as `0` secondary cases.
162
164
163
165
```{r,message=FALSE,warning=FALSE}
164
166
# Count secondary cases per subject in contacts and linelist
@@ -176,7 +178,10 @@ This is to count the number of secondary cases caused by all the observed infect
176
178
which includes individuals in contacts and linelist data frames.
177
179
178
180
This assumption may not work for all situations.
179
-
If you need to consider only the individuals from the contact data,
181
+
For example, if during the registry of observed infections,
182
+
the contact data included more subjects than the ones available in the linelist data,
183
+
then you need to consider only the individuals from the contact data.
184
+
In that situation,
180
185
at `epicontacts::get_degree()` we use the `only_linelist = FALSE` argument.
181
186
182
187
:::::::::::::::::::::
@@ -288,7 +293,7 @@ Calculate the distribution of secondary cases for Ebola using the `ebola_sim_cle
288
293
289
294
:::::::::::::::::: hint
290
295
291
-
**Note:** This dataset has `r nrow(ebola_sim_clean$linelist)` cases. Running `epicontacts::vis_epicontacts()` may overload your session! Try to avoid this step.
296
+
⚠️ **Optional step:** This dataset has `r nrow(ebola_sim_clean$linelist)` cases. Running `epicontacts::vis_epicontacts()` may take several minutes and use significant memory for large outbreaks such as the Ebola linelist. If you're on an older or slower computer, you can skip this step.
0 commit comments