Plot a list of prior distributions

plot_prior_list(
  prior_list,
  plot_type = "base",
  x_seq = NULL,
  xlim = NULL,
  x_range_quant = NULL,
  n_points = 500,
  n_samples = 10000,
  force_samples = FALSE,
  individual = FALSE,
  show_figures = if (individual) 1 else NULL,
  transformation = NULL,
  transformation_arguments = NULL,
  transformation_settings = FALSE,
  rescale_x = FALSE,
  par_name = NULL,
  prior_list_mu = NULL,
  effect_direction = "positive",
  legend = TRUE,
  legend_title = NULL,
  legend_labels = NULL,
  legend_position = NULL,
  ...
)

Arguments

prior_list

list of prior distributions

plot_type

whether to use a base plot "base" or ggplot2 "ggplot" for plotting.

x_seq

sequence of x coordinates

xlim

x plotting range

x_range_quant

quantile used for automatically obtaining x_range if both x_range and x_seq are unspecified. A number in the open interval (0, 0.5); other values are refused. Defaults to 0.005 for all but Cauchy, Student-t, Gamma, inverse-gamma, moment, and inverse-moment distributions that use 0.010.

n_points

number of equally spaced points in the x_range if x_seq is unspecified

n_samples

number of samples from the prior distribution if the density cannot be obtained analytically (or if samples are forced with force_samples = TRUE)

force_samples

should prior be sampled instead of obtaining analytic solution whenever possible. For supported ordered mixed measures, exact analytic curves and atoms are retained and the requested samples are attached to each component. Supported scalar ordered literal point totals and mixtures whose total components are all literal points do not sample, store draws, or advance the RNG when force_samples = FALSE. With force_samples = TRUE, their original seeded draws are attached without replacing the analytic measure. Other ordered families retain their existing sampling fallback.

individual

should individual densities be returned (e.g., in case of weightfunction)

show_figures

which figures should be returned in case of multiple plots are generated. Useful when priors for the omega parameter are plotted and individual = TRUE. For weight functions plotted individually by plot.prior() and plot_posterior(), figure k shows the publication weight omega of the k-th p-value interval in ascending order, the order in which summary tables (including RoBMA's) print the omegas; figure 1 is the reference weight of the most significant interval. In plot.prior(), a negative k omits figure -k (the default -1 omits the reference weight fixed at 1). For a two-sided weight function prior, the intervals are its two-sided p-value bins; tables on the one-sided p-value scale print these weights first and then repeat them for the mirrored intervals.

transformation

transformation to be applied to the prior distribution. Either a character specifying one of the prepared transformations:

lin

linear transformation in form of a + b*x

tanh

hyperbolic tangent transformation

exp

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. A custom transformation can also declare output_support = c(lower, upper). Display grids on the transformed scale are evaluated only within these bounds; a wider plotting range is retained without extending the density. Infinite inverse values at support boundaries are omitted from continuous density grids. Point masses retain their transformed locations.

transformation_arguments

a list with named arguments for the transformation

transformation_settings

boolean indicating whether the explicitly supplied x_seq or x_range is on the transformed scale. Automatically selected prior-coordinate ranges are always obtained on the source scale before the density family's existing transformation handling.

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.

prior_list_mu

list of priors for the mu parameter, required for the PET-PEESE regression bands (individual = FALSE) and refused otherwise: an individual plot shows the density of one coefficient and does not use it

effect_direction

direction of the effect for PET-PEESE regression. Use "positive" (default) for mu + PET*se + PEESE*se^2 or "negative" for mu - PET*se - PEESE*se^2.

legend

whether factor legends should be drawn.

legend_title

optional title for factor legends.

legend_labels

optional labels for factor legend levels.

legend_position

optional legend position for factor legends.

...

additional graphical arguments. For mixed continuous and point distributions, ylim controls the density axis, ylim2 controls the probability-mass axis, and ylab2 controls its label.

Value

plot_prior_list returns either NULL or an object of class 'ggplot' if plot_type is plot_type = "ggplot".

Details

Automatic prior-coordinate ranges use a common source grid before transformation, regardless of transformation_settings. An endpoint with an infinite image uses the union of participating component marginal tail quantiles, as described in density.prior(). This display convention keeps exact atoms, mixture weights and prior support; explicit coordinates retain their supplied interpretation. The nonindividual PET/PEESE and weightfunction axes keep their standard-error and p-value meanings.