I'm relatively new to SAS programming so I'm having trouble understanding some of your code. I'm having trouble understanding the purpose of the first 2 do loops. Why is the variable 'n' 10^e? Also, why does the second do loop go from 1 to 9-e. Does the code below do the same thing but in a simpler way? data pieces;
call streaminit(23456);
do i= 1 to 100000;
r= rand('uniform');
short = min(r,1-r);
long = max(r,1-r);
output;
short_long = short/long;
long_short = long/short;
end;
run;
data status;
set pieces;
row = _n_;
SL_Running + short_long;
LS_Running + long_short;
SL_Mean = SL_Running / _n_;
LS_Mean = LS_Running / _n_;
run;
... View more