Skip to contents

A generic wrapper around posterior::summarise_draws() with opinionated defaults. See fv_tidy_posterior() for a more opinionated wrapper with further cleaning and tidying including linking to observed data, tidying parameter names, and transforming parameters for interpretability.

Usage

fv_posterior(fit, probs = c(0.05, 0.2, 0.8, 0.95), digits = 3, ...)

Arguments

fit

List of output as returned by fv_sample().

probs

A vector of numeric probabilities to produce quantile summaries for. By default these are the 5%, 20%, 80%, and 95% quantiles which are also the minimum set required for plotting functions to work (such as plot_cases(), plot_rt(), and plot_voc_frac()).

digits

Numeric, defaults to 3. Number of digits to round summary statistics to.

...

Additional arguments that may be passed but will not be used.

Value

A dataframe summarising the model posterior.

Examples

if (FALSE) { # interactive()
options(mc.cores = 4)
obs <- filter_by_availability(
  germany_covid19_delta_obs,
  date = as.Date("2021-06-12"),
)
dt <- fv_as_data_list(obs)
inits <- fv_inits(dt)
fit <- fv_sample(dt, init = inits, adapt_delta = 0.99, max_treedepth = 15)
fv_posterior(fit)
}