View source: R/marginal-distributions.R
marginal_inference | R Documentation |
Creates marginal model-averaged and conditional posterior distributions based on a list of models, vector of parameters, formula, and a list of indicators of the null or alternative hypothesis models for each parameter. Computes inclusion Bayes factors for each marginal estimate via a Savage-Dickey density approximation.
marginal_inference(
model_list,
marginal_parameters,
parameters,
is_null_list,
formula,
null_hypothesis = 0,
normal_approximation = FALSE,
n_samples = 10000,
seed = NULL,
silent = FALSE
)
model_list |
list of models, each of which contains marginal
likelihood estimated with bridge sampling |
marginal_parameters |
parameters for which the the marginal summary should be created |
parameters |
all parameters included in the model_list that are
relevant for the formula (all of which need to have specification of
|
is_null_list |
list with entries for each parameter carrying either logical vector of indicators specifying whether the model corresponds to the null or alternative hypothesis (or an integer vector indexing models corresponding to the null hypothesis) |
formula |
model formula (needs to be specified if |
null_hypothesis |
point null hypothesis to test. Defaults to |
normal_approximation |
whether the height of prior and posterior density should be
approximated via a normal distribution (rather than kernel density). Defaults to |
n_samples |
number of samples to be drawn for the model-averaged posterior distribution |
seed |
seed for random number generation |
silent |
whether warnings should be returned silently. Defaults to |
mix_posteriors
returns a named list of mixed posterior
distributions (either a vector of matrix).
ensemble_inference mix_posteriors BayesTools_ensemble_tables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.