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

show if epiparameter is extrinsic TRUE or FALSE #363

Open
avallecam opened this issue Aug 2, 2024 · 2 comments
Open

show if epiparameter is extrinsic TRUE or FALSE #363

avallecam opened this issue Aug 2, 2024 · 2 comments

Comments

@avallecam
Copy link
Member

avallecam commented Aug 2, 2024

Is your feature request related to a problem? Please describe.

The extrinsic incubation periods are only two, but the current interface does not show the variable "extrinsic" yet

library(epiparameter)
library(tidyverse)
epidist_db(subset = extrinsic == TRUE)
#> Returning 2 results that match the criteria (2 are parameterised). 
#> Use subset to filter by entry variables or single_epidist to return a single entry. 
#> To retrieve the citation for each use the 'get_citation' function
#> # List of 2 <epidist> objects
#> Number of diseases: 1
#> ❯ Dengue
#> Number of epi distributions: 1
#> ❯ incubation period
#> [[1]]
#> Disease: Dengue
#> Pathogen: Dengue Virus
#> Epi Distribution: incubation period
#> Study: Chan M, Johansson M (2012). "The Incubation Periods of Dengue Viruses."
#> _PLoS One_. doi:10.1371/journal.pone.0050972
#> <https://doi.org/10.1371/journal.pone.0050972>.
#> Distribution: lnorm
#> Parameters:
#>   meanlog: 2.553
#>   sdlog: 0.481
#> 
#> [[2]]
#> Disease: Dengue
#> Pathogen: Dengue Virus
#> Epi Distribution: incubation period
#> Study: Chan M, Johansson M (2012). "The Incubation Periods of Dengue Viruses."
#> _PLoS One_. doi:10.1371/journal.pone.0050972
#> <https://doi.org/10.1371/journal.pone.0050972>.
#> Distribution: lnorm
#> Parameters:
#>   meanlog: 1.792
#>   sdlog: 0.468
#> 
#> # ℹ Use `parameter_tbl()` to see a summary table of the parameters.
#> # ℹ Explore database online at: https://epiverse-trace.github.io/epiparameter/dev/articles/database.html

epidist_db(subset = extrinsic == TRUE) %>% 
  parameter_tbl()
#> Returning 2 results that match the criteria (2 are parameterised). 
#> Use subset to filter by entry variables or single_epidist to return a single entry. 
#> To retrieve the citation for each use the 'get_citation' function
#> # Parameter table:
#> # A data frame:    2 × 7
#>   disease pathogen   epi_distribution prob_distribution author  year sample_size
#>   <chr>   <chr>      <chr>            <chr>             <chr>  <dbl>       <dbl>
#> 1 Dengue  Dengue Vi… incubation peri… lnorm             Chan …  2012         146
#> 2 Dengue  Dengue Vi… incubation peri… lnorm             Chan …  2012         146

Created on 2024-08-02 with reprex v2.1.0

Describe the solution you'd like

Possibly related with #50, the solution could include a line in the epidist/epiparameter class object print saying extrinsic: FALSE or extrinsic: TRUE. Also a column in the parameter_tbl() output

Additional context
It's not urgent, but it's for your consideration. Although {epiparameter} currently only has Denge extrinsic incubation period, when Zika values be added we can showcase them in how-to guides about the usage of {epiparameter} to access inputs to a Zika model build with {deSolve} as a next step for learners after reading the "building a simple mathematical model for Zika" (Spanish, English)

@joshwlambert
Copy link
Member

Thanks for raising @avallecam. The extrinsic field in the <epiparameter> object was originally used in the <vb_epidist> class to link intrinsic and extrinsic epidemiological parameters. Now it is just a descriptor of whether the parameter set is either for the vector or the human.

On the proposed solution, I do not want to add too many fields to the print method or the output of parameter_tbl() as I think it would become overly complex for the user and we want to distill the key information. Especially for extrinsic as I don't think this information is used very often by users and so in most cases would be unnecessary information.

One possible solution could be to add extrinsic: TRUE in the print out for only extrinsic parameter sets. This would help users identify if they are using parameters for the vector. It's not a perfect solution as it would produce discrepancies between printing different <epiparameter> objects. Let me know what you think and we can further discuss.

@joshwlambert
Copy link
Member

joshwlambert commented Jan 7, 2025

Hey @avallecam, what do you think to the points raised in my previous message?

Currently the vector-borne parameter support is minimal in {epiparameter}, so this is something we could focus on in the near future, e.g. the Zika parameters you mentioned; or we can close this and revisit at a later date if it becomes more pertinent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants