# pROC v1.15.0

0

0th

Percentile

## Display and Analyze ROC Curves

Tools for visualizing, smoothing and comparing receiver operating characteristic (ROC curves). (Partial) area under the curve (AUC) can be compared with statistical tests based on U-statistics or bootstrap. Confidence intervals can be computed for (p)AUC or ROC curves.

# pROC

An R package to display and analyze ROC curves.

1. Xavier Robin, Natacha Turck, Alexandre Hainard, et al. (2011) “pROC: an open-source package for R and S+ to analyze and compare ROC curves”. BMC Bioinformatics, 7, 77. DOI: 10.1186/1471-2105-12-77
2. The official web page on ExPaSy
3. The CRAN page
4. My blog
5. The FAQ

## Stable

The latest stable version is best installed from the CRAN:

install.packages("pROC")


## Help

Once the library is loaded with library(pROC), you can get help on pROC by typing ?pROC.

## Getting started

If you don't want to read the manual first, try the following:

library(pROC)
data(aSAH)


### Basic ROC / AUC analysis

roc(aSAH$outcome, aSAH$s100b)
roc(outcome ~ s100b, aSAH)


### Smoothing

roc(outcome ~ s100b, aSAH, smooth=TRUE)


### more options, CI and plotting

roc1 <- roc(aSAH$outcome, aSAH$s100b, percent=TRUE,
# arguments for auc
partial.auc=c(100, 90), partial.auc.correct=TRUE,
partial.auc.focus="sens",
# arguments for ci
ci=TRUE, boot.n=100, ci.alpha=0.9, stratified=FALSE,
# arguments for plot
plot=TRUE, auc.polygon=TRUE, max.auc.polygon=TRUE, grid=TRUE,
print.auc=TRUE, show.thres=TRUE)

# Add to an existing plot. Beware of 'percent' specification!
roc2 <- roc(aSAH$outcome, aSAH$wfns,
R CMD build pROC
RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz  ### vdiffr The vdiffr package is used for visual tests of plots. To run all the test cases (incl. slow ones) from the command line: run_slow_tests <- TRUE vdiffr::manage_cases()  To run the checks upon R CMD check, set environment variable NOT_CRAN=1: NOT_CRAN=1 RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz


### Release steps

1. Get new version to release: VERSION=$(grep Version pROC/DESCRIPTION | sed "s/.\+ //") && echo$VERSION
2. Build & check package: R CMD build pROC && R CMD check --as-cran pROC_$VERSION.tar.gz 3. Check with slow tests: NOT_CRAN=1 RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz
4. Check with R-devel: rhub::check_with_rdevel()
5. Chec reverse dependencies: devtools::revdep_check(libpath = rappdirs::user_cache_dir("revdep_lib"), srcpath = rappdirs::user_cache_dir("revdep_src"))
6. Update Version and Date in DESCRIPTION
7. Update version and date in NEWS
8. Create a tag: git tag v\$VERSION
9. Submit to CRAN

## Functions in pROC

 Name Description aSAH Subarachnoid hemorrhage data ci.auc Compute the confidence interval of the AUC ci.sp Compute the confidence interval of specificities at given sensitivities ci.se Compute the confidence interval of sensitivities at given specificities are.paired Are two ROC curves paired? coords Coordinates of a ROC curve auc Compute the area under the ROC curve ci Compute the confidence interval of a ROC curve ci.thresholds Compute the confidence interval of thresholds ci.coords Compute the confidence interval of arbitrary coordinates has.partial.auc Does the ROC curve have a partial AUC? lines.roc Add a ROC line to a ROC plot cov.roc Covariance of two paired ROC curves coords_transpose Transposing the output of coords pROC-package pROC multiclass.roc Multi-class AUC groupGeneric pROC Group Generic Functions ggroc.roc Plot a ROC curve with ggplot2 plot.ci Plot confidence intervals plot.roc Plot a ROC curve power.roc.test Sample size and power computation for ROC curves print Print a ROC curve object smooth Smooth a ROC curve var.roc Variance of a ROC curve roc Build a ROC curve roc.test Compare the AUC of two ROC curves No Results!