View source: R/report.bayesfactor_models.R
report.bayesfactor_models | R Documentation |
Create reports of Bayes factors for model comparison.
## S3 method for class 'bayesfactor_models'
report(
x,
interpretation = "jeffreys1961",
exact = TRUE,
protect_ratio = TRUE,
...
)
## S3 method for class 'bayesfactor_inclusion'
report(
x,
interpretation = "jeffreys1961",
exact = TRUE,
protect_ratio = TRUE,
...
)
x |
Object of class |
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. |
An object of class report()
.
Specific components of reports (especially for stats models):
report_table()
report_parameters()
report_statistics()
report_effectsize()
report_model()
report_priors()
report_random()
report_performance()
report_info()
report_text()
Other types of reports:
report_system()
report_packages()
report_participants()
report_sample()
report_date()
Methods:
as.report()
Template file for supporting new models:
report.default()
library(bayestestR)
# Bayes factor - 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)
r <- report(BFmodels)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.