summary.bmult {multibridge} | R Documentation |
summary method for class bmult
Description
Summarizes results from Bayes factor analysis
Usage
## S3 method for class 'bmult'
summary(object, ...)
Arguments
object |
object of class |
... |
additional arguments, currently ignored |
Value
Invisibly returns a list
which contains the Bayes factor and associated hypotheses for the full
model, but also the separate for the independent equality and inequality constraints.
The summary method returns a list
with the following elements:
$hyp
Vector containing the informed hypothesis as specified by the user
$bf
Contains Bayes factor
$logmlHe
Contains log marginal likelihood of the encompassing model
$logmlH0
Contains log marginal likelihood of the null model
$logmlHr
Contains log marginal likelihood of the informed model
$re2
Contains relative mean-square error for the Bayes factor
$bf_type
Contains Bayes factor type as specified by the user
$cred_level
Credible interval for the posterior point estimates.
$prior
List containing the prior parameters.
$data
List containing the data.
$nr_equal
Number of independent equality-constrained hypotheses.
$nr_inequal
Number of independent inequality-constrained hypotheses.
$estimates
Parameter estimates for the encompassing model
-
factor_level
: Vector with category names -
alpha
: Vector with posterior concentration parameters of Dirichlet distribution (for multinomial models) or alpha parameters for independent beta distributions (for binomial models) -
beta
: Vector with beta parameters for independent beta distributions (for binomial models) -
lower
: Lower value of credible intervals of marginal beta distributions -
median
: Posterior median of marginal beta distributions -
upper
: Upper value of credible intervals of marginal beta distributions
-
Examples
# data
x <- c(3, 4, 10, 11)
n <- c(15, 12, 12, 12)
# priors
a <- c(1, 1, 1, 1)
b <- c(1, 1, 1, 1)
# informed hypothesis
factor_levels <- c('theta1', 'theta2', 'theta3', 'theta4')
Hr <- c('theta1', '<', 'theta2', '<', 'theta3', '<', 'theta4')
## Binomial Case
out_binom <- binom_bf_informed(x=x, n=n, Hr=Hr, a=a, b=b, niter=1e3,factor_levels, seed=2020)
summary(out_binom)
## Multinomial Case
out_mult <- mult_bf_informed(x=x, Hr=Hr, a=a, niter=1e3,factor_levels, seed=2020)
summary(out_mult)