Annotate AUC to faceted pROC::ggroc Graphs

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(...)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.