[R] ROC curve in R

Frank E Harrell Jr f.harrell at vanderbilt.edu
Thu Jul 26 15:01:43 CEST 2007


Note that even though the ROC curve as a whole is an interesting 
'statistic' (its area is a linear translation of the 
Wilcoxon-Mann-Whitney-Somers-Goodman-Kruskal rank correlation 
statistics), each individual point on it is an improper scoring rule, 
i.e., a rule that is optimized by fitting an inappropriate model.  Using 
curves to select cutoffs is a low-precision and arbitrary operation, and 
the cutoffs do not replicate from study to study.  Probably the worst 
problem with drawing an ROC curve is that it tempts analysts to try to 
find cutoffs where none really exist, and it makes analysts ignore the 
whole field of decision theory.

Frank Harrell


gyadav at ccilindia.co.in wrote:
> http://search.r-project.org/cgi-bin/namazu.cgi?query=ROC&max=20&result=normal&sort=score&idxname=Rhelp02a&idxname=functions&idxname=docs
> 
> there is a lot of help try help.search("ROC curve") gave
> Help files with alias or concept or title matching 'ROC curve' using fuzzy 
> matching:
> 
> 
> 
> granulo(ade4)                             Granulometric Curves
> plot.roc(analogue)                        Plot ROC curves and associated 
> diagnostics
> roc(analogue)                             ROC curve analysis
> colAUC(caTools)                           Column-wise Area Under ROC Curve 
> (AUC)
> DProc(DPpackage)                          Semiparametric Bayesian ROC 
> curve analysis
> cv.enet(elasticnet)                       Computes K-fold cross-validated 
> error curve for elastic net
> ROC(Epi)                                  Function to compute and draw 
> ROC-curves.
> lroc(epicalc)                             ROC curve
> cv.lars(lars)                             Computes K-fold cross-validated 
> error curve for lars
> roc.demo(TeachingDemos)                   Demonstrate ROC curves by 
> interactively building one
> 
> HTH
> see the help and examples those will suffice
> 
> Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'.
> 
> 
> 
> Regards,
> 
> Gaurav Yadav
> +++++++++++
> Assistant Manager, CCIL, Mumbai (India)
> Mob: +919821286118 Email: emailtogauravyadav at gmail.com
> Bhagavad Gita:  Man is made by his Belief, as He believes, so He is
> 
> 
> 
> "Rithesh M. Mohan" <rithesh.m at brickworkindia.com> 
> Sent by: r-help-bounces at stat.math.ethz.ch
> 07/26/2007 11:26 AM
> 
> To
> <R-help at stat.math.ethz.ch>
> cc
> 
> Subject
> [R] ROC curve in R
> 
> 
> 
> 
> 
> 
> Hi,
> 
>  
> 
> I need to build ROC curve in R, can you please provide data steps / code
> or guide me through it.
> 
>  
> 
> Thanks and Regards
> 
> Rithesh M Mohan
> 
> 
>                  [[alternative HTML version deleted]]
> 
-
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list