Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create an alternative variable for unique identifier in Stata

    Hi All,

    Recently I need to publish some dataset online. However, the unique identifier of my dataset contains some sensitive information that I am not expected to share. There are certain patterns inherent in the existing identifier variable that I do not want to share. I am wondering if Stata can help to create a new/alternative unique identifier based on existing identifier and can work to identify each observations (with duplicate observations)?

    Any suggestions are welcome. Thanks!


  • #2
    Code:
    egen long new_identifier = group(existing_identifier)

    Comment


    • #3
      Clyde hits the nail on the head as usual. But note that this is an FAQ. The Statalist FAQ itself advises search of the Stata FAQs:

      https://www.stata.com/support/faqs/d...p-identifiers/

      Comment


      • #4
        Hi Clyde and Nick,

        Thanks for your answers. It helps a lot. I will do a more comprehensive FAQ search first in the future.

        Comment

        Working...
        X