[R] ROC curves using R
Cheng, Yiling
ycheng at cooperinst.org
Fri Feb 1 21:27:07 CET 2002
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list