inclusion_BF: Compute inclusion Bayes factors

View source: R/model-averaging.R

inclusion_BFR 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.


BayesTools documentation built on July 26, 2023, 5:37 p.m.