ab-methods {abtest}R Documentation

Methods for ab objects

Description

Methods defined for objects returned from the ab_test function.

Usage

## S3 method for class 'ab'
summary(object, digits = 3, raw = FALSE, ...)

## S3 method for class 'summary.ab'
print(x, ...)

## S3 method for class 'ab'
print(x, ...)

## S3 method for class 'ab'
plot(x, ...)

Arguments

object, x

object of class ab as returned from ab_test.

digits

number of digits to print for the summary.

raw

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.

Value

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


[Package abtest version 1.0.1 Index]