I did some serach around. It seems that ROC curve computation is not supported on R. Anyone has some leads? Thanks. Jason ====Jason G. Liao, Ph.D. Division of Biometrics UMDNJ School of Public Health 335 George Street, Suite 2200 New Brunswick, NJ 08903-2688 phone (732) 235-9748, fax (732) 235-9777 http://www.geocities.com/jg_liao __________________________________________________ Great stuff seeking new owners in Yahoo! Auctions! -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
What is it that you want to compute? I have a set of scripts - written by my colleaged David Brainard in Matlab and translated to R by me - which we used to teach signal-detection theory in a grad "methods" course. But they are very straightforward and not worth putting into a package. (I'm sure there is something much more sophisticated one can do, but you don't say what.) Some useful R functions (illustrated, and probably self-explanatory): zHit <- qnorm(Ph) zFa <- qnorm(Pfa) dPrime <- zHit-zFa zCr <- qnorm(1-Pfa) Beta <- dnorm(zCr,dPrime,1)/dnorm(zCr,0,1) And here is the optimal "beta" (criterion): logBetaOpt <- log((pn/ps)*(Vcr + Vfa)/(Vh + Vm)) Jon Baron -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 1 Feb 2002, Jason Liao wrote:> I did some serach around. It seems that ROC curve computation is not > supported on R. Anyone has some leads? Thanks.http://www.mayo.edu/hsr/Sfunc.html has roc This shar archive contains functions to calculate plots associated with Sensitivity and Specificity, along with pairwise comparisons of the area under the curve. Doug Mahoney(mahoney at mayo.edu) & Beth Atkinson [17/Apr/2001] (80k) That's for S (probably S3) but porting to R should be a breeze. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ROC (receiver operating characteristic) curve is used to determine of cutpoints for screening or diagnostic tests. It have been widely used in Epidemiology area. Usually we use logistic regression to get this kind curve. If anyone knows how to get this curve and do statistic test for two curve, do please let me know too. Thanks in advance. Yiling Cheng -----Original Message----- From: baron at cattell.psych.upenn.edu [mailto:baron at cattell.psych.upenn.edu] Sent: Friday, February 01, 2002 11:17 AM To: jg_liao at yahoo.com; r-help at stat.math.ethz.ch Subject: Re: [R] ROC curves using R What is it that you want to compute? I have a set of scripts - written by my colleaged David Brainard in Matlab and translated to R by me - which we used to teach signal-detection theory in a grad "methods" course. But they are very straightforward and not worth putting into a package. (I'm sure there is something much more sophisticated one can do, but you don't say what.) Some useful R functions (illustrated, and probably self-explanatory): zHit <- qnorm(Ph) zFa <- qnorm(Pfa) dPrime <- zHit-zFa zCr <- qnorm(1-Pfa) Beta <- dnorm(zCr,dPrime,1)/dnorm(zCr,0,1) And here is the optimal "beta" (criterion): logBetaOpt <- log((pn/ps)*(Vcr + Vfa)/(Vh + Vm)) Jon Baron -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jason You can find ROC.R and ROC.Rd in: http://www.biostat.ku.dk/~bxc/Epi.R/ Note that ROC.r contains more than one function. The stuff is still somewhat experimental, so I would be happy to hear about any bugs and suggestions for improvement. (Yes, I have some code computing the area under the curve, but it is just a simple integral of the reult of ROC). Bendix C ---------------------- Bendix Carstensen Senior Statistician Steno Diabetes Centre Niels Steensens Vej 2 DK-2820 Gentofte Denmark tel: +45 44 43 87 38 mob: +45 28 25 87 38 fax: +45 44 43 73 13 bxc at novonordisk.com www.biostat.ku.dk/~bxc ----------------------> -----Original Message----- > From: Jason Liao [mailto:jg_liao at yahoo.com] > Sent: Friday, February 01, 2002 5:40 PM > To: r-help at stat.math.ethz.ch > Subject: [R] ROC curves using R > > > I did some serach around. It seems that ROC curve computation is not > supported on R. Anyone has some leads? Thanks. > > Jason > > ====> Jason G. Liao, Ph.D. > Division of Biometrics > UMDNJ School of Public Health > 335 George Street, Suite 2200 > New Brunswick, NJ 08903-2688 > phone (732) 235-9748, fax (732) 235-9777 > http://www.geocities.com/jg_liao > > __________________________________________________ > > Great stuff seeking new owners in Yahoo! Auctions! > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-> FAQ.html > Send "info", > "help", or "[un]subscribe" > (in the > "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._