Statalist The Stata Listserver


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

Re: RE: st: RE: RE: Encryption of data


From   "Rodrigo A. Alfaro" <[email protected]>
To   <[email protected]>
Subject   Re: RE: st: RE: RE: Encryption of data
Date   Fri, 15 Jun 2007 04:50:21 -0400

///
[Dealing with ties] Generate 2 or more uniform variables and
sort the main dataset with these. You can also add other
variables, making "impossible" to get a tie.

set seed 12345 /// customized choice
gen double aux1 = uniform()
set seed 23456 /// customized choice
gen double aux2 = uniform()
sort aux1 aux2 x1 x2 x3 /// dealing with ties
gen long key = _n /// Bill's idea.

If you need to add more id's into the sample, then my
suggestion is to re-compute the codes.

Rodrigo.

----- Original Message ----- From: "Hendri Adriaens" <[email protected]>
To: <[email protected]>
Sent: Friday, June 15, 2007 3:38 AM
Subject: RE: RE: st: RE: RE: Encryption of data



William,

> It might not matter for security, but for my application it
does. The
> information from the master data set (that will be
anonymised) will have to
> be merged into a new dataset (to be anonymised with the
mapping). If the
> mapping contains ties, -merge- wouldn't know which of the
tied records to
> insert in the new dataset.

No.

There is no problem.  The mapping will not contain ties even if ties
arise due to the random numbers drawn.  Every person will in the data
will have a unique id.
I was talking about the situation that:

uid newid
123-45-6789 100
999-99-9999 100

123-45-6789 should get characteristics a from the other dataset and
999-99-9999 chars b. With the new mapping they get at best a or b, but most
likely, the merge won't even work.

Best regards,
-Hendri.


*
* 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/
*
*   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