<>
******
gen obsID=_n
******
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Laura Platchkov
Gesendet: Samstag, 12. September 2009 14:24
An: [email protected]
Betreff: st: ST: create different /distinct identifier for observations
Dear all,
I just have a basic question. I have 20'000 observations, but a lot of
different observation correspond to the same object (a lake) and hence, has
the same ID. To do some commmand, I need that each observaiton have a unique
identifier. So I need to give 20'000 different identifiers, one for each
observation.
So I neeed to create a new variable called obsID, which goes from 1 to
20'000, one for each observation. I can't copy paste my data and do it on
Excel, because it would be to long. Can STATA Edit do that?
Thanks,
Laura
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/