Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: proceeding beyond roctab 2000 error msg

From   "Scott Merryman" <>
To   <>
Subject   st: RE: proceeding beyond roctab 2000 error msg
Date   Mon, 31 May 2004 22:03:52 -0500

Another way would be to only perform -roctab- with only those variables that

Something like this:

set obs 100
gen byte fee = uniform() >.5
gen byte fie = uniform() > .85
gen foe = 1
gen byte fum = uniform() > .05

foreach var of varlist fie foe fum {
	sum `var' , meanonly
	if r(max) != r(min) {
		disp ""
		disp in gr "ROC analysis for " "`var'"
		roctab `var'  fee


-----Original Message-----
[] On Behalf Of Tonya Cropper
Sent: Monday, May 31, 2004 6:44 PM
To: Statalist
Subject: st: proceeding beyond roctab 2000 error msg

Dear Statlisters,

I am using the  roctab command (Receiver Operating Characteristic (ROC)
analysis) and I get a
"outcome does not vary   r(2000) " error message.

I understand why I get the message.  I am performing the roctab command in a
three tier loop that includes various if statement conditions based on
different values of other variables.  I append observations to a file of
each resulting  std error and area.  To isolate and remove the
variables/conditions will cause me to forgo the loop and perform dozens of
roctab commands individually.  I would like to know is there any possible
way to proceed beyond the error message when the outcome does not vary?

Thank you,


*   For searches and help try:

*   For searches and help try:

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