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

fix delays error from epiparameter epinow2 conflict #81

Merged
merged 3 commits into from
Jun 18, 2024
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
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ episodes:
- clean-data.Rmd
- describe-cases.Rmd
- simple-analysis.Rmd
- delays-reuse.Rmd
- delays-access.Rmd
# - quantify-transmissibility.Rmd
- delays-functions.Rmd

Expand Down
File renamed without changes.
26 changes: 12 additions & 14 deletions episodes/delays-functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

If you need it, read in detail about the [R probability functions for the normal distribution](https://sakai.unc.edu/access/content/group/3d1eb92e-7848-4f55-90c3-7c72a54e7e43/public/docs/lectures/lecture13.htm#probfunc), each of its definitions and identify in which part of a distribution they are located!

![The four probability functions for the normal distribution ([Jack Weiss, 2012](https://sakai.unc.edu/access/content/group/3d1eb92e-7848-4f55-90c3-7c72a54e7e43/public/docs/lectures/lecture13.htm#probfunc))](fig/fig5a-normaldistribution.png)

Check warning on line 115 in episodes/delays-functions.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: fig/fig5a-normaldistribution.png

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

Expand Down Expand Up @@ -444,9 +444,8 @@
)

# adapt epidist to epinow2
covid_serialint_discrete_max <-
covid_serialint %>%
discretise() %>%
covid_serialint_discrete_max <- covid_serialint %>%
epiparameter::discretise() %>%
quantile(p = 0.99)

covid_serialint_parameters <-
Expand All @@ -470,9 +469,8 @@
)

# adapt epiparameter to epinow2
covid_incubation_discrete_max <-
covid_incubation %>%
discretise() %>%
covid_incubation_discrete_max <- covid_incubation %>%
epiparameter::discretise() %>%
quantile(p = 0.99)

covid_incubation_parameters <-
Expand Down Expand Up @@ -577,7 +575,7 @@
read_csv(here::here("data", "raw-data", "ebola_cases.csv"))

# list distributions
epidist_db(disease = "ebola") %>%
epiparameter::epidist_db(disease = "ebola") %>%
epiparameter::parameter_tbl()
```

Expand All @@ -586,14 +584,14 @@
# generation time ---------------------------------------------------------

# subset one distribution for the generation time
ebola_serial <- epidist_db(
ebola_serial <- epiparameter::epidist_db(
disease = "ebola",
epi_dist = "serial",
single_epidist = TRUE
)

# adapt epiparameter to epinow2
ebola_serial_discrete <- discretise(ebola_serial)
ebola_serial_discrete <- epiparameter::discretise(ebola_serial)

serial_interval_ebola <-
EpiNow2::Gamma(
Expand All @@ -605,14 +603,14 @@
# incubation time ---------------------------------------------------------

# subset one distribution for delay of the incubation period
ebola_incubation <- epidist_db(
ebola_incubation <- epiparameter::epidist_db(
disease = "ebola",
epi_dist = "incubation",
single_epidist = TRUE
)

# adapt epiparameter to epinow2
ebola_incubation_discrete <- discretise(ebola_incubation)
ebola_incubation_discrete <- epiparameter::discretise(ebola_incubation)

incubation_period_ebola <-
EpiNow2::Gamma(
Expand Down Expand Up @@ -656,15 +654,15 @@

```{r,message=FALSE,eval=TRUE}
# What parameters are available for Influenza?
epidist_db(disease = "influenza") %>%
epiparameter::epidist_db(disease = "influenza") %>%
epiparameter::parameter_tbl() %>%
count(epi_distribution)

# generation time ---------------------------------------------------------

# Read the generation time
influenza_generation <-
epidist_db(
epiparameter::epidist_db(
disease = "influenza",
epi_dist = "generation"
)
Expand Down Expand Up @@ -698,7 +696,7 @@

# Read the incubation period
influenza_incubation <-
epidist_db(
epiparameter::epidist_db(
disease = "influenza",
epi_dist = "incubation",
single_epidist = TRUE
Expand Down
Loading