Skip to contents

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.