Plot interval width

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

Arguments

predictions_cards

tibble of predictions that are all for the same prediction task, meaning they are for the same response, incidence period,and geo type. Forecasts may be for a different forecast date or forecaster. A predictions card may be created by the function get_predictions(), downloaded with get_covidhub_predictions() or possibly created manually. Alternatively, any data frame with columns quantile, value and any grouping vars and averaging vars.

facet_rows

A variable name to facet data over. Creates a separate row of plots for each value of specified variable. Can be used with facet_cols to create a grid of plots. Should be passed to plot_calibration when customized.

facet_cols

Same as facet_rows, but with columns.

grp_vars

variables over which to compare widths The first determines the color of the lines while the rest will be faceted over

avg_vars

variables over which we compute quantiles.

levels

Quantile levels for the summary of interval width, to be plotted. For example, levels = c(0.5, 0.7, 0.9), the default, plots the median, 70% and 90% quantiles of interval widths.

Details

Interval width does not depend on the actual outcome, so this function can be called on predictions cards in addition to score cards.