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$instructions | a html | ||||
results$results$analysisSummary | Plain language summary of key findings | ||||
results$results$clinicalReport | Copy-ready clinical report sentences for publications and reports | ||||
results$results$aucSummary | AUC values with confidence intervals for each predictor | ||||
results$results$rocComparisons | Pairwise comparisons between ROC curves | ||||
results$results$detailedComparison | Comprehensive comparison of diagnostic metrics between models | ||||
results$results$statisticalSummary | Summary of statistical tests for model comparison | ||||
results$results$optimalCutoffSummary | Youden Index optimization results for each predictor | ||||
results$results$cutoffAnalysis | Comprehensive analysis across multiple cutoff values | ||||
results$results$diagnosticPerformance | Comprehensive diagnostic performance measures at optimal cutoff | ||||
results$results$clinicalApplicationMetrics | Clinical metrics including predictive values and likelihood ratios | ||||
results$results$partialAucAnalysis | Partial AUC analysis for specific sensitivity/specificity ranges | ||||
results$results$comprehensiveAnalysisSummary | Enhanced statistical summary for comprehensive output | ||||
results$results$clinicalInterpretationGuide | a html | ||||
results$results$methodsExplanation | a html | ||||
results$results$rocCurvePlot | ROC curves with optimal cutoff points | ||||
results$results$comparativeROCPlot | Multiple ROC curves for comparison | ||||
results$results$cutoffAnalysisPlot | Sensitivity and specificity across cutoff values | ||||
results$results$youdenIndexPlot | Youden Index values across cutoff range | ||||
results$results$clinicalDecisionPlot | Clinical decision curves and threshold analysis |