Hi everyone,
I'm a bit stuck with a problem. I have a data set that I will need to make available as part of publishing our study results. To do this, I will remove the study-assigned ID variable, and replace it with something else in a non-systematic way (i.e., so that it cannot be traced back to an original study ID number). Participants typically have 6 or 7 study visits, and each record corresponds to one study visit; records are uniquely identified by a participant id and the study visit date. Participant ID is a string, with letters and numbers.
And I can't quite figure out how to do this. I don't want to sort participant id ascending or descending, and assign a new, consecutive number to identify participants (e.g., participant 1, participant 2, etc) because that might make it possible to trace back to original study id numbers.
Is there a command in Stata to sort randomly? (i.e., keep all visits from a person ordered together, but randomly sort them rather than sort them ascending or descending) Then I could replace participant id with a consecutive number that would therefore not be traceable back to the original id?
Is there some way to assign a random, new number to each individual?
How might you go about tackling this... I'm really stuck!
Thanks in advance.
I'm a bit stuck with a problem. I have a data set that I will need to make available as part of publishing our study results. To do this, I will remove the study-assigned ID variable, and replace it with something else in a non-systematic way (i.e., so that it cannot be traced back to an original study ID number). Participants typically have 6 or 7 study visits, and each record corresponds to one study visit; records are uniquely identified by a participant id and the study visit date. Participant ID is a string, with letters and numbers.
And I can't quite figure out how to do this. I don't want to sort participant id ascending or descending, and assign a new, consecutive number to identify participants (e.g., participant 1, participant 2, etc) because that might make it possible to trace back to original study id numbers.
Is there a command in Stata to sort randomly? (i.e., keep all visits from a person ordered together, but randomly sort them rather than sort them ascending or descending) Then I could replace participant id with a consecutive number that would therefore not be traceable back to the original id?
Is there some way to assign a random, new number to each individual?
How might you go about tackling this... I'm really stuck!
Thanks in advance.
Comment