Create reports of Bayes factors for model comparison.
Arguments
- x
Object of class
bayesfactor_inclusion
.- interpretation
Effect size interpretation set of rules (see interpret_bf).
- exact
Should very large or very small values be reported with a scientific format (e.g., 4.24e5), or as truncated values (as "> 1000" and "< 1/1000").
- protect_ratio
Should values smaller than 1 be represented as ratios?
- ...
Arguments passed to or from other methods.
Value
An object of class report()
.
See also
Specific components of reports (especially for stats models):
Other types of reports:
Methods:
Template file for supporting new models:
Examples
library(report)
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)
if (require("bayestestR")) {
# Bayes factor - models
BFmodels <- bayesfactor_models(mo1, mo2, mo3, denominator = mo0)
r <- report(BFmodels)
r
as.data.frame(r)
# Bayes factor - inclusion
inc_bf <- bayesfactor_inclusion(BFmodels, prior_odds = c(1, 2, 3), match_models = TRUE)
r <- report(inc_bf)
r
as.data.frame(r)
}
#> Loading required package: bayestestR
#> Terms | Pr(prior) | Pr(posterior) | Inclusion BF
#> ---------------------------------------------------------------
#> Species | 0.43 | 0.95 | 128.00
#> Petal.Length | 0.29 | 0.95 | 61.80
#> Petal.Length:Species | 0.43 | 0.05 | 1/-3.05e-01
#>
#> Across matched models only.
#> With custom prior odds of [1, 2, 3].