Learn R Programming

analogue (version 0.4-0)

plot.bayesF: Bayes factor plots

Description

Plotting function for bayesF, to draw the posterior probability of analogue.

Usage

## S3 method for class 'bayesF':
plot(x, xlab = NULL, ylab = "Pr (A+ | d)",
        col = "red", abline.col = "lightgrey", ...)

Arguments

x
an object of class bayesF.
xlab,ylab
the x- and y-axis labels for the plot.
col
colour of the line used to draw the posterior probability.
abline.col
colour of the vertical line drawn to indicate the optimal dissimilarity determined from the ROC curve.
...
other plot arguments passed to plotting functions. Currently ignored.

Value

  • A plot on the current device.

concept

  • likelihood ratios
  • Bayes factors

Details

This is a simple plotting function that currently only draws the posterior probability of analogue based on the Bayes facotr or likelihood ratio of a positive event (analogue).

See Also

bayesF and roc

Examples

Run this code
## continue the example from ?roc
example(roc)

## calculate the Bayes factors of analogue and no-analogue
## (uses observed probabilities of analogue/no-analogue
swap.bayes <- bayesF(swap.roc)
swap.bayes

## plot the probability of analogue
plot(swap.bayes)

## calculate the Bayes factors of analogue and no-analogue
## with prior probabilities c(0.5, 0.05)
swap.bayes2 <- bayesF(swap.roc, prior = c(0.5, 0.05))
swap.bayes

## plot the probability of analogue
plot(swap.bayes2)

Run the code above in your browser using DataLab