i need to do logistic regression 20*19/2 times. The response variable is Y,
explanatory variables are x1-x20. For each pair of x(i), we will do the
logistic regression between (x(i),x(j)) and Y. The target is to find the
pair of x that obtain the largest AUC.
i know the following codes have big problems, especially index. But I have no idea to correct them. Could you give me some suggestion? Thanks. %macro logistic;
ods listing close;
ods noresults;
ods output Association=auc&i;
: %do i=1 %to 19;
: %do j=%eval(&i+1) %to 20;
: proc logistic data=tt;
: model y=x&i x&j;
: run;
: %end;
: %end;
data auc1&i;
set auc&i;
if label2='c';
run;
data auc2&i;
set auc1&i;
c&i=cValue2;keep c&i;run;
: %mend;
|