inclusion_BF {BayesTools} | R Documentation |
Computes inclusion Bayes factors based on prior model probabilities, posterior model probabilities (or marginal likelihoods), and indicator whether the models represent the null or alternative hypothesis.
inclusion_BF(prior_probs, post_probs, margliks, is_null)
prior_probs |
vector of prior model probabilities |
post_probs |
vector of posterior model probabilities |
margliks |
vector of marginal likelihoods. |
is_null |
logical vector of indicators whether the model corresponds to the null or alternative hypothesis (or an integer vector indexing models corresponding to the null hypothesis) |
Supplying margliks
as the input is preferred since it is better at dealing with
under/overflow (posterior probabilities are very close to either 0 or 1). In case that both the
post_probs
and margliks
are supplied, the results are based on margliks
.
inclusion_BF
returns a Bayes factor.