hubverse-org / hubEnsembles

Ensemble methods for combining hub model outputs.
https://hubverse-org.github.io/hubEnsembles/
Other
5 stars 1 forks source link

Consider returning `median` output type from `linear_pool()` #108

Open eahowerton opened 2 months ago

eahowerton commented 2 months ago

In the hubEnsembles manuscript, we have a plot of quantile average and linear pool ensembles from the incident example data (Figure 5), where the median values are used as the point estimate. However, linear_pool() doesn't return results for median output type (I think), so I ended up having to add this clunky few lines of code, where I pull output_type_id == 0.5, rename the output_type to "median" and append it to the end of the linear_pool results.

model_output_plot <- linear_pool_ens |>
  dplyr::filter(output_type_id == 0.5, target == "wk inc flu hosp") |>
  dplyr::mutate(output_type = "median", output_type_id = NA)
model_output_plot <- dplyr::bind_rows(linear_pool_ens, model_output_plot)
eahowerton commented 2 months ago

Noting this is related to https://github.com/Infectious-Disease-Modeling-Hubs/hubData/issues/26

eahowerton commented 1 month ago

New functions in hubUtils will be useful: https://github.com/Infectious-Disease-Modeling-Hubs/hubUtils/pull/150