There is a minute but non-zero chance of ties
on numbers drawn using -uniform()-. In principle
we are drawing from a continuous distribution, but
in practice, numbers are held to finite precision.
Thus an industrial-strength algorithm would need to
break ties consistently.
Nick
[email protected]
Maarten Buis
> Can't you do that like this?
>
> *------------ begin example -----------
> tempfile a b
> sysuse auto, clear
> gen key = uniform()
>
> preserve
> drop make
> save `a'
> restore
>
> keep make key
> sort key
> save `b'
>
> use `a', clear
> sort key
> merge key using `b'
> *----------- end example ------------
> (For more on how to use examples I sent to the Statalist, see
> http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
>
> So what you give others is a dataset with a key that is a
> random draw from a uniform distribution, and if you need the
> data you wanted to hide you can merge that data back in by
> using that key.
*
* 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/