# NOT RUN {
# setup
set.seed(123)
# between-subjects -------------------------------------------------------
# to get dataframe
bf_oneway_anova(
data = iris,
x = Species,
y = Sepal.Length,
bf.prior = 0.8,
output = "dataframe"
)
# within-subjects -------------------------------------------------------
# to get expression (needs `BayesFactor 0.9.12-4.3`)
if (utils::packageVersion("BayesFactor") >= package_version("0.9.12-4.3")) {
bf_oneway_anova(
data = bugs_long,
x = condition,
y = desire,
subject.id = subject,
paired = TRUE,
output = "expression"
)
}
# }
Run the code above in your browser using DataLab