marginal_posterior {BayesTools} | R Documentation |
Model-average marginal posterior distributions
Description
Creates marginal model-averages posterior distributions for a given parameter based on model-averaged posterior samples and parameter name (and formula with at specification).
Usage
marginal_posterior(
samples,
parameter,
formula = NULL,
at = NULL,
prior_samples = FALSE,
use_formula = TRUE,
transformation = NULL,
transformation_arguments = NULL,
transformation_settings = FALSE,
n_samples = 10000,
...
)
Arguments
samples |
model-averaged posterior samples created by |
parameter |
parameter of interest |
formula |
model formula (needs to be specified if |
at |
named list with predictor levels of the formula for which marginalization
should be performed. If a predictor level is missing, |
prior_samples |
whether marginal prior distributions should be generated
|
use_formula |
whether the parameter should be evaluated as a part of supplied formula |
transformation |
transformation to be applied to the prior distribution. Either a character specifying one of the prepared transformations:
, or a list containing the transformation function |
transformation_arguments |
a list with named arguments for
the |
transformation_settings |
boolean indicating whether the
settings the |
n_samples |
number of samples to be drawn for the model-averaged posterior distribution |
... |
additional arguments |
Value
marginal_posterior
returns a named list of mixed marginal posterior
distributions (either a vector of matrix).
#'