PetrOtahal
Technical User
I have a problem when trying to square the &B macro variable in the following code:
The value of the &B macro variable is: -2.048898
Output looks like this:
Can anyone explain why squaring with the **2 notation does
not produce the correct output??
Thanks,
Petr
Code:
data parmscalcs;
array _YSSurv{5};
merge parms parmsmatrix;
retain B;
B=B;
if Level=1 then do;
B= 9 * &CumSurvFinal * (log(_YSSurv{1})+
log(_YSSurv{2}) + log(_YSSurv{3}) +
log(_YSSurv{4}) + log(_YSSurv{5}));
call symput('B', B);
end;
run;
data FinalCalc;
merge covarmatrix parmscalcs AMatrix; [COLOR=red]
Squared1= &B*&B;
Squared2= &B**2; [/color]
run;
proc print data=FinalCalc; var Squared:; run;
The value of the &B macro variable is: -2.048898
Output looks like this:
Code:
Obs Squared1 Squared2
1 4.19798 -4.19798
Can anyone explain why squaring with the **2 notation does
not produce the correct output??
Thanks,
Petr