Dear Statalist,
I would like to generate a variable which indicates groups within groups. Consider the following data:
ID INFO DESIRED_VARIABLE
1 A 1
1 A 1
1 B 2
1 B 2
2 C 1
2 C 1
2 D 2
2 D 2
Is there any way to do this? I tried egen-group with "by", but I get an error that "by" is not allowed there.
Thanks for any helpful comments!
Juliane
I would like to generate a variable which indicates groups within groups. Consider the following data:
ID INFO DESIRED_VARIABLE
1 A 1
1 A 1
1 B 2
1 B 2
2 C 1
2 C 1
2 D 2
2 D 2
Is there any way to do this? I tried egen-group with "by", but I get an error that "by" is not allowed there.
Thanks for any helpful comments!
Juliane
Comment