Skip to contents

Plot a forecast summary

Usage

chlaa_plot_forecast(
  forecast,
  var,
  data = NULL,
  data_time = "time",
  data_y = NULL,
  show_mean = FALSE
)

Arguments

forecast

Output from `chlaa_forecast_from_fit()`.

var

Variable to plot.

data

Optional observed data frame (must have a time column and a matching y column).

data_time

Column name for time in `data`.

data_y

Column name for y in `data`. If NULL, uses `var`.

show_mean

Plot mean line as well as median.

Value

A ggplot object.