[R] ROC with GLM?

Frank E Harrell Jr feh3k at spamcop.net
Tue Nov 4 03:13:04 CET 2003


On 3 Nov 2003 22:20:17 -0000
itstruei at rock.com wrote:

> Hello R-List:
>  
> Does anybody have code to optimize a logistic regression using ROC
> curves? I've seen S+ code that does it but never in R.
>  

ROC curves are something you might draw once a model is fitted (although I
believe they are overused) but not something you use in fitting the model.
 Logistic models are fitted using maximum likelihood estimation, penalized
maximum likelihood estimation, or Bayesian methods, for example.  Choose
an optimality criterion that yields efficient estimators.

If you are referring to after-fit ROC curves to find "optimum cutpoints"
there are many reasons not to do this either, as detailed in my book
Regression Modeling Strategies.  If you have a loss (utility) function you
can make optimum classifications without the use of ROC curves, but
optimizing classifications on the basis of ROC curves is usually an
exercise in concocting false utilities or in assuming that utilities are
constant across subjects.  My comments pertain to the type of prediction
problems I've seen in medical diagnosis and prognosis.  There may be other
areas in which strictly empirical classification is a more appropriate
endeavor.

---
Frank E Harrell Jr    Professor and Chair            School of Medicine
                      Department of Biostatistics    Vanderbilt University




More information about the R-help mailing list