Hi Statalists,
I am trying to generate an enumeration variable for groups which are defined by other variables.
In the example below I likewise try to generate X which is distinct for every B sorted by A.
Code:
Thank You
I am trying to generate an enumeration variable for groups which are defined by other variables.
In the example below I likewise try to generate X which is distinct for every B sorted by A.
Code:
Code:
A B X
3 1 1
3 1 1
3 1 1
3 1 1
3 0 2
3 0 2
3 0 2
7 1 3
7 1 3
7 1 3
7 1 3
7 0 4
7 0 4
Comment