In addition to other answers, there is an FAQ on related logic.
FAQ . . . . . . Listing observations in a group that differ on a
variable
11/01 How do I list observations in a group that differ
on a variable?
http://www.stata.com/support/faqs/data/diff.html
Another trick is
egen both = group(id1 id2)
egen g1 = group(id1)
assert both == g1
Nick
[email protected]
Jeph Herrin
I have two group identifiers in my data of 108k
observations. I would like to verify that that
they identify the same groups - there are about
800 groups, which rules out the simple inspection
routes.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/