Raw File
Tip revision: 053d5208164a7eccb0edff2752c83e3a99c8f69d authored by Dominique Makowski on 07 April 2023, 14:20:02 UTC
version 0.13.1
Tip revision: 053d520
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bic_to_bf.R
\title{Convert BIC indices to Bayes Factors via the BIC-approximation method.}
bic_to_bf(bic, denominator, log = FALSE)
\item{bic}{A vector of BIC values.}

\item{denominator}{The BIC value to use as a denominator (to test against).}

\item{log}{If \code{TRUE}, return the \code{log(BF)}.}
The Bayes Factors corresponding to the BIC values against the denominator.
The difference between two Bayesian information criterion (BIC) indices of
two models can be used to approximate Bayes factors via:
\deqn{BF_{10} = e^{(BIC_0 - BIC_1)/2}}{BF10 = exp((BIC0-BIC1)/2)}
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)
Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p values. Psychonomic bulletin & review, 14(5), 779-804
back to top