Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: cutoff point for ROC curve


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: Re: cutoff point for ROC curve
Date   Sun, 13 Oct 2013 09:17:44 -0400

I don't think there is a "best" cut-off value.  I also like to see the value that gives the minimum of  Youden's index, which is sensitivity - (1 - specificity) or
P(D+|T+) -P(D+|T-) (or "true positive rate" - "false positive rate"). To do the
calculation, down load Roger Newson's -senspec- from SSC.

********************************************
sysuse auto, clear
logistic foreign mpg turn

predict pr, pr
cap which senspec
if _rc {
ssc install senspec
}

senspec foreign pr, sensitivity(sens) specificity(spec)
sum sens spec
codebook sens spec

gen youden= sens-(1-spec)
egen youdenmax= max(youden)
gen best_youden =    abs(youden -youdenmax)<0.0001

gen dist = sqrt((1-sens)^2 + (1-spec)^2)
egen distmax = min(dist)
gen best_dist =  abs(dist-distmax)<0.0001
format pr sens spec youden* dist* %6.5f

list best* make pr youden* dist* if best_youden | best_dist
**********************************************

Steve

On Oct 13, 2013, at 7:03 AM, Michael Stewart wrote:

HI ,
I am working with Prediction/classification using logistic regression
and have question regarding ROC  curves.I was hoping to get help from
the Statalist community.
After  running the logistic regression , predict, my understanding is
that lsens gives a graphical presentation of the AUC with various cut
offs.
If I need  to  find  the best cut off value ( usually defined as
minimal sum of (1-sensitivity)^2 + (1-specificity)^2); is there a good
way / command to tabulate the results .

Thank  you very much for your time

-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index