Skip to contents

Plot interval coverage at specified ranges

Usage

forecast_interval_coverage_plot(
  forecasts,
  ranges,
  time_period,
  by = c("model", "horizon")
)

Arguments

forecasts

df of granular (daily) quantile forecasts, as the output of scoringutils::as_forecast_quantile().

ranges

A numeric vector of credible interval ranges to plot, spanning from 0 to 100.

time_period

string indicating time period of fig to save

by

Columns by which to stratify. Passed as the by argument to scoringutils::get_coverage(). Default c("model", "horizon").

Value

A ggplot2 object