papaja (version 0.1.0.9842)

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

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

apa_print.BFBayesFactor(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, ...)

apa_print.BFBayesFactorTop(x, ...)

apa_print.BFBayesFactorList(x, ...)

# S4 method for 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 BFBayesFactorTop apa_print(x, ...)

# S4 method for 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.

Value

...

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.

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

Run this code
# NOT RUN {
data(sleep)
bayesian_anova <- anovaBF(
  extra ~ group + ID
  , data = sleep
  , whichRandom = "ID"
  , progress=FALSE
)

apa_print(bayesian_anova)
# }

Run the code above in your browser using DataCamp Workspace