Compute the set of forecasts present for a given value of a given column.
Source:R/filter_to_subset_forecasts.R
get_subset_forecasts.Rd
Compute the set of forecasts present for a given value of a given column.
Arguments
- tbl
Table of forecasts or scores to filter, as a valid input to
scoringutils::get_forecast_unit()
.- comparator_value
Character scalar of comparator values for which to compute shared forecasts.
- compare
Name of the column containing the comparator values. Default
"model"
.
Value
Table of forecast unit values for all and only the subset
forecasts, which can be joined to the original table for filtering
purposes (see filter_to_subset_forecasts()
).
Examples
get_subset_forecasts(scoringutils::example_quantile, "EuroCOVIDhub-ensemble")
#> # A tibble: 256 × 6
#> location target_end_date target_type location_name forecast_date horizon
#> <chr> <date> <chr> <chr> <date> <dbl>
#> 1 DE 2021-05-08 Cases Germany 2021-05-03 1
#> 2 DE 2021-05-08 Deaths Germany 2021-05-03 1
#> 3 DE 2021-05-15 Cases Germany 2021-05-03 2
#> 4 DE 2021-05-15 Cases Germany 2021-05-10 1
#> 5 DE 2021-05-15 Deaths Germany 2021-05-03 2
#> 6 DE 2021-05-15 Deaths Germany 2021-05-10 1
#> 7 DE 2021-05-22 Cases Germany 2021-05-03 3
#> 8 DE 2021-05-22 Cases Germany 2021-05-10 2
#> 9 DE 2021-05-22 Cases Germany 2021-05-17 1
#> 10 DE 2021-05-22 Deaths Germany 2021-05-03 3
#> # ℹ 246 more rows