0

I am looking to create a pdf with 4 nice graphs for different analysis. My question is, how do I output only the ROC curve for my logistic regression?

I use the following code

            TITLE2 JUSTIFY=CENTER "Rank ordering characteristic curve (ROC)"; 
            ODS GRAPHICS ON;
                PROC LOGISTIC 
                    DATA = input
                    plots(only)=(roc(id=obs))
            ;
            MODEL y
                (Event = '1')=  x   
                    /
                SELECTION=NONE
                LINK=LOGIT;
            RUN;
            QUIT;
            ODS GRAPHICS OFF;

and a dummy dataset can be imagined using this

DATA HAVE;
    DO I = 1 TO 100;
        Y = RAND('integer',0,1);
        x = ranuni(i);
        output;
    end;
run;

Thanks

EDIT: just to be explicit, I'm looking to output just a plot of the ROC curve and nothing else, i.e. the tables containing the somers' D etc.

1 Answers1

1
ODS SELECT ROCCURVE;

ODS SELECT allows you to control the output and include only the tables/output you want. You can wrap your code in ODS TRACE ON, ODS TRACE OFF to find out what the table name, or check the documentation.

Reeza
  • 20,510
  • 4
  • 21
  • 38