Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up vignettes for initial release #55

Merged
merged 14 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ inst/doc
/doc/
/Meta/
scratch.R
pkgdown/favicon/
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
checkmate,
stats,
stats
Suggests:
dplyr,
tidyr,
Expand All @@ -63,8 +63,8 @@ Suggests:
forcats,
ggplot2,
pak,
owidR,
testthat (>= 3.0.0),
covidregionaldata,
usethis,
knitr,
bookdown,
Expand All @@ -74,8 +74,7 @@ Suggests:
incidence2,
outbreaks
Remotes:
epiverse-trace/epiparameter,
epiforecasts/covidregionaldata
epiverse-trace/epiparameter
Config/testthat/edition: 3
Config/Needs/website:
epiverse-trace/epiversetheme
Expand Down
11 changes: 11 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
url: https://epiverse-trace.github.io/cfr/
template:
package: epiversetheme
articles:
- title: Package vignettes
navbar: Package vignettes
contents:
- estimate_static_severity
- estimate_time_varying_severity
- estimate_ascertainment
- title: Handling data from other packages
navbar: Handling data from other packages
contents:
- data_from_incidence2
File renamed without changes.
2 changes: 1 addition & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Poisson
Tidyverse
WIP
binom
codeblock
codecov
com
covidregionaldata
Expand All @@ -42,6 +41,7 @@ linelists
lockdown
md
org
owidR
packagename
parameterised
pkg
Expand Down
14 changes: 11 additions & 3 deletions vignettes/cfr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ vignette: >

It is important to understand the severity of a disease in terms of the case fatality rate in order to respond appropriately to an outbreak.
During an outbreak there is often a delay between cases being reported, and the outcomes of those cases being known.

Knowing the distribution of these delays from previous outbreaks of the same (or similar) diseases, and accounting for them, can be useful in getting better estimates of disease severity.

The severity of a disease can be estimated while correcting for delays in reporting using methods outlines in @nishiura2009, and which are implemented in the _cfr_ package.

::: {.alert .alert-primary}
Expand Down Expand Up @@ -50,7 +52,7 @@ library(cfr)

## Case and death data

Data on cases and deaths may be obtained from a number of publicly accessible sources, such as the [_covidregionaldata_ package for data on the Covid-19 outbreak](https://epiforecasts.io/covidregionaldata/).
Data on cases and deaths may be obtained from a number of publicly accessible sources, such as the [global Covid-19 dataset collected by Our World in Data](https://ourworldindata.org/coronavirus), and provided through the [_owidR_ package](https://cran.r-project.org/package=owidR).

In an outbreak response scenario, such data may also be compiled and shared locally.

Expand All @@ -66,6 +68,9 @@ Here, we use some data from the first Ebola outbreak, in the Democratic Republic

```{r}
data("ebola1976")

# view ebola dataset
head(ebola1976)
```

## Obtaining data on reporting delays
Expand Down Expand Up @@ -105,9 +110,12 @@ estimate_static(

The `estimate_static()` function is well suited to small outbreaks. For larger outbreaks where it may be useful to know how severity has changed over time, the function `estimate_time_varying()` is available. This function is however not well suited to small outbreaks. More on this can be found on the [vignette on estimating how disease severity varies over the course of an outbreak](estimate_time_varying_severity.html).

## Estimate reporting rate
## Estimate ascertainment rate

It is important to know what proportion of cases in an outbreak are being ascertained to muster the appropriate response, and to estimate the overall burden of the outbreak.

It is important to know what proportion of cases in an outbreak are being reported to muster the appropriate response, and to estimate the overall burden of the outbreak.
**Note** that the ascertainment rate may be affected by a number of factors.
When the main factor in low ascertainment is the lack of (access to) testing capacity, we refer to this as reporting or under-reporting.

The `estimate_reporting()` function can help estimate this using the daily case and death data, the known severity of the disease from previous outbreaks, as well as a delay distribution of onset-to-death.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/data_from_incidence2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ estimate_static(

## `<incidence2>` objects from aggregated case data

Aggregated case data such as that provided by the package [_covidregionaldata_](https://epiforecasts.io/covidregionaldata/) can be used with _cfr_ directly.
Aggregated case data such as the Covid-19 dataset provided by _incidence2_ can be used with _cfr_ directly.

Such usage is shown in other vignettes such as the [vignette on estimating time-varying severity](estimate_time_varying_severity.html).

Expand Down
Loading