View source: R/marginal-distributions.R
as_marginal_inference | R Documentation |
marginal_inference
Creates marginal model-averaged and conditional posterior distributions based on a BayesTools JAGS model, vector of parameters, formula, and a list of conditional specifications for each parameter. Computes inclusion Bayes factors for each marginal estimate via a Savage-Dickey density approximation.
as_marginal_inference(
model,
marginal_parameters,
parameters,
conditional_list,
conditional_rule,
formula,
null_hypothesis = 0,
normal_approximation = FALSE,
n_samples = 10000,
silent = FALSE,
force_plots = FALSE
)
model |
model fit via the JAGS_fit function |
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
|
conditional_list |
list of conditional parameters for each marginal parameter |
conditional_rule |
a character string specifying the rule for conditioning. Either "AND" or "OR". Defaults to "AND". |
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 prior distribution |
silent |
whether warnings should be returned silently. Defaults to |
force_plots |
temporal argument allowing to generate conditional posterior samples suitable for prior and posterior plots. Only available when conditioning on a single parameter. |
as_marginal_inference
returns an object of class 'marginal_inference'.
marginal_inference as_mixed_posteriors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.