Statalist


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

st: Re: roctab sensitivity specificity for each cutpoint


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: roctab sensitivity specificity for each cutpoint
Date   Sat, 10 Jan 2009 22:58:26 +0100

Well,

it is not hard to see that the values displayed in the table after -roctab, detail- are stored in -tempvar-s named "sens" "spec" "corr" "lrp" "lrn", with the cutpoints in the first column stored in a -local-. The returned values do not make them available, and the question is really: why not put them into a matrix and return it?

The -tempvar-s die when -roctab- terminates, so you might want to make a copy of -roctab- and edit it to tell Stata to turn them into permanent objects. But as you correctly say: it is probably easier to program this yourself than to figure out a way to make the -tempvar-s permanent.

HTH
Martin
_______________________
----- Original Message ----- From: "Jacob Wegelin" <[email protected]>
To: <[email protected]>
Sent: Saturday, January 10, 2009 6:29 PM
Subject: st: roctab sensitivity specificity for each cutpoint


- roctab - with the detail option reports the sensitivity and
specificity values which one could use to create one's own ROC plot.
But it only spits these numbers out as text, not as a dataset. Am I
correct in thinking that, if I want a dataset with these values, "I'm
on my own" as they say, I will not be able to obtain them from roctab
or its sister functions?

One reason it would be nice to have these numbers in a dataset:

roccomp makes a nice plot, but the legend is limited: it uses the
variable names, not the variable labels. Suppose, for instance, that
our continuous predictor of "spontaneous survival" is MELD, but that
one has to

gen minusMELD=-MELD

to get a ROC curve that is above the reference line. Then the roccomp
plot has a funny label for the MELD ROC curve, and a clinician with
whom one collaborates will be confused.

If one had the actual sensitivity and specificity for each cutpoint,
then one could produce one's own program that, for instance, extracts
the variable labels, like this:

. local junk: variable label log_BILin

. di "`junk'"
log(Bilirubin level at admission)

and thereby produce a more accessible plot legend.

Of course it would be fairly straightforward to write a program that
computes the sensitivity and specificity for each cutpoint; I'm just
curious whether that would constitute "reinventing the wheel."

Thanks for any comments

Jacob A. Wegelin
Assistant Professor
Department of Biostatistics
Virginia Commonwealth University
730 East Broad Street Room 3006
P. O. Box 980032
Richmond VA 23298-0032
U.S.A.
E-mail: [email protected]
URL: http://www.people.vcu.edu/~jwegelin
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index