Skip to content

Commit

Permalink
Merge pull request #20 from epiforecasts/bug-population-per
Browse files Browse the repository at this point in the history
Bug: Corrects cumulative incidence
  • Loading branch information
seabbs authored Dec 24, 2021
2 parents 38fa970 + a643f4d commit 7e79beb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: omicron.sgtf.forcast
Title: Real-time estimation of the time-varying transmission advantage of Omicron in England using S-Gene Target Status as a Proxy
Version: 1.0.0
Version: 1.1.0
Authors@R:
c(person(given = "Sam Abbott",
role = c("aut", "cre"),
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 2021-12-23

- Thanks to [Ritwik Priya](https://twitter.com/ritwik_priya) for spotting an issue with our cumulative incidence as a percentage of the population estimates. Unfortunately, our code accidently combined all cases types (Omicron, non-Omicron, and combined) when making the calculating leading to estimates roughly 3 times higher than they should have been.
- Update the region order of the cumulative incidence plot to match other regions.

# 2021-12-22

- Initial analysis release.
2 changes: 1 addition & 1 deletion R/munge-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bias_data_to_fv <- function(obs) {
cumulative_percentage <- function(cases, pop) {
cases_pop <- cases %>%
left_join(pop, by = c("region")) %>%
group_by(region) %>%
group_by(region, type) %>%
arrange(date) %>%
mutate(c_median = cumsum(median) / population,
c_q5 = cumsum(q5) / population,
Expand Down
4 changes: 3 additions & 1 deletion R/plot-cumulative-percent.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ source(here::here("R", "load-public-data.R"))
plot_cumulative_percent <- function(cases_pop, forecast_start, data_start) {

plot_cumulative_pop <- cases_pop %>%
ungroup() %>%
mutate(region = factor(region, ordered = TRUE)) %>%
ggplot(aes(x = date)) +
geom_ribbon(aes(ymin = c_q5, ymax = c_q95), alpha = 0.3) +
geom_ribbon(aes(ymin = c_q20, ymax = c_q80), alpha = 0.3) +
geom_line(aes(y = c_median), alpha = 0.3, linetype = 2) +
geom_vline(xintercept = forecast_start, lty = 5, lwd = 1, col = "black") +
scale_y_continuous(labels = scales::label_percent()) + #, limits = c(0,0.01)
scale_y_continuous(labels = scales::label_percent()) +
facet_wrap(~ region) +
labs(x = NULL,
y = "Cumulative % of the population with a reported Omicron case")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

In this work, we use S-gene target failure (SGTF) as a proxy of variant status combined with reported case counts to explore the evidence for changes in transmission advantage over time for the Omicron variant. If present this could indicate the impact of immune escape, bias in SGTF data or differences in the populations within which the variants are circulating. We also report estimates for growth rates by variant and overall, case counts overall and by variant for a 14 day forecast window assuming constant future growth, the date at which Omicron will become dominant in England and in each NHS region, and the estimated cumulative percentage of the population with a reported Omicron case.

Estimates are updated daily as new data is released but the summary of the situation is updated less frequently and so may not match current estimates. All data (both raw data and estimates) are available [here](https://github.com/epiforecasts/omicron-sgtf-forecast/tree/main/data) and the report should be fully reproducible. Reports and data as available at the time of release are available from the [release page](https://github.com/epiforecasts/omicron-sgtf-forecast/releases).
Estimates are updated daily as new data is released but the summary of the situation is updated less frequently and so may not match current estimates. All data (both raw data and estimates) are available [here](https://github.com/epiforecasts/omicron-sgtf-forecast/tree/main/data) and the report should be fully reproducible. Reports and data as available at the time of release are available from the [release page](https://github.com/epiforecasts/omicron-sgtf-forecast/releases). See our [news file](https://github.com/epiforecasts/omicron-sgtf-forecast/blob/main/NEWS.md) for details of what updates were made when.

**Real-time report: [as html](https://epiforecasts.io/omicron-sgtf-forecast/summary), [or pdf](https://epiforecasts.io/omicron-sgtf-forecast/summary.pdf)**

Expand Down
6 changes: 3 additions & 3 deletions writeup/summary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ date_forecast_end <- max(cases$date)

1. Centre for the Mathematical Modelling of Infectious Diseases, London School of Hygiene & Tropical Medicine, London WC1E 7HT, United Kingdom

**Estimates are updated daily as new data is released but the summary of the situation is updated less frequently and so may not match current estimates. All data (both raw data and estimates) are available [here](https://github.com/epiforecasts/omicron-sgtf-forecast/tree/main/data) and the report should be fully reproducible. Reports and data as available at the time of release are available from the [release page](https://github.com/epiforecasts/omicron-sgtf-forecast/releases).**
**Estimates are updated daily as new data is released but the summary of the situation is updated less frequently and so may not match current estimates. All data (both raw data and estimates) are available [here](https://github.com/epiforecasts/omicron-sgtf-forecast/tree/main/data) and the report should be fully reproducible. Reports and data as available at the time of release are available from the [release page](https://github.com/epiforecasts/omicron-sgtf-forecast/releases). See our [news file](https://github.com/epiforecasts/omicron-sgtf-forecast/blob/main/NEWS.md) for details of what updates were made when.**

## Introduction

Expand Down Expand Up @@ -155,7 +155,7 @@ All models were implemented using the [`forecast.vocs` R package](https://epifor

### Summary

**Last updated: 2021-12-22**
**Last updated: 2021-12-23**

* A model that assumed that variants growth rates varied over time relative to each other performed better in all regions than a model where the relative difference was constant over time.

Expand All @@ -169,7 +169,7 @@ All models were implemented using the [`forecast.vocs` R package](https://epifor

* The variation in transmission advantage also differed by region with some regions having a fairly stable trend (such as the South West) and some (such as the North East) indicating large changes.

* Assuming growth rates stay as currently estimated we forecast that approximately 7.5% to 10% of the English population will have reported an Omicron case by the end of 2021, although with significant regional variation. This does not take into account any changes in testing behaviour or capacity.
* Assuming growth rates stay as currently estimated we forecast that approximately 1.5% to 2.5% of the English population will have reported an Omicron case by the end of 2021, although with significant regional variation. This does not take into account any changes in testing behaviour or capacity.

* We found some evidence of bias in sampling S-gene status though this varied across regions and over time. There was particularly strong evidence of biased sampling over time in the East Midlands. In other regions, the evidence of bias was substantially weaker and therefore less likely to bias our main findings.

Expand Down

0 comments on commit 7e79beb

Please sign in to comment.