Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: RE: Encryption of data


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: RE: Encryption of data
Date   Wed, 13 Jun 2007 17:12:57 +0100

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 
n.j.cox@durham.ac.uk 

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/



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