Learn R Programming

BayesTools (version 0.3.0)

plot_transformed_prior: Plot Transformed Prior Densities

Description

Plots a prior density after applying the same deterministic coefficient transformation used for formula-scale back-transforms. The helper supports continuous densities and point-mass priors in the same plot.

Usage

plot_transformed_prior(
  prior_list,
  column_names,
  formula_scale = NULL,
  parameter,
  n_points = 1000,
  x_range = NULL,
  transformation = NULL,
  transformation_arguments = NULL,
  transformation_settings = FALSE,
  plot_type = c("base", "ggplot"),
  par_name = NULL,
  ...
)

Value

For plot_type = "base", invisibly returns base-plot metadata. For plot_type = "ggplot", returns a ggplot object. Returns NULL when the requested parameter is an identity transform and no output transformation was requested.

Arguments

prior_list

named list of prior distributions.

column_names

character vector of coefficient column names defining the fitted parameter space.

formula_scale

optional nested formula-scale metadata, in the same shape as attr(fit, "formula_scale").

parameter

coefficient name to plot.

n_points

number of plotting points.

x_range

optional plotting range on the untransformed scale.

transformation

optional output transformation passed to the prior plotting machinery.

transformation_arguments

optional list of transformation arguments.

transformation_settings

whether x_range is supplied on the transformed scale.

plot_type

either "base" or "ggplot".

par_name

optional plotting label.

...

additional plotting arguments.

See Also

plot_prior_list() transform_scale_samples()