```
*Suppose you want to simulate 1000 values from a Normal distribution with mean 3 and standard deviation of 1.50;
/*Appraoch 1*/
data sim_data;
do i=1 to 1000;
x = 3 + rannor(0)*1.50;
output;
end;
run;
*check your outputs;
proc means data=sim_data;
var x;run;
Analysis Variable : x
N Mean Std Dev Minimum Maximum
-----------------------------------------------------------------
1000 2.9315496 1.5082780 -2.0852613 8.4886542
------------------------------------------------------------------
* The same can be done using a macro;
/*Appraoch2*/
%macro simulate (mean,sd) ;
data simulated_data;
do j = 1 to 1000 ;
x= &mean+rannor(0)*&sd;
output;
end;
run;
%mend ;
%simulate(3,1.50) ;
```