Learn R Programming

report (version 0.1.0)

report.bayesfactor_models: Models' Bayes factor Report

Description

Create a report of Bayes factors for model comparison.

Usage

# S3 method for bayesfactor_models
report(model, interpretation = "jeffreys1961", ...)

# S3 method for bayesfactor_inclusion report(model, interpretation = "jeffreys1961", ...)

Arguments

model

Object of class bayesfactor_inclusion.

interpretation

Effect size interpretation set of rules (see interpret_bf).

...

Arguments passed to or from other methods.

Value

A list-object of class report, which contains further list-objects with a short and long description of the model summary, as well as a short and long table of parameters and fit indices.

See Also

table_short or text_short to access the related content of the report-object.

Examples

Run this code
# NOT RUN {
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
  table_short(r)

  # Bayes factor - inclusion
  inc_bf <- bayesfactor_inclusion(BFmodels, prior_odds = c(1, 2, 3), match_models = TRUE)

  r <- report(inc_bf)
  r
  table_short(r)
}
# }

Run the code above in your browser using DataLab