*Here is an example for numerical integration;
****numerical integration***;
proc iml;
/* Define the integrand */
start fun(t) global (cnt);
cnt=cnt+1;
v = PDF('NORMAL',t);
return(v);
finish;
/* Call QUAD */
a = { .M 0};
cnt=0;
call quad(z,"fun",a);
print z[format=E21.14] cnt;
p=CDF('NORMAL',0);
print p[format=E21.14];
a = { .M 1.96};
cnt=0;
call quad(z,"fun",a);
print z[format=E21.14] cnt;
p=CDF('NORMAL',1.96);
print p[format=E21.14];
quit;


雷达卡



京公网安备 11010802022788号







