Plot estimates from models

plot_models(
  model_list,
  samples,
  inference,
  parameter,
  plot_type = "base",
  prior = FALSE,
  conditional = FALSE,
  order = NULL,
  transformation = NULL,
  transformation_arguments = NULL,
  transformation_settings = FALSE,
  par_name = NULL,
  ...
)

Arguments

model_list

list of models, each of which contains marginal likelihood estimated with bridge sampling marglik and prior model odds prior_weights

samples

samples from a posterior distribution for a parameter generated by mix_posteriors.

inference

object created by ensemble_inference function

parameter

parameter name to be plotted. Does not support PET-PEESE and weightfunction.

plot_type

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

prior

whether prior distribution should be added to the figure

conditional

whether conditional models should be displayed

order

list specifying ordering of the models. The first element describes whether the ordering should be "increasing" or "decreasing" and the second element describes whether the ordering should be based "model" order, "estimate" size, posterior "probability", or the inclusion "BF".

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

also known as Fisher's z transformation

exp

exponential transformation

, or a list containing the transformation function fun, inverse transformation function inv, and the Jacobian of the transformation jac. See examples for details.

transformation_arguments

a list with named arguments for the transformation

transformation_settings

boolean indicating whether the settings the x_seq or x_range was specified on the transformed support

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.

...

additional arguments. E.g.:

"show_updating"

whether Bayes factors and change from prior to posterior odds should be shown on the secondary y-axis

"show_estimates"

whether posterior estimates and 95% CI should be shown on the secondary y-axis

"y_axis2"

whether the secondary y-axis should be shown

Value

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

See also