mix_posteriors {BayesTools}R Documentation

Model-average posterior distributions

Description

Model-averages posterior distributions based on a list of models, vector of parameters, and a list of indicators of the null or alternative hypothesis models for each parameter.

Usage

mix_posteriors(
  model_list,
  parameters,
  is_null_list,
  conditional = FALSE,
  seed = NULL,
  n_samples = 10000
)

Arguments

model_list

list of models, each of which contains marginal likelihood estimated with bridge sampling marglik and prior model odds prior_weights

parameters

vector of parameters names for which inference should be drawn

is_null_list

list with entries for each parameter carrying either logical vector of indicators specifying whether the model corresponds to the null or alternative hypothesis (or an integer vector indexing models corresponding to the null hypothesis)

conditional

whether prior and posterior model probabilities should be returned only for the conditional model. Defaults to FALSE

seed

integer specifying seed for sampling posteriors for model averaging. Defaults to NULL.

n_samples

number of samples to be drawn for the model-averaged posterior distribution

Value

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

See Also

ensemble_inference BayesTools_ensemble_tables


[Package BayesTools version 0.2.17 Index]