Skip to contents

Default posterior plot

Usage

plot_default(
  posterior,
  target,
  obs = NULL,
  forecast_dates = NULL,
  central = FALSE,
  all_obs = FALSE,
  ...
)

Arguments

posterior

A dataframe of posterior output as produced by fv_tidy_posterior(). For forecast dates to be extracted data with value_type == "cases" must be present.

target

A character string indicating which variable to extract from the posterior list.

obs

A data frame of observed data as produced by latest_obs().

forecast_dates

A data.frame in the format produced by extract_forecast_dates() (with at least a date variable and a Data unavailable variable)). Specifies when date availability should be add to plots. May contain faceting variables.

central

Logical, defaults to FALSE. Should the mean and median central estimates be plot as dashed and solid lines respectively. Requires mean and median variables to be present in the input.

all_obs

Logical, defaults to FALSE. Should all observations be plot or just those in the date range of the estimates being plot.

...

Additional arguments passed to ggplot2::aes()

Value

A ggplot2 plot.