从proc logistic输出SAS ROC曲线的AUC

时间:2016-04-13 16:00:33

标签: sas logistic-regression roc

我想保存多个ROC分析的AUC值并将它们附加在一起,以便我可以快速找到哪个变量组合具有最大AUC值的列表。

我无法弄清楚如何输出AUC值,但我只能输出roc数据。

 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;

1 个答案:

答案 0 :(得分:1)

AUC值位于以下数据集Area中的变量AUC中:

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;