Skip to contents

Clinical ROC analysis toolkit for comprehensive diagnostic performance evaluation. Includes ROC curve analysis, Youden Index optimization, sensitivity/specificity analysis, optimal cutoff determination, and comparative ROC analysis. Essential for biomarker validation, diagnostic test evaluation, and clinical decision support in medical research.

Usage

enhancedROC(
  data,
  outcome,
  positiveClass,
  predictors,
  analysisType = "single",
  direction = "auto",
  youdenOptimization = TRUE,
  customCutoffs,
  sensitivityThreshold = 0.8,
  specificityThreshold = 0.8,
  confidenceLevel = 95,
  bootstrapSamples = 1000,
  useBootstrap = TRUE,
  pairwiseComparisons = TRUE,
  comparisonMethod = "delong",
  rocCurve = TRUE,
  aucTable = TRUE,
  cutoffTable = TRUE,
  optimalCutoffs = TRUE,
  diagnosticMetrics = TRUE,
  clinicalMetrics = TRUE,
  smoothMethod = "none",
  partialAuc = FALSE,
  partialRange = "0.8,1.0",
  prevalence = 0.1,
  clinicalContext = "general",
  clinicalPresets = "custom",
  comprehensive_output = FALSE,
  clinical_interpretation = TRUE,
  plotTheme = "clinical",
  plotWidth = 600,
  plotHeight = 600,
  showCutoffPoints = TRUE,
  showConfidenceBands = FALSE,
  showMetricsDiff = TRUE,
  statisticalComparison = TRUE
)

Arguments

data

The data as a data frame.

outcome

Binary outcome variable (disease status)

positiveClass

Select which level represents the positive class (disease/condition present)

predictors

Numeric predictor variables for ROC analysis

analysisType

Type of ROC analysis to perform

direction

Direction of the predictor-outcome relationship

youdenOptimization

Find optimal cutoff using Youden Index (Sensitivity + Specificity - 1)

customCutoffs

Comma-separated list of custom cutoffs to evaluate (e.g., 0.1, 0.5, 0.9)

sensitivityThreshold

Minimum required sensitivity for screening applications

specificityThreshold

Minimum required specificity for confirmatory testing

confidenceLevel

Confidence level for AUC confidence intervals

bootstrapSamples

Number of bootstrap samples for confidence intervals

useBootstrap

Use bootstrap methods for confidence intervals

pairwiseComparisons

Perform pairwise comparisons between ROC curves

comparisonMethod

Method for comparing ROC curves

rocCurve

Display ROC curve plot

aucTable

Display AUC summary table

cutoffTable

Display detailed cutoff analysis

optimalCutoffs

Display optimal cutoff summary

diagnosticMetrics

Display comprehensive diagnostic metrics

clinicalMetrics

Display clinical application metrics (PPV, NPV, LR+, LR-)

smoothMethod

Method for smoothing ROC curves

partialAuc

Calculate partial AUC for specific sensitivity/specificity ranges

partialRange

Range for partial AUC (specificity_min,specificity_max)

prevalence

Disease prevalence for calculating predictive values

clinicalContext

Clinical application context for interpretation

clinicalPresets

Pre-configured settings for common clinical scenarios

comprehensive_output

Include comprehensive statistical details

clinical_interpretation

Provide clinical context for ROC analysis results

plotTheme

Visual theme for ROC plots

plotWidth

Width of ROC plots

plotHeight

Height of ROC plots

showCutoffPoints

Highlight optimal cutoff points on ROC curve

showConfidenceBands

Display confidence bands around ROC curve

showMetricsDiff

Display detailed differences between model metrics

statisticalComparison

Perform comprehensive statistical comparison between models

Value

A results object containing:

results$results$instructionsa html
results$results$analysisSummaryPlain language summary of key findings
results$results$clinicalReportCopy-ready clinical report sentences for publications and reports
results$results$aucSummaryAUC values with confidence intervals for each predictor
results$results$rocComparisonsPairwise comparisons between ROC curves
results$results$detailedComparisonComprehensive comparison of diagnostic metrics between models
results$results$statisticalSummarySummary of statistical tests for model comparison
results$results$optimalCutoffSummaryYouden Index optimization results for each predictor
results$results$cutoffAnalysisComprehensive analysis across multiple cutoff values
results$results$diagnosticPerformanceComprehensive diagnostic performance measures at optimal cutoff
results$results$clinicalApplicationMetricsClinical metrics including predictive values and likelihood ratios
results$results$partialAucAnalysisPartial AUC analysis for specific sensitivity/specificity ranges
results$results$comprehensiveAnalysisSummaryEnhanced statistical summary for comprehensive output
results$results$clinicalInterpretationGuidea html
results$results$methodsExplanationa html
results$results$rocCurvePlotROC curves with optimal cutoff points
results$results$comparativeROCPlotMultiple ROC curves for comparison
results$results$cutoffAnalysisPlotSensitivity and specificity across cutoff values
results$results$youdenIndexPlotYouden Index values across cutoff range
results$results$clinicalDecisionPlotClinical decision curves and threshold analysis