bic_to_bf | R Documentation |
The difference between two Bayesian information criterion (BIC) indices of
two models can be used to approximate Bayes factors via:
BF_{10} = e^{(BIC_0 - BIC_1)/2}
bic_to_bf(bic, denominator, log = FALSE)
bic |
A vector of BIC values. |
denominator |
The BIC value to use as a denominator (to test against). |
log |
If |
The Bayes Factors corresponding to the BIC values against the denominator.
Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p values. Psychonomic bulletin & review, 14(5), 779-804
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.