Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: numbering observations

From   daphna <>
Subject   st: numbering observations
Date   Wed, 21 Sep 2005 12:45:13 -0700

I have a very basic question, so I am sorry to bother the list members if this is too obvious.

I have observations about people at 24 time points and oftentimes I have more than 1 observation per time period. The data is about earnings, so for instance, if a person had two jobs in june 1996, i have two observations for them then. If they had 3 jobs in october 1996, I would have 3 observations for that time period- one observation per job.

For now, all I would like to do it create a new variable "jobs" which arbitrarily assigns a number to each job within a time period. (ie. 1 for the first job in 6/96, 2 for the second, 1 for the first job in 10/96... etc)

(eventually i will use this variable to reshape the data)

I hope my question makes sense. I can't seem to find a command that will do this, but I may have just missed it.

Thanks for any advice,

* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index