vendredi 10 mars 2017

SAS: Find seed used to generate random numbers

Is it possible to find the seed SAS used to generate a set of random numbers?

For instance, if I run

data random;
  x = rand('uniform');
run; 

can I find what seed generates that value?

Having the seed used for a particular run could be useful, for instance, in jittering data. When I need to jitter data for a plot, I have to manually try different seeds to find one which doesn't have (too many) overlaps. It would be simpler to let SAS pick the seed, run the jittering until the plot looks good, then set the seed to whatever value SAS happened to pick.




Aucun commentaire:

Enregistrer un commentaire