Skip to contents

Works with output from `chlaa_forecast_scenarios_from_fit()`.

Usage

chlaa_plot_scenario_forecasts(
  forecast,
  var,
  type = c("absolute", "difference"),
  scenarios = NULL,
  include_baseline = NULL,
  facet = FALSE,
  show_mean = FALSE,
  data = NULL,
  data_time = "time",
  data_y = NULL
)

Arguments

forecast

Scenario forecast table.

var

Variable to plot (e.g. "cases", "inc_symptoms", "cum_deaths").

type

"absolute" for scenario trajectories, or "difference" for scenario minus baseline.

scenarios

Optional character vector of scenario names to include.

include_baseline

Include baseline scenario in the plot.

facet

If TRUE, facet by scenario; if FALSE, overlay scenarios.

show_mean

If TRUE, add a dashed mean line.

data

Optional observed data to overlay (only meaningful for type = "absolute").

data_time

Time column name in `data`.

data_y

Y column name in `data` (defaults to `var`).

Value

A ggplot object.