Hello all, I have a list of variables in a SAS dataset. They all start with "Rule" but with different numbers following (e.g., rule90012, rule200044, rule0000200034). They are also not ranked in order. Now I want to rename them one by one, to be rule1, rule2, rule3, rule4,.... Is there any way to do that? The reason I want to do this is because I need to run each of the rules as a dependent variable through logistic regression, for like 600+ times. So I have a do loop program to automate that process The do-loop codes: %macro mylogit (num); %do i=1 %to # title "dependent variable is rule&i"; proc logistic data=test des; model rule&i=var1 var2 var3 var4/selection=forward; run; %end; %mend; If anyone could think of any other way to do the iterative logistic regression for 600+ different dependent variables, without renaming them beforehand, it would also be great. THANK YOU.
... View more