我想保存多个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;
答案 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;