Summarize forecast interval widths

compute_width(
  predictions_cards,
  grp_vars = c("forecaster", "forecast_date", "ahead"),
  avg_vars = c("geo_value"),
  levels = c(0.5, 0.7, 0.9)
)

Arguments

predictions_cards

predictions cards (or a data frame with columns quantile, value and any grouping vars and averaging vars)

grp_vars

variables over which to compare widths

avg_vars

variables over which we compute quantiles.

levels

Quantile levels to summarize the interval widths. For example, levels = c(0.5, 0.7, 0.9), the default, computes the median, 70% and 90% quantiles of interval widths within each combination of grp_vars over the avg_vars

Value

a summarized data frame (by grp_vars)