m**z 发帖数: 5 | 1 Who can help me with the question as in the title? Many thanks! | s*********e 发帖数: 1051 | 2 copied from my blog.
hth.
%macro roc(data = , score =, y = );
*******************************************;
* THIS MACRO IS TO CALCULATE AUC (AREA *;
* UNDER CURVE) USING TRAPEZOIDAL RULE *;
*-----------------------------------------*;
* INPUT PARAMETERS: *;
* DATA : INPUT DATASET *;
* SCORE: SCORE (HIGHER ==> BETTER) *;
* Y : 0/1 TARGET (1 ==> BAD) *;
*******************************************;
data _tmp1;
set &data;
wh |
|