ensemble_inference {BayesTools} | R Documentation |
Compute posterior probabilities and inclusion Bayes factors
Description
Computes prior probabilities, posterior probabilities, and inclusion Bayes factors based either on (1) a list of models, vector of parameters, and a list of indicators the models represent the null or alternative hypothesis for each parameter, (2) on prior model odds, marginal likelihoods, and indicator whether the models represent the null or alternative hypothesis, or (3) list of models for each model.
Usage
compute_inference(prior_weights, margliks, is_null = NULL, conditional = FALSE)
ensemble_inference(model_list, parameters, is_null_list, conditional = FALSE)
models_inference(model_list)
Arguments
prior_weights |
vector of prior model odds |
margliks |
vector of marginal likelihoods |
is_null |
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 |
model_list |
list of models, each of which contains marginal
likelihood estimated with bridge sampling |
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) |
Value
compute_inference
returns a named list of prior probabilities,
posterior probabilities, and Bayes factors, ppoint
gives the
distribution function, ensemble_inference
gives a list of named lists of
inferences for each parameter, and models_inference
returns a list of
models, each expanded by the inference list.
See Also
mix_posteriors BayesTools_ensemble_tables