mrc-ide / epireview

https://mrc-ide.github.io/epireview/
GNU General Public License v3.0
25 stars 2 forks source link

Summary function to help users prioritise a distribution to use #63

Closed adamkucharski closed 4 weeks ago

adamkucharski commented 2 months ago

It could be helpful to have a simple function that helps users select a parameter from a returned set. From discussions, it seems like a function that wrapped the following column selection would be particularly helpful to inform this decision, or at least guide users:

# Get Lassa parameters
lassa_data <- epireview::load_epidata("lassa")
lassa_params <- lassa_data$params

# Extract delay
param_admission_outcome <- lassa_params |> dplyr::filter(parameter_type=="Human delay - admission to care>discharge/recovery")

# Summary columns
summary_columns <- c("article_label", "population_sample_size", "population_location", "population_group",
                     "population_sex", "parameter_value", "distribution_type")

summary_info <- param_admission_outcome[,summary_columns]
summary_info <- summary_info |> dplyr::arrange(desc(population_sample_size))
print(summary_info, n=Inf,width=Inf)
sangeetabhatia03 commented 1 month ago

Thanks for the suggestion Adam, this ties into other issues we are working on. https://github.com/mrc-ide/epireview/issues/23

sangeetabhatia03 commented 1 month ago

Suggested approach: https://github.com/mrc-ide/epireview/blob/ef4b894dfbce027c7b319f8b9ff11a26590630bc/R/load_epidata.R#L95

sangeetabhatia03 commented 1 month ago

Also please see generic function https://github.com/mrc-ide/epireview/blob/main/R/get_parameter.R