title: plotting ROC in R with ROCR vs pROC
body: <p>I am plotting ROCs and measuring partial AUC as a metric of ecological niche model quality. As I am working in R, I am using the ROCR and the pROC packages. I'll settle on one to use, but for now, I just wanted to see how they performed, and if one met my needs better.</p>
  
  <p>One thing that confuses me is that, when plotting a ROC, the axes are as follows:</p>
  
  <p><strong>ROCR</strong> </p>
  
  <pre><code>x axis: 'true positive rate' 0 -&gt; 1
  y axis: 'false positive rate', 0 -&gt; 1
  </code></pre>
  
  <p><strong>pROC</strong></p>
  
  <pre><code>x axis: 'sensitivity' 0 -&gt; 1
  y axis: 'specificity' 1 -&gt; 0. 
  </code></pre>
  
  <p>But if I plot the ROC using both methods, they look identical.
  So I just want to confirm that:</p>
  
  <pre><code>true positive rate = sensitivity
  
  false positive rate = 1 - specificity.
  </code></pre>
  
  <p>Here is a reproducible example: </p>
  
  <pre><code>obs&lt;-rep(0:1, each=50)
  pred&lt;-c(runif(50,min=0,max=0.8),runif(50,min=0.3,max=0.6))
  plot(roc(obs,pred))
  
  ROCRpred&lt;-prediction(pred,obs)
  plot(performance(ROCRpred,'tpr','fpr'))
  </code></pre>