Skip to content

Commit

Permalink
add distribution plot and spoiler on method
Browse files Browse the repository at this point in the history
  • Loading branch information
avallecam committed Mar 22, 2024
1 parent 9047423 commit 1ac361d
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion episodes/severity-static.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Answer to these questions:

## Delay-adjusted CFR

[Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) developed a method that considers the time delay from the onset of symptoms to death.
[Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) developed a method that considers the **time delay** from the onset of symptoms to death.

Real-time outbreaks may have a number of deaths that are insufficient to determine the time distribution between onset and death. Therefore, we can estimate the _distribution delay_ from historical outbreaks or reuse the ones available in systematic reviews from repositories like `{epiparameter}` or `{epireview}`.

Expand All @@ -251,8 +251,37 @@ onset_to_death_ebola <-
epi_dist = "onset_to_death",
single_epidist = TRUE
)
# Plot <epidist> object
plot(onset_to_death_ebola, day_range = 0:40)
```

::::::::::::::::::::::::::: spoiler

### How does {cfr} works?

To adjust the CFR, [Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) use the case and death incidence data to estimate the number of cases with known outcomes:

$$
u_t = \dfrac{\sum_{i = 0}^t
\sum_{j = 0}^\infty c_{i - j} f_{j}}{\sum_{i = 0} c_i},
$$

where
- $c_{t}$ is the daily case incidence at time, $t$,
- $f_{t}$ is the value of the probability mass function of the **delay distribution** between onset and death.
- $u_{t}$ represents the underestimation of the known outcomes and is used to **scale** the value of the cumulative number of cases in the denominator in the calculation of the CFR.

The [`estimate_outcomes()`](https://epiverse-trace.github.io/cfr/reference/estimate_outcomes.html) function is used internally to calculate $u_{t}$.

The estimator for CFR can be written as:

$$p_{t} = b_{t} / u_{t}$$

where $p_{t}$ is the realized proportion of confirmed cases to die from the infection (or the unbiased CFR), and $b_{t}$, the crude and biased estimate of CFR (also naive CFR).

:::::::::::::::::::::::::::

To calculate the delay-adjusted CFR, we can use the `cfr_static()` function with the `data` and `delay_density` arguments.

```{r}
Expand Down

0 comments on commit 1ac361d

Please sign in to comment.