Hallo everybody and thanks in advance for any kind of suggestion.
I am working on a large dataset about investors in mutual funds (more than 10 millions obs); every person in my dataset is currently identified by an ID code (numeric) built merging asset manager code, customer code and year code. This means that the usual shape is like 370000002973312003 (firm 37, customer 297331, year 2003): i do not have the single parts of the code, but only the whole code.
Now, the issue is that i have several observations for each person in every year, but i need to work with a typical panel setup. Usually i solve the issue using a tag command that gives me a unique identifier of each person-year combination; this time, however, i fail in using this shortcut... In particular the issue seems to be the way Stata uses to store this ID code; when i use concatenate or destring commands i obtain strange results. I was wondering if there is a way to re-code all the customers in a more convenient way through a single command.
Thanks
Simone
Related Posts with Identifier with huge codes
division of two-column using if functionHello, I have this dataset, and I want to divide CLMS18/CLMS17 if NPI17 is the same as NPI18 and the…
Why the number of observation decrease when I increase the sample size?Hi all, Today I face a strange situation that the number of observations shrinking when I expand th…
How to see the frequency of a veriables in each country in a dataset ?By the helps from others, I see that I can list the unique countries from a sample by using\ tab GE…
What is wrong with inlist2 in my code?Hi all, Yesterday, as documented from this post (https://www.statalist.org/forums/for...p-of-countr…
Dates from Excel/CSV not correctly displaying in StataI imported several csv files with "birthdate" as one of the variables into Stata and then I appended…
Subscribe to:
Post Comments (Atom)
0 Response to Identifier with huge codes
Post a Comment