Hello,
I'm generating data and want to create an identifier for groups of rows. Suppose I first generate an id for every observation:
After that I want to create a new variable with value 1 for obervation 1 to 10; value 2 for observation 11-20 etc.
Is there a convenient procedure to do this?
Thank you,
Mike
I'm generating data and want to create an identifier for groups of rows. Suppose I first generate an id for every observation:
Code:
gen id = _n
Is there a convenient procedure to do this?
Thank you,
Mike
Comment