fv_extract_forecast: Extract forecasts from a summarised posterior

fv_extract_forecastR Documentation

Extract forecasts from a summarised posterior

Description

Uses the observed variable returned by fv_tidy_posterior() to return posterior predictions for forecast dates only.

Usage

fv_extract_forecast(posterior)

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.

Value

A data.frame of forecasts in the format returned by fv_tidy_posterior() but with fitting variables dropped.

See Also

Functions used for postprocessing of model fits convert_to_stanfit(), extract_draws(), extract_forecast_dates(), fv_posterior(), fv_tidy_posterior(), link_dates_with_posterior(), link_obs_with_posterior(), plot.fv_posterior(), print.fv_posterior(), quantiles_to_long(), summary.fv_posterior(), update_voc_label()

Examples

p <- fv_example(strains = 2, type = "posterior")

fv_extract_forecast(p)

epiforecasts/forecast.vocs documentation built on May 14, 2023, 2 p.m.