[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Is there a "running count" command in Stata?
I have checked the references as well as the Statalist archive, but couldn't
seem to find a solution to this. I was trying to find some command that
works like a "running" count function; that is, it will give the number of
unique occurences from 1 to _n. For example: variable x is as follows:
And I was trying to generate a variable -y- such that
cd1 3 //there are cd1, cd2 and cd3 before this
I am still learning Stata and was hoping that this does not have to be
solved by programming... Is there a command or package that works like this?
* For searches and help try: