Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Unique dyads
From
emanuele mazzini <[email protected]>
To
[email protected]
Subject
st: Unique dyads
Date
Thu, 14 Apr 2011 20:29:02 +0200
Dear all Stata users,
I am using an unbalanced dyadic panel dataset for which I need to
generate an unique dyad id. I looked at this help:
http://www.ats.ucla.edu/stat/stata/faq/dyad_ids.htm but the
suggestions I found here do not seem to work in my dataset. In
particular, the example shows that there is a certain symmetry, so
that the couple for which a=1 and b=5 is the same couple for which a=5
and b=1. Hence the couple considered gets the same value for the
variable dyad. But this does not work in my dataset because the couple
that gets a given value for the variables a and b is not the same
couple that gets the same values for b and a.
I can be more clear with the following example, which will be in terms
of countries, as in my dataset. Suppose I consider the couple USA and
GBR and I apply the suggested procedure. Then when the couple is:
USA-GBR i got a=1 and b=75
but when I consider the reverted couple, i.e GBR-USA, i got a=46 and
b=90, which are absolutely not the same values, as the help i read
suggest.
Anyone can please help me to understand why this is happening or has
an alternative way to proceed to get an unique dyad-id identifier?
Thanks to all of you in advance,
Regards,
Emanuele.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/