Plot samples from the marginal posterior distributions
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(),
legend = TRUE,
legend_title = NULL,
legend_labels = NULL,
legend_position = NULL,
...
)plot_marginal returns either NULL or
an object of class 'ggplot' if plot_type is plot_type = "ggplot".
samples from a posterior distribution for a parameter generated by marginal_inference.
parameter name to be plotted.
whether to use a base plot "base"
or ggplot2 "ggplot" for plotting.
whether prior distribution should be added to the figure.
When samples were prepared with as_mixed_posteriors(..., transform_scaled = TRUE),
the transformed prior samples are automatically used.
number of equally spaced points
in the x_range if x_seq is unspecified
transformation to be applied to the prior distribution. Either a character specifying one of the prepared transformations:
linear transformation in form of a + b*x
hyperbolic tangent transformation
exponential transformation
, or a list containing the transformation function fun,
inverse transformation function inv, and derivative of the
transformation jac, evaluated on the original support. See examples
for details.
a list with named arguments for
the transformation
boolean indicating whether the
settings the x_seq or x_range was specified on
the transformed support
allows to rescale x-axis in case a weightfunction is plotted.
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.
additional arguments for the prior distribution plot
whether factor legends should be drawn.
optional title for factor legends.
optional labels for factor legend levels.
optional legend position for factor legends.
additional arguments
prior() marginal_inference() plot_posterior()