Re: [R] selecting cut-off in Logistic regression using ROCR package

From: Frank E Harrell Jr <>
Date: Sat, 16 Jun 2007 09:03:32 -0500

Tirthadeep wrote:
> Hi,
> I am using logistic regression to classify a binary psychometric data. using
> glm() and then predict.glm() i got the predicted odds ratio of the testing
> data. Next i am going to plot ROC curve for the analysis of my study.
> Now what i will do:
> 1. first select a cut-off (say 0.4) and classify the output of predict.glm()
> into {0,1} segment and then use it to draw ROC curve using ROCR package
> OR
> 2. just use the predicted odds ratio in ROCR package to get "error rate" and
> use the minimum error rate (as new cut-off) to draw new ROC curve.
> waiting for reply.
> with regards and thanks.
> Tirtha.

It's not clear why any cutoff or ROC curve is needed. Please give us more information about why a continuous variable should be dichotomized, and read


   author = {Royston, Patrick and Altman, Douglas G. and Sauerbrei, Willi},

   title = {Dichotomizing continuous predictors in multiple regression: a bad idea},

   journal = 	 Stat in Med,
   year = 		 2006,
   volume =		 25,
   pages =		 {127-141},
   annote =		 {continuous

covariates;dichotomization;categorization;regression;efficiency;clinical research;residual confounding;destruction of statistical inference when cutpoints are chosen using the response variable;varying effect estimates from change in cutpoints;difficult to interpret effects when dichotomize;nice plot showing effect of categorization;PBC data} }


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

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 16 Jun 2007 - 14:09:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 16 Jun 2007 - 16:31:55 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.