如果你用sas9.2,解决方法非常简单。code如下(如果比较x1 and x2 and event = 1)
-
- ods graphics on;
- proc logistic data=dset plots=roc(id=prob);
- model y(event='1') = x1 x2/ nofit;
- roc 'x1' x1;
- roc 'x2' x2;
- roccontrast reference('x1') / estimate e;
- run;