1 16267 x 53
1 16267 y 106
1 16267 y 84
1 16267 y 90
1 16267 z 76
1 16267 z 65
1 16298 x 87
1 16298 y 76
2 15678 x 98
2 15678 y 98
2 16541 x 150
etc
I wish to create identifier (visitno) 1,2,3,... for each sequential date
within id.
I have tried to use :
sort id date
by id date: gen visitno = [_n] which obviously doesnt produce the
required variable
I would be greatful for solution & ?or direction to FAQ dealing with
this
Cheers Richard