--- On Thu, 8/10/09, amatoallah ouchen wrote:
> I was wondering if you could help me figure something out
> related to the creating of an automatic numbering within
> stata. in fact, my data set are sorted by ticker and by
> date, I need to create a column that contains the numbering
> of the observations (1,2....,N) within each ticker.
bys ticker (data) : gen int id = _n
hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/