Title: ROC Models and AUC Estimation
Version: 1.0.0
Description: The receiver operating characteristic (ROC) curve is one of the most widely used tools for evaluating diagnostic and prognostic biomarkers across diverse scientific fields, particularly in medicine. Despite its ubiquity, ROC estimation and testing methods differ substantially in their assumptions and resulting curve properties. This package provides a unified framework for constructing, visualizing, and comparing parametric, nonparametric, semiparametric, and Bayesian ROC curves. 'ROCModels' helps researchers identify and implement ROC inference methods most suitable for their data. See the accompanying vignette 'ROCModels_Package_Doc' for a detailed introduction. Alonzo, T. A., and Pepe, M. S. (2002) <doi:10.1093/biostatistics/3.3.421>, Andrews, D. F., and Herzberg, A. M. (1985) <doi:10.1007/978-1-4612-5098-2>, Bamber, D. (1975) <doi:10.1016/0022-2496(75)90001-2>, Cox, D. R. (1972) <doi:10.1111/j.2517-6161.1972.tb00899.x>, Cox, D. R. (1975) <doi:10.1093/biomet/62.2.269>, DeLong, E. R., DeLong, D. M., and Clarke-Pearson, D. L. (1988) <doi:10.2307/2531595>, Dorfman, D. D., and Alf, E. (1969) <doi:10.1016/0022-2496(69)90019-4>, Dorfman, D. D., Berbaum, K. S., and Metz, C. E. (1997) <doi:10.1016/s1076-6332(97)80013-x>, Erkanli, A., Sung, L., and Stamey, J. D. (2006) <doi:10.1002/sim.2496>, Faraggi, D., and Reiser, B. (2002) <doi:10.1002/sim.1228>, Ghebremichael, M., and Habtemicael, S. (2018) <doi:10.1080/02664763.2017.1420758>, Ghebremichael, M., and Michael, H. (2024) <doi:10.1080/03610918.2022.2032159>, Ghebremichael, M., Michael, H., Tubbs, J., and Paintsil, E. (2019) <doi:10.3844/jmssp.2019.55.64>, Gönen, M., and Heller, G. (2010) <doi:10.1177/0272989X09360067>, Gopalakrishnan, V., Bose, E., Nair, U., Cheng, Y., and Ghebremichael, M. (2020) <doi:10.1186/s12879-020-05458-w>, Green, D. M., and Swets, J. A. (1966, ISBN:0471324205), Gu, J., and Ghosal, S. (2009) <doi:10.1016/j.jspi.2008.09.014>, Gu, Y., Ghosal, S., and Roy, A. (2008) <doi:10.1002/sim.3366>, Guidoum, A. C. (2020) <doi:10.32614/CRAN.package.kedd>, <doi:10.48550/arXiv.2012.06102>, Guo, B. (2015) https://d-scholarship.pitt.edu/23590/1/Guo_Ben_thesis_12-2014.pdf, Hanley, J. A., and McNeil, B. J. (1982) <doi:10.1148/radiology.143.1.7063747>, Hsieh, F., and Turnbull, B. W. (1996) <doi:10.1214/aos/1033066197>, Hussain, E. (2012) <doi:10.6000/1927-5129.2012.08.02.09>, Ishwaran, H., and James, L. F. (2002) <doi:10.1198/106186002411>, Jokiel-Rokita, A., and Topolnicki, R. (2020) <doi:10.1016/j.csda.2019.106820>, Krzanowski, W. J., and Hand, D. J. (2009) <doi:10.1201/9781439800225>, Kundu, D., and Gupta, R. D. (2006) <doi:10.1109/TR.2006.874918>, Lloyd, C. J. (1998) <doi:10.1080/01621459.1998.10473797>, Lehmann, E. L. (1953) <doi:10.1214/aoms/1177729080>, Metz, C. E., Herman, B. A., and Shen, J. H. (1998) <doi:10.1002/(SICI)1097-0258(19980515)17:9%3C1033::AID-SIM784%3E3.0.CO;2-Z>, Pepe, M. S. (2003) <doi:10.1093/oso/9780198509844.001.0001>, Pundir, S., and Amala, R. (2014) <doi:10.22237/jmasm/1398917940>, Silverman, B. W. (2018) <doi:10.1201/9781315140919>, Yeo, I. K., and Johnson, R. A. (2000) <doi:10.1093/biomet/87.4.954>, Zhou, X. H., McClish, D. K., and Obuchowski, N. A. (2009) <doi:10.1002/9780470906514>, Zou, K. H., Hall, W. J., and Shapiro, D. E. (1997) <doi:10.1002/(SICI)1097-0258(19971015)16:19%3C2143::AID-SIM655%3E3.0.CO;2-3>.
License: MIT + file LICENSE
Encoding: UTF-8
Imports: ggplot2, kedd, dplyr, survival, nleqslv, HDInterval, ROCit, doParallel, foreach, pbivnorm, nor1mix, parallel, readr, MASS, doRNG
Depends: R (≥ 3.5)
LazyData: true
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2026-03-11 18:31:53 UTC; rsn11
Author: Ruhul Ali Khan [aut], Ruhul Ali Khan [aut, cre], Raja Sanjeev Kumar Nakka [aut], Musie Ghebremichael [aut]
Maintainer: Ruhul Ali Khan <ruhulali.khan@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-16 19:50:13 UTC

ROCModels: Tools for ROC Curve Analysis

Description

The ROCModels package provides functions for calculating AUC, generating ROC plots, and comparing classification models.

Vignettes

See the package vignette for a detailed introduction and examples: vignette("ROCModels_Package_Doc")

You can also open all available vignettes with: browseVignettes("ROCModels")

Author(s)

Maintainer: Ruhul Ali Khan ruhulali.khan@gmail.com

Authors:


Calculates AUC, confidence intervals, and generates a ROC plot.

Description

Calculates AUC, confidence intervals, and generates a ROC plot.

Usage

AUC(
  data,
  method,
  ci = TRUE,
  ci_method = "delong",
  siglevel = 0.05,
  boot_iter = 1000,
  seed = NULL
)

Arguments

data

A data frame containing at least two columns:

biomarker

Numeric values representing the diagnostic marker.

status

Character or factor with levels '"0"' (controls) and '"1"' (cases).

method

A character string specifying the ROC/AUC modeling approach. Supported options include:

  • '"empirical"' – empirical ROC

  • '"order"' – ROC curve under stochastic order constraints

  • '"norm_silver"' – kernel ROC with normal kernel and Silverman bandwidth

  • '"norm_ucv"' – kernel ROC with normal kernel and UCV bandwidth

  • '"bi_silver"' – kernel ROC with biweight kernel and Silverman bandwidth

  • '"bi_ucv"' – kernel ROC with biweight kernel and UCV bandwidth

  • '"binormal"' – classical binormal ROC model

  • '"biweibull"' – parametric bi-Weibull ROC

  • '"bigamma"' – parametric ROC assuming gamma distributions

  • '"lehmann"' – ROC under the Lehmann alternative

  • '"bayesbiweibull"' – Bayesian bi-Weibull ROC (MCMC-based)

  • '"BB"' – Bayesian bootstrap ROC

  • '"dpm"' – Dirichlet process mixture ROC

ci

Logical; if 'TRUE' (default), computes confidence intervals for the AUC (or credible intervals for Bayesian methods).

ci_method

Character string specifying the type of interval estimation. Not all CI methods are compatible with every model:

  • '"delong"' – DeLong’s variance-based normal approximation

  • '"bootstrap"' – nonparametric bootstrap interval

  • '"hm"' – Hanley–McNeil variance-based interval

  • '"mle"' – likelihood-based interval

  • '"all"' – computes all applicable interval types for the selected method

siglevel

Numeric; significance level \alpha for the confidence interval. The corresponding confidence level is 1 - \alpha.

boot_iter

Integer; number of bootstrap resamples (used when 'ci_method = "bootstrap"' or '"all"'). Larger values give more stable intervals but increase computation time.

seed

Integer; random seed for reproducibility.

Value

A list with the following elements:

summary

Printed output of the AUC and confidence intervals.

plot

A 'ggplot' object visualizing the ROC curve.

The exact structure may vary depending on the chosen model.

Examples

# Import well formated dataset
data(DMDmodified) 
# Calculate AUC summary and ROC plot
auc <- AUC(
  data=DMDmodified,
  method = "empirical",
  ci        = TRUE
)
# Get the AUC summary
cat(auc$summary)
# Get the ROC plot
auc$plot

DMDmodified dataset

Description

A dataset used for ROC modeling examples.

Usage

DMDmodified

Format

A data frame with X rows and Y variables:

X

ID for the row

biomarker

Biomarker value

status

Status