DATA Step, Macro, Functions and more

Simulation in SAS

Frequent Contributor
Posts: 78

Simulation in SAS

Hello Everyone,


I have 48 industries and the number of mergers in each industry in each month from the year 1980 to 1989 (120 Months). Taking the total number of bids over the entire period for a given industry, I want to simulate 1000 distributions of that number of occurrences of industry member involvement in a bid over a 120-month period by randomly assigning each occurrence to a month where the probability of assignment is 1/120 for each month. I have no idea where to start.  Please help. 


I tried the following code. But it did not work:


sasfile have load;
proc surveyselect data=have out=outboot
method=urs samprate=1 outhits
rep=1000 noprint;
sasfile have close;
ods listing close;
proc sort data=outboot; by Aindus48 year month Replicate; run;
proc univariate data=outboot noprint;
var count;
by Aindus48 year month Replicate;
output out=outall kurtosis=curt;
ods listing;
proc univariate data=outall noprint;
var curt;
by Aindus48 year month;
output out=final pctlpts=2.5, 97.5 pctlpre=ci;

Esteemed Advisor
Posts: 5,624

Re: Simulation in SAS

[ Edited ]
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation