Hi all, I created a macro and used IML in this macro, then I ran this macro twice trying 2 different sets of parameters. I understand that the integral is NOT integrable so the very last column in the matrix should be missing. That said, the 1st try gives me this expected result without any error msgs, but the 2nd does not even work at all, why? %macro setup( n1=, n2=, r1=, r2=, alpha1=, beta1=, alpha2=, beta2= ); proc iml; start grand(u) global(a1,a2,a3,a4,a5,a6); v=(u##(a1-1)#(1-u)##(a4-a1-1))#(1-u#a5)##(-a2)#(1-u#a6)##(-a3); return(v); finish; start Appell(v_a1,v_a2,v_a3,v_a4,v_a5,v_a6) global(a1,a2,a3,a4,a5,a6); a1=v_a1; a2=v_a2; a3=v_a3; a4=v_a4; a5=v_a5; a6=v_a6; call quad(z,"grand",{0 1}) peak=0; f=gamma(a4)/gamma(a1)/gamma(a4-a1)#z; return(f); finish; den=j(41,8,.); do i=0 to 40; k=i+1; den[k,1]=i; den[k,2]=&beta2+&n2-den[k,1]; den[k,3]=&alpha1+&beta1+&n1+&alpha2+&beta2+&n2-2; den[k,4]=1-(&alpha2+den[k,1]); den[k,5]=&alpha1+&r1+&beta2+&n2-den[k,1]; den[k,6]=1; den[k,7]=1; den[k,8]=Appell(den[k,2],den[k,3],den[k,4],den[k,5],den[k,6],den[k,7]); end; print den; quit; %mend; /* 1st try */ %setup( n1=40, n2=40, r1=4, r2=14, alpha1=4, beta1=36, alpha2=1, beta2=1 ); /* 2nd try */ %setup( n1=40, n2=40, r1=10, r2=20, alpha1=10, beta1=30, alpha2=1, beta2=1 );
... View more