title: Calculate Sensibility, Specificity, NPV and PPV with different thresholds in R
body: <p>I'm using the following code for the calculation of Sensibility, Specificity, NPV and PPV using <strong>RandomForest</strong> as classifier.</p>
  
  <pre><code>   suppressMessages(require(randomForest));
     classifier &lt;- randomForest(x.train,y.train,ntree=300,importance=T)
     prediction &lt;&lt;- predict(classifier,x.test,type="response")
  
     suppressMessages(require(caret));
     accuracyData &lt;- confusionMatrix(prediction,y.test)
  </code></pre>
  
  <p>In <strong>accuracyData</strong> I have all the information about the prediction quality (sensitivity, specificity, etc.).</p>
  
  <p>Anyway, I'd like to make this calculations for different thresholds, but I don't see how to specify such value in my code.</p>