Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: EGEN GROUP where order doesn't matter?

From   Don Ruby <>
Subject   st: EGEN GROUP where order doesn't matter?
Date   Fri, 11 Feb 2011 15:11:31 -0500

Hi all,

I understand that egen id=group(id1 id2) will create a list such that
the pair (id1.1 id2.1)=1, (id1.2 id2.2)=2 etc. But, the order of the
pair (id1 id2) matters so that the pair (id1.1 id2.1) will not yield
the same value as (id2.1 id1.1).

How can i make it so that the same value is generated, regardless of
the varlist order?


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index