I would like to save the AUC value for multiple ROC analysis and append them together so that I can quickly have a list of which combination of variables have the greatest AUC value.
I can't figure out how to output the AUC value but I can only the roc stats.
ODS GRAPHICS ON;
PROC LOGISTIC data = dataset PLOTS(only) = (roc(id = obs) effect);
CLASS outcome ;
MODEL outcome = var / scale = none
clparm = wald
clodds = pl
rsquare OUTROC= RocStats;
RUN;
ODS GRAPHICS OFF;
The AUC value is in variable Area
in dataset AUC
below:
PROC LOGISTIC DATA = SASHELP.CLASS;
CLASS SEX;
MODEL SEX = HEIGHT WEIGHT / OUTROC = ROC;
ROC;
ODS OUTPUT ROCASSOCIATION = AUC;
RUN;
TITLE "AUROC";
PROC PRINT DATA=AUC NOOBS LABEL;
WHERE ROCMODEL = 'Model';
VAR AREA;
RUN;