posterior_plot {BFF}R Documentation

Plot Prior and Posterior Distribution

Description

Creates a prior and posterior plot of an BFF object. If no specific omega was set when fitting the model, the omega resulting in maximum BF against the null hypothesis is selected.

Usage

posterior_plot(x, prior = FALSE, plot = TRUE, ...)

Arguments

x

a BFF object

prior

whether prior distribution should be added to the figure

plot

whether plot should be generated. Default to TRUE. If FALSE a data frame with the support, prior ordinates, and posterior ordinates is returned instead.

...

additional arguments to the plotting function. These include:

"x_limit"

vector defining the plotting range, defaults to c(-3, 3).

"color"

vector with color for the posterior and prior line. Defaults to c("black", "grey")

"linetype"

vector with linetype for the posterior and prior line. Defaults to c(2, 1)

"linewidth"

vector with linewidth for the posterior and prior line. Defaults to c(1, 1)

Value

either a ggplot2 object if plot = TRUE or a data.frame with prior and posterior densities if plot = FALSE

See Also

[z_test_BFF()], [t_test_BFF()], [chi2_test_BFF()], [f_test_BFF()]


[Package BFF version 4.2.1 Index]