Hi,
I have already complete macro program code that computes pe and ps. (Attachments: macro test)
but i don't know how to code
when , if pe < 0.05 then I = l-1, if ps < 0.05 then m = m + 1, and pe and ps must be repeated until both are greater than 0.05.
**ex data**
proc iml;
ze_0={1,2,3};
zs_0{1,3,5};
ze_1={2,3,4};
zs_1={2,4,2};
ze_2={1,3,2};
zs_2={2,5,4};
quit;
pe=#{max(ze_i[l,1],zs_i[m,1])>=ze_0[l,1]}/nb
ps=#{max(zs_i[l,1],zs_i[m,1])>=zs_0[m,1]}/nb
l=3 to 1;
m=1 to 3;
i=1,2
nb=2;