- Table1 has Col1 and Col2
- Table2 is distinct Col1 as Col3 and generated random variable Col4
- Simulate a function Col2*2 + Col4 where Col4 is based on Table1.Col1 = Table2.Col3
- Col4 is diff for each trial
- I don't really know how to do this but tried the below. Any help will be really appreciated.
Code:
data monte_carlo;
%let num = 10;
do i = 1 to #
do while(not eof);
set Table2 end=eof;
Col4 = rand('uniform');
put Col4;
end;
do while(not eof);
set Table1 end=eof;
Col2*2 + Col4;
end;
end;
run;