this is what I write so far, but the final result is NULL DATA x;
input x1 x2 x3 x4;
datalines ;
1 2 3 5
3 4 4 6
5 6 9 7
8 5 6 7
;
run;
DATA b;
input b1 b2 b3 b4;
datalines ;
0.3 0.4 0.5 0.1
;
run;
%macro trans (Beta , n);
proc fcmp;
array bb [1,&n] / nosymbols;
array tb [&n,1];
rc = read_array('@Beta', bb);
call transpose(bb, tb);
put tb =;
rc = write_array('tb', tb);
quit;
%mend;
%macro multi (datax, Beta,n);
%trans(&Beta, &n);
proc summary data = &datax nway;
var x: ;
output out=mean (drop=_:) mean= ;
run;
proc fcmp;
array xm [1,&n]/ nosymbols;
array c [&n, 1]/ nosymbols;
array result[1,1];
rc = read_array('tb', c);
rc = read_array('work.mean',xm );
call mult (xm, c,result);
put result=;
rc = write_array('bx', result);
quit;
%mend;
%multi(x,b,4);
Data Sens;
set work.mean;
array y[*]_numeric_;
set work.TB;
array D[*]_numeric_;
array Sens[*]_numeric_;
set work.BX;
array BetaX[*]_numeric_;
do i = 1 to dim(Sens);
Sens[i] = 1 + y[i]*D[i]/BetaX[1];
end;
run;
... View more