This vignette shows how to perform Receiver Operating Characteristic
(ROC) analysis with meddecide using the
psychopdaroc()
function.
Loading the Data
df_roc <- read.csv(system.file("extdata", "roc_example.csv", package = "meddecide"))
head(df_roc)
Creating the ROC Curve
roc_res <- psychopdaroc(data = df_roc, class = df_roc$class, value = df_roc$value)
roc_res$plot
The resulting plot shows the ROC curve along with the area under the curve (AUC). You can extract the AUC value and other statistics from the result object.
roc_res$AUC
Bootstrapping and Confidence Intervals
auc_ci()
and bootstrap_ci()
provide
convenience wrappers for computing confidence intervals for diagnostic
metrics.
auc_ci(roc_res)
bootstrap_ci(roc_res)
These utilities allow you to assess the stability of your ROC analysis.