[code:mx3gx8ov]data ahuige(drop=i);
format var1-var3 $2.;
input var1-var3;
array allvar(1:3) var1-var3;
array alltemp(1:3) $20. _temporary_ ;
do i=1 to 3;
if not index(alltemp(i),allvar(i)) then alltemp(i)=left(trim(alltemp(i))||' '||allvar(i));
allvar(i)=2+sign(index(alltemp(i),allvar(i))-4);
end;
cards;
AA CG AC
AG CC AA
GG GG CC
AA CC CC
GG CG AA
;
RUN;
since the proc wont accept multiple strata, you have to run the proc over again. An example as following
Jingju
[code:1i1zz7r0]data yy;
set sashelp.class;
status =(ranuni(1)>0.35);
array m(10); do i =1 to dim(m); m[i] =(rannor(1) >0); end;
run;
%macro procM(mi=);
proc lifetest data=yy; time age*status(0); strata &mi; run;
%mend procM;
data _null_;
do i =1 to 10;
call execute('%procM(mi='||cats('m', i)||')');
end;
run;[/code:1i1zz7r0]