report.bayesfactor_models: Reporting Models' Bayes Factor

View source: R/report.bayesfactor_models.R

report.bayesfactor_modelsR Documentation

Reporting Models' Bayes Factor

Description

Create reports of Bayes factors for model comparison.

Usage

## 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,
  ...
)

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):

  • 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()

Examples


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)


neuropsychology/report documentation built on April 3, 2024, 4:08 p.m.