Dear SAS Programmers, How do I generate an array and fill it with random binomial data? Say, I need an array with 100 rows and 5 columns, and I want the probability to be equal in all columns, say p=0.1. My current code (sorry, if it's totally stupid) is: data Table (keep=aids); call streaminit(4321); array p[5] _temporary_ (repeat(0.1, 5)); do i = 1 to 500; aids = rand("Table", of p[*]); output; end; end; run; First of all, the repeat function in the array does not work (because it probably shouldn't be there). But when I replace it with (0.1, 0.1, 0.1, 0.1, 0.1) the code produces a single variable with 500 entries instead of arranging the results in an array. Thank you!
... View more