apa_print.BFBayesFactor: Format Bayes factors (APA 6th edition)

Description Usage Arguments Details Value References See Also Examples

View source: R/apa_print_BFBayesFactor.R

Description

These methods take result objects from the BayesFactor package to create formatted character strings to report the results in accordance with APA manuscript guidelines. These methods are not properly tested and should be considered experimental.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## S3 method for class 'BFBayesFactor'
apa_print(
  x,
  iterations = 10000,
  central_tendency = median,
  hdi = 0.95,
  standardized = FALSE,
  ratio_subscript = "10",
  auto_invert = TRUE,
  scientific = TRUE,
  max = 1000,
  min = 1/max,
  evidential_boost = NULL,
  ...
)

## S3 method for class 'BFBayesFactorTop'
apa_print(x, ...)

## S3 method for class 'BFBayesFactorList'
apa_print(x, ...)

## S4 method for signature 'BFBayesFactor'
apa_print(
  x,
  iterations = 10000,
  central_tendency = median,
  hdi = 0.95,
  standardized = FALSE,
  ratio_subscript = "10",
  auto_invert = TRUE,
  scientific = TRUE,
  max = 1000,
  min = 1/max,
  evidential_boost = NULL,
  ...
)

## S4 method for signature 'BFBayesFactorTop'
apa_print(x, ...)

## S4 method for signature 'BFBayesFactorList'
apa_print(x, ...)

Arguments

x

Output object. See details.

iterations

Numeric. Number of iterations of the MCMC sampler to estimate HDIs from the posterior.

central_tendency

Function to calculate central tendency of MCMC samples to obtain a point estimate from the posterior.

hdi

Numeric. A single value (range [0, 1]) giving the credibility level of the HDI.

standardized

Logical. Indicates whether to return standardized or unstandardized effect size estimates.

ratio_subscript

Character. A brief description of the model comparison in the form of "M1/M2".

auto_invert

Logical. Indicates whether the Bayes factor should be inverted (including ratio_subscript) if it is less than 1.

scientific

Logical. Indicates whether to use scientific notation.

max

Numeric. Upper limit of the Bayes factor before switching to scientific notation.

min

Numeric. Lower limit of the Bayes factor before switching to scientific notation.

evidential_boost

Numeric. Vector of the same length as x containing evidential boost factors for the corresponding models (see details).

...

Arguments passed on to printnum.numeric

gt1

Logical. Indicates if the absolute value of the statistic can, in principal, greater than 1.

zero

Logical. Indicates if the statistic can, in principal, be 0.

na_string

Character. String to print if element of x is NA.

use_math

Logical. Indicates whether to insert $ into the output so that Inf or scientific notation is rendered correctly.

add_equals

Logical. Indicates if the output string should be prepended with an equals sign.

Details

For models with order restrictions, evidential boosts can be calculated based on the prior and posterior odds of the restriction (Morey & Wagenmakers, 2014). If evidential boost factors are passed to evidential_boost they are multiplied with the corresponding Bayes factor before the results are formatted.

Value

...

References

Morey, R. D., & Wagenmakers, E.-J. (2014). Simple relation between Bayesian order-restricted and point-null hypothesis tests. Statistics & Probability Letters, 92, 121–124. doi: 10.1016/j.spl.2014.05.010

See Also

Other apa_print: apa_print.aov(), apa_print.emmGrid(), apa_print.glht(), apa_print.glm(), apa_print.htest(), apa_print.list(), apa_print()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(sleep)
bayesian_anova <- anovaBF(
  extra ~ group + ID
  , data = sleep
  , whichRandom = "ID"
  , progress=FALSE
)

apa_print(bayesian_anova)

## End(Not run)

crsh/papaja documentation built on Sept. 26, 2020, 10:58 a.m.