Learn R Programming

RoBMA (version 1.2.0)

plot.RoBMA.prior: Plots a RoBMA.prior object

Description

Plots a RoBMA.prior object

Usage

# S3 method for RoBMA.prior
plot(
  x,
  plot_type = "base",
  effect_size = NULL,
  mu_transform = NULL,
  show_figures = -1,
  weights = FALSE,
  par_name = "mu",
  samples = 1e+06,
  points = 1000,
  ...
)

Arguments

x

a RoBMA prior

plot_type

whether to use a base plot "base" or ggplot2 "ggplot2" for plotting. The later requires ggplot2 package to be installed.

effect_size

type of effect size which is supposed to be plotted. Only relevant if the mu parameter needs to be transformed ("r" for correlation coefficients or "OR" for odds ratios).

mu_transform

whether and how should the prior distribution be transformed. If the prior distribution is constructed for effect sizes supplied as correlations, the prior for mu parameter is not defined on the correlation scale directly, but transformed into it. Only possible if the effect_size == "r" or effect_size == "OR" and par_name = "mu". Defaults to NULL. Other options are "cohens_d", "fishers_z", and "log_OR".

show_figures

which figures should be returned in case of multiple plots are generated. Useful when priors for the omega parameter are plotted and weights = TRUE.

weights

whether the weights or weight function should be returned. Only applicable for priors on the omega parameter. Defaults to FALSE - the weight function 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.

samples

how many samples should be drawn for the density plot (applies only for the weight functions, other prior distributions are plotted using the pdf). Defaults to 10000.

points

how many points should be used for drawing the density plot. Defaults to 1000.

...

additional arguments

See Also

prior()