Dear all,
I am working with a dataset that has unique identification codes assigned to all observations, e.g. GEC10B5. The first five letters/numbers in this code refer to a type of worker "GEC10". I would now like to "group" all those observations together that were done by this GEC10 (that could e.g. be GEC10B5-GEC10B15, that are all listed in Stata beneath each other).
Is there a way to create a variable based on their string name within another variable?
Thanks in advance!
Theresa
I am working with a dataset that has unique identification codes assigned to all observations, e.g. GEC10B5. The first five letters/numbers in this code refer to a type of worker "GEC10". I would now like to "group" all those observations together that were done by this GEC10 (that could e.g. be GEC10B5-GEC10B15, that are all listed in Stata beneath each other).
Is there a way to create a variable based on their string name within another variable?
Thanks in advance!
Theresa
Comment