bridge_output | R Documentation |
bridge_output.bmult
Extracts bridge sampling output from object of class bmult
bridge_output(x)
x |
object of class |
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
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.