plot_marginal {BayesTools} | R Documentation |
Plot samples from the marginal posterior distributions
Description
Plot samples from the marginal posterior distributions
Usage
plot_marginal(
samples,
parameter,
plot_type = "base",
prior = FALSE,
n_points = 1000,
transformation = NULL,
transformation_arguments = NULL,
transformation_settings = FALSE,
rescale_x = FALSE,
par_name = NULL,
dots_prior = list(),
...
)
Arguments
samples |
samples from a posterior distribution for a parameter generated by marginal_inference. |
parameter |
parameter name to be plotted. |
plot_type |
whether to use a base plot |
prior |
whether prior distribution should be added to the figure |
n_points |
number of equally spaced points
in the |
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 |
rescale_x |
allows to rescale x-axis in case a weightfunction is plotted. |
par_name |
a type of parameter for which the prior is specified. Only relevant if the prior corresponds to a mu parameter that needs to be transformed. |
dots_prior |
additional arguments for the prior distribution plot |
... |
additional arguments |
Value
plot_marginal
returns either NULL
or
an object of class 'ggplot' if plot_type is plot_type = "ggplot"
.
See Also
prior()
marginal_inference()
plot_posterior()