bridge_output: S3 method for class 'bridge_output.bmult'

bridge_outputR Documentation

S3 method for class bridge_output.bmult

Description

Extracts bridge sampling output from object of class bmult

Usage

bridge_output(x)

Arguments

x

object of class bmult as returned from mult_bf_informed or binom_bf_informed

Value

Extracts output related to the bridge sampling routine. The output contains the following elements::

$eval
  • q11: log prior or posterior evaluations for prior or posterior samples

  • q12: log proposal evaluations for prior or posterior samples

  • q21: log prior or posterior evaluations for samples from proposal

  • q22: log proposal evaluations for samples from proposal

$niter

number of iterations of the iterative updating scheme

$logml

estimate of log marginal likelihood

$hyp

evaluated inequality constrained hypothesis

$error_measures
  • re2: the approximate relative mean-squared error for the marginal likelihood estimate

  • cv: the approximate coefficient of variation for the marginal likelihood estimate (assumes that bridge estimate is unbiased)

  • percentage: the approximate percentage error of the marginal likelihood estimate

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

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

multibridge documentation built on Nov. 1, 2022, 5:05 p.m.