Extracts transformed parameters from the prior part of a 'JAGS' model inside of a 'bridgesampling' function (returns them as a named list)
JAGS_marglik_parameters(samples, prior_list)
JAGS_marglik_parameters_formula(
samples,
formula_data_list,
formula_prior_list,
prior_list_parameters
)
samples provided by bridgesampling function
named list of prior distribution
(names correspond to the parameter names) of parameters not specified within the
formula_list
named list of data frames containing data for each formula (names of the lists correspond to the parameter name created by each of the formula)
named list of named lists of prior distributions
(names of the lists correspond to the parameter name created by each of the formula and
the names of the prior distribution correspond to the parameter names) of parameters specified
within the formula
named list of prior distributions on model parameters (not specified within the formula but that might scale the formula parameters)
JAGS_marglik_parameters
returns a named list
of (transformed) posterior samples.