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(), andplot_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.
See also
Functions used for postprocessing of model fits
convert_to_stanfit(),
extract_draws(),
extract_forecast_dates(),
fv_extract_forecast(),
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
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)
}