Dear all, I wanted to set up a macro to run quite a few logistic regression models. My question is how to I code it in such a way that for the first 10 models, the macro would use bi as the dependent variable, for the next 10 models, use bi2 as the dependent variable etc. The codes highlighted in purple wouldnt work. %MACRO a; %IF 1 <= &i <= 10 %THEN %DO; %LET &dep = bi; %END; %IF 11 <= &i <= 20 %THEN %DO; %LET &dep = bi2; %END; %IF 21 <= &i <= 30 %THEN %DO; %LET &dep = bi3; %END; PROC LOGISTIC DATA = x; MODEL &dep (REF = "Yes")= &indep; RUN; %MEND a; %a(indep = mde, i = 1) %a (indep = pds, i = 2) %a (indep = pts, i = 3) %a (indep = so, i = 4) %a (indep = sp, i = 5) : %a(indep = pe, i = 30) Any input is much appreciated. Thanks!
... View more