Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.BFBayesFactorTop

Plot a Bayes factor top-down object


Description

Plot a Bayes factor top-down object

Usage

## S3 method for class 'BFBayesFactorTop'
plot(x, include1 = TRUE, addDenom = FALSE,
  sortbf = FALSE, logbase = c("log10", "log2", "ln"), marginExpand = 0.4,
  pars = NULL, ...)

Arguments

x

a BFBayesFactorTop object

include1

if TRUE, ensure that Bayes factor = 1 is on the plot

addDenom

if TRUE, add the denominator model into the group

sortbf

sort the Bayes factors before plotting them? Defaults to TRUE

logbase

the base of the log Bayes factors in the plot

marginExpand

an expansion factor for the left margin, in case more space is needed for model names

pars

a list of par() settings

...

additional arguments to pass to barplot()

Details

This function creates a barplot of the (log) Bayes factors in a Bayes factor object. Error bars are added (though in many cases they may be too small to see) in red to show the error in estimation of the Bayes factor. If a red question mark appears next to a bar, then that Bayes factor has no error estimate available.

Author(s)

Richard D. Morey (richarddmorey@gmail.com)

Examples

data(puzzles)

bfs = anovaBF(RT ~ shape*color + ID, data = puzzles, whichRandom="ID",
        whichModels='top', progress=FALSE)
plot(bfs)

BayesFactor

Computation of Bayes Factors for Common Designs

v0.9.12-4.2
GPL-2
Authors
Richard D. Morey [aut, cre, cph], Jeffrey N. Rouder [aut], Tahira Jamil [ctb, cph], Simon Urbanek [ctb, cph], Karl Forner [ctb, cph], Alexander Ly [ctb, cph]
Initial release
2018-05-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.