1

I have some hospital data, where I want to see if any prior condition(s) can predict a specific outcome. To be able to determine which condition(s) best predict the outcome, I will calculate the AUC for each combination of conditions.

I have found several pages explaining how to do that:

https://gist.github.com/cjbayesian/6921118

http://www.r-bloggers.com/calculating-auc-the-hard-way/

Calculate AUC in R?

However, I am not sure what my input should be like. In the last link I can see an input like this:

true_Y = c(1,1,1,1,2,1,2,1,2,2)
probs = c(1,0.999,0.999,0.973,0.568,0.421,0.382,0.377,0.146,0.11)

-but what are these numbers? Im guessing it has something to do with T/F positives/negatives?

Thanks

Community
  • 1
  • 1
user2335015
  • 111
  • 11
  • 1
    It looks to me like `true_Y` are the true states (e.g. 1 = condition present; 2 = condition absent; although usually we'd probably use 1 and 0, respectively), and `probs` are the predicted probabilities. Your question really should be posted as a comment on the third post you refer to, not as a new question. – jbaums Oct 04 '14 at 08:58
  • I know, but I didn't have enough points to make a comment there - I tried :/ – user2335015 Oct 04 '14 at 09:06
  • And thank you for your answer, probably a very stupid question, but what is predicted probabilities and how do I calculate it? I just try to google it, but couldn't find anything useful. – user2335015 Oct 04 '14 at 09:15
  • The predicted probabilities are the values of a continuous classifier, i.e. the predicted probability of presence. For example, a medical diagnostic test might return a 95% (0.95) chance of a disease being present. If the truth is that the disease is absent, and if the classifier is often wildly incorrect in this way for both presences and absences, then the AUC for that classifier (model) will be low. I suspect that when you say "for each combination of conditions" you are referring to something like a logistic regression with different predictors. Such models will yield these probabilities. – jbaums Oct 04 '14 at 10:01

0 Answers0