Methods defined for objects returned from the ab_test
function.
# S3 method for ab
summary(object, digits = 3, raw = FALSE, ...)# S3 method for summary.ab
print(x, ...)
# S3 method for ab
print(x, ...)
# S3 method for ab
plot(x, ...)
object of class ab
as returned from
ab_test
.
number of digits to print for the summary.
if TRUE
, the raw posterior samples are used to estimate the
mean, sd, and quantiles for the summary of the posterior. If FALSE
,
parametric fits to the marginal posteriors are used to obtain the mean, sd,
and quantiles. Specifically, a normal distribution is fitted for psi
(logor)
and beta
; a log-normal distribution is fitted for or
and rrisk
; beta distributions are fitted for p1
and
p2
; a scaled beta distribution is fitted for arisk
. These
distributional fits are also used in plot_posterior
.
further arguments, currently ignored.
The print
methods prints the Bayes factors, prior
probabilities of the hypotheses, and posterior probabilities of the
hypotheses (and returns nothing).
The plot
method visualizes the prior probabilities of the hypotheses
and posterior probabilities of the hypotheses (the next plots is obtained
by hitting Return) using the prob_wheel
function.
The summary
methods returns the ab
object that is guaranteed
to contain posterior samples (i.e., it adds posterior samples if they were
not included already). Additionally, it adds to the object a posterior
summary matrix (i.e., ab$post$post_summary
) for the posterior under
H1 and the arguments digits
(used for printing) and raw
(added to ab$input
).