Generate sample trajectories based on ranked base forecasts
Source:R/simple_bottom_up.R
sample_aggregated_trajectories.Rd
This function takes in a set of copula samples, ranked base forecasts, and column names to generate sampled trajectories for each location and then sum aggregate by date over locations.
Usage
sample_aggregated_trajectories(
base_forecasts,
samples,
ranked_base_forecasts,
number_of_sampled_trajs,
location_col,
draw_col,
date_col,
value_to_aggregate_col
)
Arguments
- base_forecasts
A data frame containing the base forecasts.
- samples
A tibble containing the samples from a copula by location.
- ranked_base_forecasts
A tibble containing the ranked base forecasts
- number_of_sampled_trajs
A tibble containing the number of samples per forecast trajectory for each location.
- location_col
The name of the column representing the location
- draw_col
The name of the column representing the draw
- date_col
The name of the column representing the date
- value_to_aggregate_col
The name of the column representing the value to aggregate