title: R get AUC and plot multiple ROC curves together at the same time
body: <p>I have tried 2 methods to plot ROC curve and get AUC for each ROC curve.  </p>
  
  <p><strong>Method 1</strong>
  - The first method is simple <strong>but I don't know how to plot multiple ROC curves together</strong>.
  I am simply using <code>roc.curve(hacide.test$cls, pred_rose[,2])</code>, the output will show the ROC curve and gives me the AUC.</p>
  
  <p><strong>Method 2</strong>
  I can plot multiple ROC curves together now, but cannot get AUC at the same time.
  This is the way I plot multiple ROC curves together:</p>
  
  <pre><code>library(ROCR)
  pd1 &lt;- prediction(pred_rose[,2], hacide.test$cls)
  pf1 &lt;- performance(pd1, "tpr","fpr")
  
  pd2 &lt;- prediction(pred_both[,2], hacide.test$cls)
  pf2 &lt;- performance(pd2, "tpr","fpr")
  
  plot(pf1, colorize = TRUE)
  plot(pf2, add = TRUE, colorize = TRUE)
  </code></pre>
  
  <p>This is the way I get AUC:</p>
  
  <pre><code>pf &lt;- performance(pd3, "auc")
  pf     # y.values is the AUC
  </code></pre>
  
  <p>As you can see, when I am using this second method, the <code>performance()</code> method used for getting ROC curve and AUC is different. The output of pf1, pf2 here has no AUC values.</p>
  
  <p>Method 1 is simpler, but do you know how can I use method 1 to plot ROC curves together and still keep each AUC values?</p>