I have a logistic regression model (using R) as
fit6 <- glm(formula = survived ~ ascore + gini + failed, data=records, family = binomial)
summary(fit6)
I'm using pROC
package to draw ROC curves and figure out AUC for 6 models fit1 through fit6.
I have approached this way to plots one ROC.
prob6=predict(fit6,type=c("response"))
records$prob6 = prob6
g6 <- roc(survived~prob6, data=records)
plot(g6)
But is there a way I can combine the ROCs for all 6 curves in one plot and display the AUCs for all of them, and if possible the Confidence Intervals too.
You can use the
add = TRUE
argument the plot function to plot multiple ROC curves.Make up some fake data
Get model fits
Predict on the same data you trained the model with (or hold some out to test on if you want)
Plot it up.
This produces the different fits on the same plot. You can get the AUC of the ROC curve by
roc1$auc
, and can add it either using thetext()
function in base R plotting, or perhaps just toss it in the legend.I don't know how to quantify confidence intervals...or if that is even a thing you can do with ROC curves. Someone else will have to fill in the details on that one. Sorry. Hopefully the rest helped though.