Creates 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
)

Arguments

model

model fit via the JAGS_fit function

parameters

vector of parameters names for which inference should be drawn

conditional

a character vector of parameters to be conditioned on

conditional_rule

a character string specifying the rule for conditioning. Either "AND" or "OR". Defaults to "AND".

force_plots

temporal argument allowing to generate conditional posterior samples suitable for prior and posterior plots. Only available when conditioning on a single parameter.

Value

as_mix_posteriors returns a named list of mixed posterior distributions (either a vector of matrix).

See also