mix_posteriorsCreates a model-averages posterior distributions on a single model that allows mimicking the mix_posteriors functionality. This function is useful when the model-averaged ensemble is based on prior_spike_and_slab or prior_mixture priors - the model-averaging is done within the model.
as_mixed_posteriors(
model,
parameters,
conditional = NULL,
conditional_rule = "AND",
force_plots = FALSE,
transform_scaled = FALSE,
n_prior_samples = 10000
)as_mix_posteriors returns a named list of mixed posterior
distributions (either a vector of matrix).
model fit via the JAGS_fit function
vector of parameters names for which inference should be drawn
a character vector of parameters to be conditioned on
a character string specifying the rule for conditioning. Either "AND" or "OR". Defaults to "AND".
temporal argument allowing to generate conditional posterior samples suitable for prior and posterior plots. Only available when conditioning on a single parameter.
whether to transform samples from standardized (scaled) to
original (unscaled) scale. When TRUE, posterior samples are
transformed, and the result can be directly passed to plot_posterior which will
automatically detect the transformation and use transformed deterministic prior densities.
Requires a model fitted with formula_scale_list. Defaults to FALSE.
controls the numerical grid used for transformed
prior densities when transform_scaled = TRUE. Defaults to 10000.
mix_posteriors