Joseph Coveney <[email protected]> originally asked about an update
to -permute- in the last executable update.
> <cut>
>
> 1. According to the on-line help file, "permute now uses two random uniform
> variables to generate Monte Carlo permutations of the values of the permute
> variable." Is this in order to effectively increase the period of the
> pseudorandom number sequence? If so, what is the period now for -permute-?
>
> <cut>
Since I was out (I'm the one who made the change) Ken Higbee
<[email protected]> quickly replied for me, indicating I would fill in any
details regarding the change to -permute-.
The point of the change is to ensure that results are reproducible for large
datasets given a random number seed.
As you may have already read on Statalist today, -sort- does an unstable sort
by default; and -permute- (prior to this update) used -sort- and a single
temporary random uniform variable (say, `RU') to permute the values of the
permute variable (i.e. produce a monte-carlo permutation). If two or more of
the values in `RU' are identical for a given monte-carlo permutation, that
permutation will not be reproducible.
For this reason, -permute- now uses 2 random uniform variables; the second
random uniform variable ensures that knowing the random number seed is
sufficient to reproduce your results.
--Jeff
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/