epiparameter icon indicating copy to clipboard operation
epiparameter copied to clipboard

add the `sample_size` to the `list_distributions()` output

Open avallecam opened this issue 1 year ago • 0 comments

I'm open to discussing if adding the sample_size would facilitate to identification of the difference between outputs from the sample paper with equal author and year. This possibly is an exceptional case, but when using single_epidist I would know that the difference is there instead of elsewhere.

library(epiparameter)
library(tidyverse)

# how to know to differentiate them by sample size?
epidist_db(disease = "covid",epi_dist = "incubation",author = "stephen") %>%
  list_distributions()
#> Returning 4 results that match the criteria (4 are parameterised). 
#> Use subset to filter by entry variables or single_epidist to return a single entry. 
#> To retrieve the short citation for each use the 'get_citation' function
#>    disease  epi_distribution prob_distribution       author year
#> 1 COVID-19 incubation period             lnorm Stephen .... 2020
#> 2 COVID-19 incubation period             lnorm Stephen .... 2020
#> 3 COVID-19 incubation period             lnorm Stephen .... 2020
#> 4 COVID-19 incubation period             lnorm Stephen .... 2020

multidist <- epidist_db(disease = "covid",epi_dist = "incubation",author = "stephen")
#> Returning 4 results that match the criteria (4 are parameterised). 
#> Use subset to filter by entry variables or single_epidist to return a single entry. 
#> To retrieve the short citation for each use the 'get_citation' function

# str(multidist)
multidist[[1]]$metadata$sample_size
#> [1] 181
multidist[[4]]$metadata$sample_size
#> [1] 73

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

avallecam avatar Dec 12 '23 19:12 avallecam