auprc.signif: Assess the significance of AUPRC differences

View source: R/yr2.R

auprc.signifR Documentation

Assess the significance of AUPRC differences

Description

The list returned by this functions contains four elements:

auprc

is simply the empirical area under the precision recall curve for each predictor.

ci

is a matrix listing the lower and upper end of the 95 interval for the AUPRC of each predictor.

llr

is a matrix with columns and rows corresponding to each predictor. It lists the log likelihood ratio of how much more (or less) likely the row-wise predictor is to have a greater AUPRC than the column-wise predictor.

pval

is a matrix with columns and rows corresponding to each predictor. It lists the p-value of how likely it would be to observe the AUPRC of the row-wise predictor under the distribution of the column-wise predictor.

Usage

auprc.signif(yr2, monotonized = TRUE, res = 0.001)

Arguments

yr2

the yogiroc2 object

monotonized

whether or not to monotonize the curve

res

the resolution at which to sample the probability function (defaults to 0.001)

Value

a list containing 4 elements: "auprc" (the empirical area under the precision recall curve), "ci" (the 95 "llr" (the log likelihood ratio matrix, see details), and "pval" (the p-value of each auprc against each other)

Examples

#generate fake data
N <- 100
M <- 80
truth <- c(rep(TRUE,N),rep(FALSE,M))
scores <- cbind(
  pred1=c(rnorm(N,1,0.2),rnorm(M,.9,0.1)),
  pred2=c(rnorm(N,1.1,0.2),rnorm(M,.9,0.2))
)
#create yogiroc2 object
yrobj <- yr2(truth,scores)
auprc.signif(yrobj)

jweile/yogiroc documentation built on Jan. 15, 2024, 2:47 a.m.