Skip to contents

Validate the base forecasts tibble. This is aimed at, first, checking that columns exist as expected and, second, that it is possible to sample trajectories from the base forecast tibble by matching a draw index for each location along an ascending sequence of dates.

Usage

validate_base_forecasts(
  base_forecasts,
  cp,
  draw_col = ".draw",
  date_col = "date",
  value_to_aggregate_col = "hosp",
  rank_quantity_col = "hosp",
  location_col = "location"
)

Arguments

base_forecasts

The base forecasts tibble

cp

Base forecast sampling copula. This expects a copula object from the copula package, for example copula::normalCopula(0.5, dim = 53).

draw_col

String name of column for draws.

date_col

String name of column for dates.

value_to_aggregate_col

String name of column to make bottom-up aggregation on.

rank_quantity_col

String name of column to rank draw/location pair on.

location_col

String name of the location column.

Value

Nothing.