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.
# S3 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,
...
)# S3 method for BFBayesFactorTop
apa_print(x, ...)
# S3 method for BFBayesFactorList
apa_print(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, ...)
Output object. See details.
Numeric. Number of iterations of the MCMC sampler to estimate HDIs from the posterior.
Function to calculate central tendency of MCMC samples to obtain a point estimate from the posterior.
Numeric. A single value (range [0, 1]) giving the credibility level of the HDI.
Logical. Indicates whether to return standardized or unstandardized effect size estimates.
Character. A brief description of the model comparison in the form of "M1/M2"
.
Logical. Indicates whether the Bayes factor should be inverted (including ratio_subscript
) if it is less than 1.
Logical. Indicates whether to use scientific notation.
Numeric. Upper limit of the Bayes factor before switching to scientific notation.
Numeric. Lower limit of the Bayes factor before switching to scientific notation.
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.
...
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.
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
Other apa_print:
apa_print.aov()
,
apa_print.emmGrid()
,
apa_print.glht()
,
apa_print.glm()
,
apa_print.htest()
,
apa_print.list()
,
apa_print()
# 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 DataLab