Hi Camille, Do you need something like that?
################### library(ROCR) data(ROCR.simple) pred <- prediction(ROCR.simple$predictions, ROCR.simple$labels) tpf <- unlist(performance(pred,"tpr")@y.values) tnf <- unlist(performance(pred,"tnr")@y.values) x <- rev(unlist(pred@cutoffs)) plot(x, tpf+tnf, t='l', xlab='Value', ylab='TPF+TNF') ################### Regards, Pascal ----- Mail original ----- De : Camille Leclerc <camille.lecl...@ymail.com> À : r-help@r-project.org Cc : Envoyé le : Mardi 13 mars 2012 23h30 Objet : [R] ROC Analysis Hi everybody, I have a data set with a value and a status (positive or negative case) and I want make a ROC Analysis. So, with ROCR Package, I have got the ROC curve (True Positive Fraction [tpf] according 1-True Negative Fraction [1-tnf]). http://r.789695.n4.nabble.com/file/n4469203/01.png But, now I want a new graphic which show the sum of true positive fraction and true negative fraction according each value on my data set (tpf + tnf according the values). http://r.789695.n4.nabble.com/file/n4469203/02.png If you have an idea ! Thank you very much for all help, Camille Leclerc -- Camille Leclerc, Master student Lab ESE, UMR CNRS 8079 Univ Paris-Sud Bat 362 F-91405 Orsay Cedex FRANCE -- View this message in context: http://r.789695.n4.nabble.com/ROC-Analysis-tp4469203p4469203.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.