/*
我在一个国外论坛上找到的IRR处理dataset中数据的计算方法如下:
[color=#008040:3awji7wj]proc iml;
use test;
list all;
list;
read all var {c};
show c;/* Call the IRR function in Base SAS. This technique works for any Base SAS function that is expecting a list of arguments instead of a vector.Rick Wicklin */
start myIRR(freq, c);/* convert numeric matrices a single string */
args = strip(putn(freq, "BEST12.")); /* string of the freq value */
cc = strip(putn(c, "BEST12.")); /* character vector of c */
do i = 1 to nrow(cc); /* concatenate all values */
args = concat(args, ",", strip(cc[i]));
end;
cmd = "rate = IRR(" + args + ");" ; /* Base function call, as a string */
call execute(cmd); /* execute the string */
return (rate); /* return result from Base SAS function */
finish;
freq = 1;
rate = myIRR(freq,c); /* call Base SAS function with vector */[/color:3awji7wj]
但是不懂怎么运用到XIRR的函数里面。。。
*/