Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Two Questions about Release 9.1


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: Two Questions about Release 9.1
Date   Mon, 19 Sep 2005 16:02:41 -0500

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index