# NOT RUN {
library(bayestestR)
# Using bayesfactor_models:
# ------------------------------
mo0 <- lm(Sepal.Length ~ 1, data = iris)
mo1 <- lm(Sepal.Length ~ Species, data = iris)
mo2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris)
mo3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris)
BFmodels <- bayesfactor_models(mo1, mo2, mo3, denominator = mo0)
bayesfactor_inclusion(BFmodels)
# }
# NOT RUN {
# BayesFactor
# -------------------------------
library(BayesFactor)
BF <- generalTestBF(len ~ supp * dose, ToothGrowth, progress = FALSE)
bayesfactor_inclusion(BF)
# compare only matched models:
bayesfactor_inclusion(BF, match_models = TRUE)
# }
Run the code above in your browser using DataLab