multibridge (version 1.1.0)

bayes_factor: S3 method for class 'bayes_factor.bmult'

Description

Extracts information about computed Bayes factors from object of class bmult

Usage

bayes_factor(x)

Value

Returns list with three data.frames. The first dataframe bf_table summarizes information the Bayes factor for equality and inequality constraints. The second dataframe error_measures contains for the overall Bayes factor the approximate relative mean-squared error re2, the approximate coefficient of variation cv, and the approximate percentage error percentage. The third dataframe $bf_ineq_table summarized information about the Bayes factor for inequality constraints, that is, the log marginal likelihood estimates for the constrained prior and posterior distribution. In addition, it contains for each independent Bayes factor the approximate relative mean-squared error re2

Arguments

x

object of class bmult as returned from mult_bf_informed or binom_bf_informed or an object of class bmult_bridge as returned from mult_bf_inequality or binom_bf_inequality

Examples

Run this code
# 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')

## Multinomial Case
out_mult  <- mult_bf_informed(x=x, Hr=Hr, a=a, factor_levels=factor_levels,
niter=1e3, seed=2020)
bayes_factor(out_mult)

Run the code above in your browser using DataLab