epiparameter icon indicating copy to clipboard operation
epiparameter copied to clipboard

replace the `plot()` x axis with the `epi_distribution` name

Open avallecam opened this issue 1 year ago • 0 comments

if the serial interval starts in the onset of symptoms in the primary case, then plot() seems to have the x-axis label fixed independent of the distribution. Probably making it modifiable with a string like "epi_distribution" (days) (like in this example) would be a generalizable solution (if all delays are registered in days)

library(epiparameter)

incubation <-
  epiparameter::epidist_db(
    disease = "covid",
    epi_dist = "incubation",
    single_epidist = T
  )
#> Using McAloon C, Collins Á, Hunt K, Barber A, Byrne A, Butler F, Casey M,
#> Griffin J, Lane E, McEvoy D, Wall P, Green M, O'Grady L, More S (2020).
#> "Incubation period of COVID-19: a rapid systematic review and
#> meta-analysis of observational research." _BMJ Open_.
#> doi:10.1136/bmjopen-2020-039652
#> <https://doi.org/10.1136/bmjopen-2020-039652>.. 
#> To retrieve the short citation use the 'get_citation' function

plot(incubation)

# x: incubation period (days)

serial <-
  epiparameter::epidist_db(
    disease = "covid",
    epi_dist = "serial",
    single_epidist = T
  )
#> Using Yang L, Dai J, Zhao J, Wang Y, Deng P, Wang J (2020). "Estimation of
#> incubation period and serial interval of COVID-19: analysis of 178
#> cases and 131 transmission chains in Hubei province, China."
#> _Epidemiology and Infection_. doi:10.1017/S0950268820001338
#> <https://doi.org/10.1017/S0950268820001338>.. 
#> To retrieve the short citation use the 'get_citation' function

plot(serial)

# x: serial interval (days)

Created on 2023-12-14 with reprex v2.0.2

avallecam avatar Dec 14 '23 02:12 avallecam