multibridge (version 1.1.0)

plot.summary.bmult: Plot estimates

Description

Plots the posterior estimates from the unconstrained multi- or binomial model.

Usage

# S3 method for summary.bmult
plot(
  x,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  panel.first = NULL,
  ...
)

Value

Invisibly returns a data.frame with the plotted estimates.

Arguments

x

A summary.bmult-object returned by summary().

main

character. A string used as title. Defaults to the informed hypothesis and the Bayes factor.

xlab

character. A string used as title for the x-axis.

ylab

character. A string used as title for the y-axis.

xlim

numeric vectors of length 2, giving the x and y coordinates ranges.

ylim

numeric vectors of length 2, giving the x and y coordinates ranges.

panel.first

expression. Evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids or null distributions.

...

additional arguments passed to plot.summary.bmult-method.

Examples

Run this code
# data
x <- c(3, 4, 10, 11, 7, 30)
# priors
a <- c(1, 1, 1, 1, 1, 1)
# restricted hypothesis
factor_levels <- c('theta1', 'theta2', 'theta3', 'theta4', 'theta5', 
                   'theta6')
Hr <- c('theta1', '<',  'theta2', '&', 'theta3', '=', 
'theta4', ',', 'theta5', '<', 'theta6')
output_total  <- mult_bf_informed(x, Hr, a, factor_levels, seed=2020, 
niter=1e3, bf_type = "BFer")
plot(summary(output_total))

# data for a big Bayes factor
x <- c(3, 4, 10, 11, 7, 30) * 1000
output_total  <- mult_bf_informed(x, Hr, a, factor_levels, seed=2020, 
niter=1e3, bf_type = "BFre")
plot(summary(output_total))

Run the code above in your browser using DataCamp Workspace