bic_to_bf: Convert BIC indices to Bayes Factors via the...

Description Usage Arguments Value Examples

View source: R/bic_to_bf.R

Description

Convert BIC indices to Bayes Factors via the BIC-approximation method.

Usage

1
bic_to_bf(bic, denominator, log = FALSE)

Arguments

bic

A vector of BIC values.

denominator

The BIC value to use as a denominator (to test against).

log

Return the log(BF)?

Value

The Bayes Factors corresponding to the BIC values against the denominator.

Examples

1
2
3
4
5
6
bic1 <- BIC(lm(Sepal.Length ~ 1, data = iris))
bic2 <- BIC(lm(Sepal.Length ~ Species, data = iris))
bic3 <- BIC(lm(Sepal.Length ~ Species + Petal.Length, data = iris))
bic4 <- BIC(lm(Sepal.Length ~ Species * Petal.Length, data = iris))

bic_to_bf(c(bic1, bic2, bic3, bic4), denominator = bic1)

DominiqueMakowski/bayestestR documentation built on July 27, 2021, 4:12 p.m.