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:46:54 -0400

Final correction to the code, as I see that I referred to "distmax", not "distmin".

Correction: one wants to see the cutoff that gives the *maximum* of Youden's index, not the minimum. See: http://en.wikipedia.org/wiki/Youden%27s_J_statistic
which gives the source:

Youden W. J., "Index for rating diagnostic tests.", Cancer 1950; 3: 32-35


I don't think there is a "best" cut-off value.  I also like to see the value that gives the maximum 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)

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 distmin = 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