Hi all,
I'm attempting to create a facetted plot of ~15 ROC curves, and I want to print the corresponding AUC on each of the plots. However, I can't seem to figure out how to work this in within the framework of the pROC::ggroc() function. I'd expect I could use geom_text()
or annotate()
, but haven't quite figured out how to get the aesthetics to map according to the ggroc()
dataframe.
Anyone have insight on how to do this? I know how to pull the AUC data from the model results using extract2()/[["auc"]] notation; just need to get them printed properly.
map(.x = data,
~pROC::roc(target_outcome ~ .x, data = data)) %>%
pROC::ggroc(legacy.axes=T) +
ggtitle("My Title") +
facet_wrap(~name, ncol = 3) +
geom_text(...)