Skip to content

Commit

Permalink
Update vignette and wordlist
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikunterwegs committed Feb 5, 2024
1 parent fd7d7b2 commit f7e33b5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Altman
Analogs
BH
BMC
Bazar
Bjørnstad
CMD
COVID
Expand Down
36 changes: 29 additions & 7 deletions vignettes/diphtheria.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ knitr::opts_chunk$set(
warning = FALSE,
fig.width = 5,
fig.height = 4,
dpi = 300
dpi = 150
)
```

Expand All @@ -35,6 +35,10 @@ knitr::opts_chunk$set(
This vignette shows how to model an outbreak of diphtheria (or a similar acute directly-transmitted infectious disease) within the setting of a humanitarian aid camp, where the camp population may fluctuate due to external factors, including influxes from crisis affected areas or evacuations to other camps or areas.
In such situations, implementing large-scale public health measures such contact tracing and quarantine, or introducing reactive mass vaccination may be challenging.

::: {.alert .alert-info}
The [vignette on modelling a vaccination campaign](modelling_vaccination.html) shows how to model the introduction of a mass vaccination campaign for a fixed, stable population.
:::

_epidemics_ provides a simple SEIHR compartmental model based on @finger2019, in which it is possible to vary the population of each demographic group throughout the model's simulation time and explore the resulting epidemic dynamics.
This baseline model only tracks infections by demographic groups, and does not include variation in contacts between demographic groups (e.g. by age or occupation), as contacts are likely to be less clearly stratified in a camp setting.
The baseline model also does not allow interventions that target social contacts (such as social distancing or quarantine), and does not include a 'vaccinated' compartment. It is therefore suited to analysis of a rapidly spreading infection prior to the introduction of any reactive vaccine campaign.
Expand Down Expand Up @@ -64,7 +68,8 @@ initial_conditions <- matrix(0, nrow = n_age_groups, ncol = 5)
initial_conditions[, 1] <- demography_vector - 1
initial_conditions[, 3] <- rep(1, n_age_groups)
# camp social contact rates are assumed to be uniform within and between age groups
# camp social contact rates are assumed to be uniform within and between
# age groups
camp_pop <- population(
contact_matrix = matrix(1, nrow = n_age_groups, ncol = n_age_groups),
demography_vector = demography_vector,
Expand All @@ -82,6 +87,7 @@ prop_vaccinated <- c(0.05, 0.2, 0.05)
```

We run the model with its default parameters, assuming that:

- diphtheria has an $R_0$ of 4.0 and a mean infectious period of 4.5 days, giving a transmissibility ($\beta$) of about 0.889;
- diphtheria has a pre-infectious or incubation period of 3 days, giving an infectiousness rate ($\sigma$) of about 0.33; and
- the recovery rate of diphtheria is about 0.33.
Expand Down Expand Up @@ -150,12 +156,24 @@ data <- model_diphtheria_cpp(
population = camp_pop,
population_change = pop_change
)
# summarise population change in susceptibles
data_pop_size <- filter(data, compartment == "susceptible") |>
group_by(time) |>
summarise(
total_susceptibles = sum(value)
)
```

```{r class.source = 'fold-hide', fig.cap="Model results from a single run showing the number of individuals infectious with diphtheria over 100 days of the outbreak, with an increase in the camp population size."}
filter(data, compartment == "infectious") |>
ggplot() +
```{r class.source = 'fold-hide', fig.cap="Model results from a single run showing the number of individuals infectious with diphtheria over 100 days of the outbreak, with an increase in the camp population size. Shaded blue region shows the number of individuals susceptible to infection (right-hand side Y axis)."}
ggplot() +
geom_area(
data = data_pop_size,
aes(time, total_susceptibles / 10),
fill = "steelblue", alpha = 0.5
) +
geom_line(
data = filter(data, compartment == "infectious"),
aes(time, value, colour = demography_group)
) +
geom_vline(
Expand All @@ -174,11 +192,15 @@ filter(data, compartment == "infectious") |>
colour = "red"
) +
scale_y_continuous(
labels = scales::comma
labels = scales::comma,
sec.axis = dup_axis(
trans = function(x) x * 10,
name = "Individuals susceptible"
)
) +
scale_colour_brewer(
palette = "Dark2",
name = "Age group",
name = "Age group (individuals infectious)",
labels = c("<5", "5-15", ">15")
) +
expand_limits(
Expand Down

0 comments on commit f7e33b5

Please sign in to comment.