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: modelling-interventions.md
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,8 @@ Pharmaceutical interventions (PIs) are measures such as vaccination and mass tre
332
332
333
333
The diagram below shows the SEIRV model implemented using `model_default()` where susceptible individuals are vaccinated and then move to the $V$ class.
<scripttype="application/json"data-for="htmlwidget-dc9df32b70b283a80419">{"x":{"diagram":"digraph {\n\n # graph statement\n ################\n graph [layout = dot,\n rankdir = LR,\n overlap = true,\n fontsize = 10]\n\n # nodes\n #######\n node [shape = square,\n fixedsize = true\n width = 1.3]\n\n S\n E\n I\n R\n V\n\n # edges\n #######\n S -> E [label = \" infection (β)\"]\n S -> V [label = \" vaccination (ν)\"]\n E -> I [label = \" onset of \ninfectiousness (α)\"]\n I -> R [label = \" recovery (γ)\"]\n\n}","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script><!--/html_preserve-->
336
337
337
338
338
339
@@ -430,7 +431,7 @@ From the plot, we see that the peak number of total number of infectious individ
430
431
::::::::::::::::::::::::::::::::::::::::::::::::
431
432
432
433
Lastly, if you want to plot new infections from an `epidemics::model_default()` that includes a `vaccination` intervention, you need to add one argument to `epidemics::new_infections()`:
433
-
Set `compartments_from_susceptible = "vaccinated"` to tell the function that people moving from "susceptible" to "vaccinated" are not becoming infected. This ensures vaccinated individuals aren't counted as infections.
434
+
Set `exclude_compartments = "vaccinated"` to tell the function that people moving from "susceptible" to "vaccinated" are not becoming infected. This ensures vaccinated individuals aren't counted as infections.
434
435
435
436
::::::::::::::::::::: spoiler
436
437
@@ -440,26 +441,57 @@ Note that if we add `by_group = FALSE` in `epidemics::new_infections()`, we get
440
441
```r
441
442
infections_baseline<-epidemics::new_infections(
442
443
data=output_baseline,
443
-
compartments_from_susceptible="vaccinated", # if vaccination
444
+
exclude_compartments="vaccinated", # if vaccination
Error: object 'infections_baseline_interv' not found
509
+
```
476
510
477
511
To get an age-stratified plot, keep the default `by_group = TRUE` and then add `linetype = demography_group` when declaring variables in `ggplot(aes(...))`.
0 commit comments