link_obs_with_posterior: Link posterior estimates with observed data

link_obs_with_posteriorR Documentation

Link posterior estimates with observed data

Description

Link posterior estimates with observed data and flag if values are observed or not.

Usage

link_obs_with_posterior(posterior, obs, horizon, target_types)

Arguments

posterior

A data frame of summarised posterior estimates as returned by cmdstanr::summary() with an additional type variable which contains the following character string options: "non-VOC", "VOC", "Combined", "Overall".

obs

Numeric vector of observed data to link to posterior estimates.

horizon

Integer indicating the horizon of unobserved forecasts. If not specified will be inferred from obs.

target_types

A character vector of types (as specified in the type variable) to modify.

Value

The input data.frame combined with obs and observed variables.

See Also

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


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