
bayesF(x, prior = NULL)
roc
NULL
depending on argument which
:pos
and neg
containing the posterior probabilities of positive and negative
events, respectively.pos
and neg
containing the prior probabilities of positive and negative
events, respectively.x
.LR(+) is defined as $LR(+) = TPF / FPF$ (or sensitivity / (1 - specificity)), and LR(-) is defined as $LR(-) = FPF / TNF$ (or (1 - sensitivity) / specificity), in Henderson (1993).
The posterior probability of analogue given a dissimilarity is the LR(+) likelihood ratio values multiplied by the prior odds of analogue, for given values of the dissimilarity, and is then converted to a probability.
Henderson, A.R. (1993) Assessing test accuracy and its clinical consequences: a primer for receiver operating characteristic curve analysis. Annals of Clinical Biochemistry 30, 834--846.
roc
and plot.bayesF
.## 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