R/JAGS-bridge-posterior.R
JAGS_bridgesampling_posterior.Rdprepares posterior distribution for 'bridgesampling' by removing unnecessary parameters and attaching lower and upper bounds of parameters based on a list of prior distributions.
JAGS_bridgesampling_posterior(
posterior,
prior_list,
add_parameters = NULL,
add_bounds = NULL
)matrix of mcmc samples from the posterior distribution.
named list of prior distributions. Names correspond to parameter names owned by BayesTools priors and determine the posterior columns retained for bridge sampling together with their bounds.
character vector of additional monitored posterior parameter names to retain in addition to the prior-owned parameters. These parameters are passed through as named entries and must be indexed by name by downstream likelihood code.
list with two named numeric vectors, "lb" and
"ub", containing lower and upper bounds for every
add_parameters entry. The vectors are named by the
add_parameters entries (every entry, no others), contain no
NA, and satisfy lb < ub; -Inf and Inf are
allowed. Must be supplied whenever add_parameters is non-empty.
JAGS_bridgesampling_posterior returns a matrix of
posterior samples with 'lb' and 'ub' attributes carrying the
lower and upper boundaries.