inclusion_BF {BayesTools}R Documentation

Compute inclusion Bayes factors

Description

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.

Usage

inclusion_BF(prior_probs, post_probs, margliks, is_null)

Arguments

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)

Details

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.

Value

inclusion_BF returns a Bayes factor.


[Package BayesTools version 0.2.17 Index]