plot_BF_quantiles: Plot the distribution of Bayes factors

View source: R/Power.R

plot_BF_quantilesR Documentation

Plot the distribution of Bayes factors

Description

Plots quantiles of Bayes factors by sample size.

Usage

plot_BF_quantiles(BF_quantiles, thresholds = NULL, ylim = NULL,
  main = "", axis = c("log", "standard"))

Arguments

BF_quantiles

A 'data.frame' returned by 'BF_quantiles'.

thresholds

A vector of thresholds to be drawn horizontally. May for example illustrate some thresholds over which Bayes factors are deemed to be informative.

ylim

A vector of two values indicating the limits of the y-axis. Given on a log-scale.

main

The title of the plot.

axis

A character vector indicating what y-axis is to drawn. Can be "log" for the log-axis, "standard" for non-logarithmic axis, or both (i.e., c("log", "standard") which is also the default)

Examples

bfs <- bf_distribution(effect_size = 0.5, sample_sizes = seq(50, 350, by = 50), n_bayes_factors = 300)
quants <- BF_quantiles(bfs)
plot_BF_quantiles(quants, thresholds = c()
legend("topleft", legend = paste0("PR ", c(80, 50, 20)), pch = 3, col = 3:1, bty = "n")


m-Py/bayesEd documentation built on Feb. 25, 2023, 5:35 p.m.